Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How to organize Opening book in memory?

Author: Jan Pernicka

Date: 04:40:38 04/04/00

Go up one level in this thread


On April 03, 2000 at 08:42:21, Robert Hyatt wrote:

>On April 03, 2000 at 05:57:51, Jan Pernicka wrote:
>
>>  Hi,
>>I would like to know how to make opening book(OB) "run" in memory (MEM)
>> as efficient as possible.
>

>Store hash keys _after_ each move... then you don't store 'moves' in the book
>at all.  You store hash keys that are produced by making specific moves.  To
>find a book move, generate all legal moves, make each one, and probe the book
>after making the move.  If you get a hit, this is a book position.  Repeat for
>all legal moves to get the set of known book moves...
>
>Doing it in constant time is also easy. See crafty's source (book.c).


 Thank you,

   but I have yet several questions:

  When do you throw away the book from memory? (not found any moves
      for 3 positions there ?)

  How big hash table should be used for book?
     (there can be conflict between "normal" hash table and "openning"
       hash table(in their sizes) - they can be present in memory at the same
      time - but only if answer to my previous question is not "1" ... )

  Thanks,

     Jan

PS: In fact, your method finds a move in time proportional to number of moves
     generated from that position, which could be said to be constant... :)




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.