On Wed, 2007-02-07 at 16:17 -0500, Don Dailey wrote:
> I have a hash funciton that creates a 64 bit "cannonical" hash of
> the position.   The same hash is produced after a rotation for
> example.   A book entry is a record with 3 fields,  a priority
> value (how many times the deep search selected this position), 
> the cannonical hash of the parent position and the cannonical
> hash of the posiiton AFTER the move is played.    This makes
> collision very unlikely.    The cannonical hash takes into
> consideration simple ko,  so if a ko is possible it will hash
> differently than the same position where the ko is illegal. 

Here is some more detail to make this clearer:

typedef struct
{
  int    count;   // number of times this position/response seen
(priority)
  u64    key;     // cannonical position key
  u64    resp;    // resulting cannonical position

} book_entry;


These book_entry records are stored in a file and I keep them 
sorted.   So the procedure to see if there is a book move is
to binary search the file on the parent position key,  
collect all of these records together (making sure there is a
legal move which leads to the cannonical response key) and then
choose one of the available moves in proportion to the 
priority values (the count field.)

- Don




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

Reply via email to