View Single Post
  #2   Report Post  
Old May 7th 04, 05:02 PM
Tommy
 
Posts: n/a
Default draughts checkers - data structure and move generation


"Tommy" wrote

i have programmed my own chess engine that uses rotated bitboards and I

was
wondering what the best data structure for checkers is and how such a data
structure can be used to allow fast generation of moves.
I am looking for a document like the one on rotated bitboards by Dr.

Hyatt,
only, this time for checkers. I woke up with this question and... looked

on
google, but did not find much.


All i have come out with, trying to work it out by myself is:

enum Square {EMPTY = 0, RED = +1, REDKING = +2, YELLOW = -1, YELLOWKING
= -2};
Square board[32] = {EMPTY};
int direction[4] = {+5 /* NE */, +4 /* NW */, -4 /* SW */, -3 /* SE */};

generating moves with this data structure is trivial, and the direction
vector is not really necessary, but I have the feeling that generating
captures is not very easy.... i am not an expertin in draughts, but i
believe that some captures might have multiple paths... any documentation on
how tom implement those fast?

Thanks,

Tommy