Quoting Joshua Shriver <[EMAIL PROTECTED]>:

What kind of data structures do you all use for your engines, in
respect to board representation and move generation. I know in chess
bitboard, mailbox board[8][8], 0x88 exist all with their pro's and
cons. Are there similar concepts for Go?

I always used a 1-dimensional 25x25 = 625 integer array with 0 for black 1 for
white 2 for empty and 3 for border (everything else).

This way I can have a 21x21 board with 2 rows of border cells surrounding it.

Looking at cells near a position p is done with p+1, p-1, p+25, p-25.

For each block of stones I keep a list of the stones, liberties, and stones of
the opponent colors. Valkyria also keeps track of what surrounds each empty
point of the board. This slows down the representation but it makes writing
higher level go knowledge code much easier.

-Magnus




-Magnus
_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/

Reply via email to