Giuliano Ippoliti wrote:Hi,
is there a standard format for opening books? I would like to add a book to my engine, and I don't want to reinvent the wheel
Thanks,
Giuliano
Hi Giuliano,
Wing's opening books are derived from 160,000+ top GM games, mainly from the period 1950-2004, stored in a 100 MB pgn file and it contains 7,457,216 moves in total.
My own created opening books are binary files that contain 4 sections:
1. a header, containing general information, a unique signature, version number, number of positions stored (nrpos), etc.
2. nrpos positions, sorted and stored as 64-bit Zobrist' keys.
3. nrpos+1 starting addresses, for all reply moves, these addresses refer to section 4 below:
4. all reply moves with frequency of occurance.
I don't know how others do it, this is probably not the most optimal way, but replies from the opening book are usually looked-up in about 30 milliseconds or so.
Again I think we all could benefit from an 'open standard'.
Stef