Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Standard Opening Book Format (clarification)

Author: Peter McKenzie

Date: 13:48:45 09/25/98

Go up one level in this thread


On September 25, 1998 at 10:54:41, Robert Hyatt wrote:

>On September 24, 1998 at 21:17:30, Peter McKenzie wrote:
>
>>Is there a standard format for opening books, so that they can be exchanged
>>between programs?
>>
>>If not, is anyone interested in defining such a format?
>>
>>Regards,
>>Peter
>
>
>If you mean the "binary form" then no.  Most use hash signatures to match
>positions.  If you don't use the same random number generate the hash
>signatures, this won't work.  If you don't use the same piece "indices"
>this won't work (ie in crafty I use a 43bit value to represent a piece,
>where the upper bit says "this slides like a rook or bishop". This gives
>my piece values as follows:
>
>P=1, N=2, K=3, B=5, R=6, Q=7.  Now I can "AND" with 4 and if that is non-
>zero, this is a "slider".  Problem here is that most would use P=1, N=2,
>B=3, R=4, Q=5, K=6.  And that would index the random numbers differently
>again causing problems.

Yes, it seems to me that using hash signatures as a position representation in
an exchange format wouldn't be very useful :)

What I had in mind was an opening book format that any chess program could read
in and convert to its own internal format.  I think this could be useful
because:
a) Practically every program needs an opening book
b) Its a non-trivial exercise to construct an opening book that is both large
and of a high quality (ie not many bad lines in it)

With more pooling of resources, all programs could have better books.  A good
opening book is surely one part of the unbeatable chess program.

>
>We do have a portable book format, however.  It is called "PGN"...
>
>:)

Well, PGN doesn't quite provide all of the functionality I had in mind - I think
large files of PGN games are more useful as a starting point for deriving an
opening book.

For each position in an opening book, you want a list of moves to play in that
position.  You probably also want to attach some sort of weight to each listed
move that will influence the probability that the program plays it.

Perhaps something like the following, where positions are stored in EPD format
followed by a line listing the moves to play in the previous position:

// position after 1.d4 d5
rnbqkbnr/ppp1pppp/8/3p4/3P4/8/PPP1PPPP/RNBQKBNR w KQkq d6
Nf3 c4 (2)

The default weight for a move is 1, a different weight can be given by following
it by (number).

The only problem is that EPD is not very compact, although it does zip up pretty
well, and most programs can munch it no problem.  Or perhaps a more compact
method of storing positions would be required?

I don't know, maybe programmers would prefer to create their own books rather
than use something created by someone else.  Than again alot of folks seem to
use the existing endgame tablebases created by SJE and Ken Thompson.

Any thoughts more than welcome!

cheers,
Peter



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.