Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Searching a book for a move: How does Crafty do it?

Author: Anson T J

Date: 04:04:06 03/27/05

Go up one level in this thread


>Instantly.  In fact, if you play your cards right, no I/O needs to be done.
>Just copy the book.bin files to /dev/null (linux) which pre-loads the entire
>file into memory (filesystem cache).  Now when you do a book probe, it takes a
>fraction of a microsecond, rather than milliseconds for the physical I/O... :)
>But even without that "trick" it can find a book move in a few ms, all my disks
>are 15K SCSI so they are "fast enough". :)

At a few ms, I would bet! I have two more questions.

Concerning using 16 bits from the start_position and 48 bits of the destination
position.

a) Does this always overcome the unplayed transposition problem? It seems that
exactly the same position can have two or more entries in your book if the start
position is different (or at least the higher 16 bits). It seems like this will
overcome the problem of playing transpositions blindly when there could be a
stronger move which Crafty could search and find.

b) Once you have located the position you need to seek to in the book (from the
32768 pointers) how do you know how large a chunk you need to read? If there are
 2^64 possible keys and you are indexing by 2^15 of them, doesn't that mean
there could be 2^(64-15) = 2^49 possible positions with this index?

Of course the book will never be that large, but how do you ensure that you will
read all of the required moves? Perhaps one 16 bit higher key has a very large
number of entries.

Once I understand how you ensure all of the moves are read, I think I will have
a good understanding of how the Crafty book format works.

Thanks for your help!



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.