Hey everyone! I see that my bot is slow in the opening because of a lack of opening book. How do I add one to my bot so that it is faster?
Hey everyone! I see that my bot is slow in the opening because of a lack of opening book. How do I add one to my bot so that it is faster?
You can put an opening book (.bin file) in the "engines" folder and name it "book.bin". In your "config.yml" file it should also say "engines/book.bin" at book: standard:
You can put an opening book (.bin file) in the "engines" folder and name it "book.bin". In your "config.yml" file it should also say "engines/book.bin" at book: standard:
you can download polyglot from here:
http://www.geenvis.net/pg.html
and then use it like (assuming your PGN is hand edited):
-
create white repertoire:
polyglot make-book -pgn white.pgn -bin white.bin -min-game 1 -only-white -uniform
-
create black repertoire:
polyglot make-book -pgn black.pgn -bin black.bin -min-game 1 -only-black -uniform
-
merge the books:
polyglot merge-book -in1 white.bin -in2 black.bin -out book.bin
then continue like @Ajile described in #2
more info here:
http://wbec-ridderkerk.nl/html/details1/PolyGlot.html (scroll down to 'Book Making' / 'Book Merging')
you can download polyglot from here:
http://www.geenvis.net/pg.html
and then use it like (assuming your PGN is hand edited):
1) create white repertoire:
polyglot make-book -pgn white.pgn -bin white.bin -min-game 1 -only-white -uniform
2) create black repertoire:
polyglot make-book -pgn black.pgn -bin black.bin -min-game 1 -only-black -uniform
3) merge the books:
polyglot merge-book -in1 white.bin -in2 black.bin -out book.bin
then continue like @Ajile described in #2
more info here:
http://wbec-ridderkerk.nl/html/details1/PolyGlot.html (scroll down to 'Book Making' / 'Book Merging')
and's that book will apply if i play variants or only if standard chess?????
and's that book will apply if i play variants or only if standard chess?????
If you have an entry for standard in the config.yml then it will use that book for standard and for no other variant. You will have to define a book for each variant where you want to use a book. See config.yml -> engine/polyglot/book
If you have an entry for standard in the config.yml then it will use that book for standard and for no other variant. You will have to define a book for each variant where you want to use a book. See config.yml -> engine/polyglot/book
Btw the latest release of PyChess https://github.com/pychess/pychess/releases can create polyglot opening books not for standard chess only but for all variants. You just have to have a collection of variant games in a .pgn you like, open it in Database menu and then select Create opening book sub menu. I myself used it to create an atomic.bin book for PyChessBot from all FICS atomic games (above 2200 Elo). It's a little bit slow (PyChess is pure Python code!) but works.
Btw the latest release of PyChess https://github.com/pychess/pychess/releases can create polyglot opening books not for standard chess only but for all variants. You just have to have a collection of variant games in a .pgn you like, open it in Database menu and then select Create opening book sub menu. I myself used it to create an atomic.bin book for PyChessBot from all FICS atomic games (above 2200 Elo). It's a little bit slow (PyChess is pure Python code!) but works.
That's a great feature!
Just in case "opening book" refers to actual literature - the only meaningful storage of information - and not one of those frivolous opening databases full of grandmaster patzers, i shall provide a quick guide on how to access their immeasurable wisdom with your chess-playing engine:
Step 1: Buy a book about chess openings
[Remark: focus on sound openings like the Frankenstein-Dracula Variation in the Vienna Game - see Eric Schiller for reference]
Step 2: Buy a B2C (Book2Computer) cable.
[Remark: They may look like USB cables, but are inherently different]
Step 3: Just connect the cable to the book and your pc - it's plug and play.
Some common mistakes:
(A) Wrongly connecting the cable to the book:
https://preview.ibb.co/mUzhTo/book_connection.jpg
(B) Using the wrong cable
https://image.ibb.co/iYaNTo/cable_type.jpg
glad to be of help
Just in case "opening book" refers to actual literature - the only meaningful storage of information - and not one of those frivolous opening databases full of grandmaster patzers, i shall provide a quick guide on how to access their immeasurable wisdom with your chess-playing engine:
--------------------
Step 1: Buy a book about chess openings
[Remark: focus on sound openings like the Frankenstein-Dracula Variation in the Vienna Game - see Eric Schiller for reference]
Step 2: Buy a B2C (Book2Computer) cable.
[Remark: They may look like USB cables, but are inherently different]
Step 3: Just connect the cable to the book and your pc - it's plug and play.
--------------------
Some common mistakes:
(A) Wrongly connecting the cable to the book:
https://preview.ibb.co/mUzhTo/book_connection.jpg
(B) Using the wrong cable
https://image.ibb.co/iYaNTo/cable_type.jpg
--------------------
glad to be of help
:-) Also, if the book stops working: close the book and open the book up again.
:-) Also, if the book stops working: close the book and open the book up again.
I tested i downloaded a book for standard only but it uses it in crazyhouse so i guess its kinda useless. in the config there you can't say the book should only be used in standard games.
I tested i downloaded a book for standard only but it uses it in crazyhouse so i guess its kinda useless. in the config there you can't say the book should only be used in standard games.