Author: Gerd Isenberg
Date: 01:22:44 07/17/02
Go up one level in this thread
On July 17, 2002 at 02:23:52, Russell Reagan wrote:
>Two things:
>
>1. How are most opening books stored? Are they in human readable move notation,
>or a binary representation?
>
>2. How do most programs interact with their book? I've heard of some schemes
>where the book is loaded into the transposition table and it simply works
>seamlessly from that. Is that the standard method?
>
>Russell
I do it in the following way (kind of persistent hashtable):
1. I use a readable file with all opening lines, algebraic notation with some
optional tags (!,=,?). Each opening line is one physical line separated by
CR/LF. They may include comments {some interpretable like +-, +=, ECO}.
2. With this source file i generate a binary file. This binary represents an
array of structs like a transpositions table does. With hash index modulo table
size i seek to the appropriate struct, which containes hashkey, castle rights,
color to move and ep-information and a (lseek) pointer to a dynamic struct
placed in an appendix of the binary file. This dynamic structure contains all
the necessary information about the position, all the moves (including
probability to play) and also all source line indices that lead to this position
(for bookeditor reasons).
3. If i probe the table and there is no hit, i try it with the black/white
mirrored position, to look for reversed opening lines, where white possibly
looses one tempo.
Gerd
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.