[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Symmetry in joseki and fuseki



There are 8 different symmetry positions in joseki and fuseki. The size of the
data file is reduced if symmety is considered. It's not a complicated problem.
To save a new starter couple hours of time, I'll list all symmetry operators
in the following.

To use symmetry, two things have to be determined first. One is the coordinate
system, because the form of the symmetry operator depends on the coordinate
system. The second thing is that all your data has to follow certain rules.
These rules in large part is arbitrary, but one has to follow them to take the
full advantage of the symmetry.

For Windows, the origin of the coordinate is at the upper-left. Thus it's
natural and convenient to set the origin of the coordinate in a Go board at
the upper-left corner. The positions on a Go board can be assigned in two
ways. One is to use 0,1,...,18. The other way is to use -9,-8,...,8,9. The
former is more convenient in programming. However, the later is needed to use
the symmetry operators.

I use follwoing rules to build a data file. They pretty much follow those in
most Go books.
1. The first move is always at the upper-right quadrant of the Go board.
2. The first move is always at the lower-right half of the Go board, if it's
not at a symmetry position (on the diagonal line).
3. If the all moves so far are at symmetry positions (on the diagonal line),
the first move that breaks the symmetry determines the symmetry of the joseki
or fuseki according to rule 4.
4. If the first symmetry breaking move is black, it's always at the lower-
right half of the Go board. If it's white, it's always at the upper-left half
of the Go board. 

There are 8 symmetry positions. They are the four corners and in each corner,
there is the basic position and the mirror image of the basic position.
Following is a list of the 8 symmetry matrix. To transform any position (x,y)
into the data file position (X,Y), use follwing formula

                       X=symop[0][i]*x+symop[2][i]*y
                       Y=symop[3][i]*x+symop[4][i]*y 
where i is the number of the symmetry. All the coordinates are designated by
-9,-8,...,8,9. The matrix for reverse transform are also listed and the
formula is

                       x=symopb[0][i]*X+symopb[1][i]*Y
                       y=symopb[3][i]*Y+symopb[4][i]*Y

I assigned the value i in following way. 

0 - upper-right corner, no mirror reflection
1 - upper-right corner, with mirror reflection
2 - lower-right corner, no mirror reflection
3 - lower-right corner, with mirror reflection
4 - lower-left corner, no mirror reflection
....... and so on.

The symmetry operators are
symop[0,0] =1
[1,0]=0
[2,0]=0
[3,0]=1
[0,1]=0
[1,1]=-1
[2,1]=-1
[3,1]=0
[0,2]=0
[1,2]=1
[2,2]=-1
[3,2]=0
[0,3]=1
[1,3]=0
[2,3]=0
[3,3]=-1
[0,4]=-1
[1,4]=0
[2,4]=0
[3,4]=-1
[0,5]=0
[1,5]=1
[2,5]=1
[3,5]=0
[0,6]=0
[1,6]=-1
[2,6]=1
[3,6]=0
[0,7]=-1
[1,7]=0
[2,7]=0
[3,7]=1

The symmetry operators for reverse transform are
symopb[0,0]=1
[1,0]=0
[2,0]=0
[3,0]=1
[0,1]=0
[1,1]=-1
[2,1]=-1
[3,1]=0
[0,2]=0
[1,2]=-1
[2,2]=1
[3,2]=0
[0,3]=1
[1,3]=0
[2,3]=0
[3,3]=-1
[0,4]=-1
[1,4]=0
[2,4]=0
[3,4]=-1
[0,5]=0
[1,5]=-1
[2,5]=-1
[3,5]=0
[0,6]=0
[1,6]=1
[2,6]=-1
[3,6]=0
[0,7]=-1
[1,7]=0
[2,7]=0
[3,7]=1


Dan Liu