Computer Chess Club Archives


Search

Terms

Messages

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

Author: Carlos del Cacho

Date: 03:19:51 04/03/00

Go up one level in this thread


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.
>I think OB should have (in MEM) these properties:
>  1) Allow transpositions
>  2) Retrieve "wanted" position" in constant time or in the worst case
>     in time proportional to moves played in the game up to "now"
>  3) Have reasonable size (as small as possible...)
>
>I think several was of implementing it are possible:
>    1) store "partial" game tree from starting position - IE store
>       only several "best" moves in each pos.
>    2) use "modified" hash table - to allow multiple "best" moves...
>    3) "others"
>
>
>  But - what's common practice 1) or 2) or 3) ?
>
>  Thank you in advance
>
>      Jan Pernicka
>
>PS: Up to now I use that one from 1) and have OP stored in ASCII text
>      on HDD.
>PS2: It could be also possible to have "Kingside Opening Book" and so on
>      to load the desired (and thus smaller) book during play... (?)

I haven't made mine yet but I've read that the "standard" method is something
like the hash table used during search. It has the advantage that two positions
in different opening lines don't get duplicated (which fits well storage
requirements) and allows efficient detection of transpositions.

Your entries could hold information on games won/lost when reached this position
and/or the score obtained with a shallow search so that your program doesn't get
to undesired opening lines which does not handle well (normally gambits, if the
book line doesn't go deep enough).

I Hope that helps you a bit. Bye!
Carlos del Cacho



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.