Create a Polyglot Chess Opening Book (Part 2)
Download Links:
- Polyglot (the program which will generate the book)
- SCID the freeware PGN database tool
- PGN-Extract which cleans PGN files
- Opening Book Batch file and Filter I created
Maverick is the first chess engine I’ve written which can use its own opening book. I decided at an early stage Maverick would read Polyglot opening books. It makes so much sense. Polyglot seems to be a great tool create opening books and its format seems to be emerging as the de-facto opening book standard.
So now I need to actually create an opening book. I did some research on the internet and it really is quite straightforward. Here are the steps I took:
pgn-extract -s -C -N -V -tstartpos.txt -oclean-white2400.pgn white2400.pgn polyglot make-book -only-white -pgn clean-white2400.pgn -bin w1.bin -max-ply 16 -min-game 50 polyglot make-book -only-white -pgn clean-white2400.pgn -bin w2.bin -max-ply 60 -min-game 5 polyglot merge-book -in1 w1.bin -in2 w2.bin -out w12.bin pgn-extract -s -C -N -V -tstartpos.txt -oclean-black2400.pgn black2400.pgn polyglot make-book -only-black -pgn clean-black2400.pgn -bin b1.bin -max-ply 16 -min-game 50 polyglot make-book -only-black -pgn clean-black2400.pgn -bin b2.bin -max-ply 60 -min-game 5 polyglot merge-book -in1 b1.bin -in2 b2.bin -out b12.bin polyglot merge-book -in1 w12.bin -in2 b12.bin -out Maverick.bin Pause 0
The final opening book is a little over 1 Mb (it’s available on the download page)- quite small by most standards. I’ll need to run some test to see how good it is compared to other Polyglot books.
If there are any opening book specialists out there I’d appreciate any feedback. Can the process of creating the book be improved?