Page 1 of 2

How to Make a .BIN opening book (for non programmers?)

Posted: Mon Apr 03, 2017 5:03 am
by BrendanJNorman
Hey guys,

Wondering if such a tutorial or click and save type of software can accomplish this?

I want to make dedicated opening books based on historical players' repertoires.

Thanks for any help. :lol:

P.S Condescending "don't you know anything?" type of answers not welcome.

Re: How to Make a .BIN opening book (for non programmers?)

Posted: Mon Apr 03, 2017 7:00 am
by hgm
If you have a file with all the lines you want to be in the book, you can load it in WinBoard, and then select "Save Games to Book" from the File menu. The book will be created with the name you specified for the GUI book (in the Common Engine Options dialog). So you better set that to a name that does not exist yet, or the existing book will be overwritten (if you ignore a warning). In the Common Engine options you can also specify the 'Book Depth', i.e. how many moves at the start of the games should be considered.

The 'Save Games to Book" action adds the currently selected games (by default all games, but you can select sub-sets by text matching of the title line, or through position search) to its internal buffer before saving the latter on the file, and it only clears the buffer at the start of a session. So you can combine games from several PGN files by just repeating the procedure (and ignoring the overwrite warning you get after the first time).

The WinBoard game parser is not super fast, so for making extremely large books (millions of games) there probably exist more convenient tools.

Re: How to Make a .BIN opening book (for non programmers?)

Posted: Mon Apr 03, 2017 7:21 am
by BrendanJNorman
hgm wrote:If you have a file with all the lines you want to be in the book, you can load it in WinBoard, and then select "Save Games to Book" from the File menu. The book will be created with the name you specified for the GUI book (in the Common Engine Options dialog). So you better set that to a name that does not exist yet, or the existing book will be overwritten (if you ignore a warning). In the Common Engine options you can also specify the 'Book Depth', i.e. how many moves at the start of the games should be considered.

The 'Save Games to Book" action adds the currently selected games (by default all games, but you can select sub-sets by text matching of the title line, or through position search) to its internal buffer before saving the latter on the file, and it only clears the buffer at the start of a session. So you can combine games from several PGN files by just repeating the procedure (and ignoring the overwrite warning you get after the first time).

The WinBoard game parser is not super fast, so for making extremely large books (millions of games) there probably exist more convenient tools.
Thanks that sounds useful regardless.

Any idea how to differentiate between white and black repertoires in the book?

Re: How to Make a .BIN opening book (for non programmers?)

Posted: Mon Apr 03, 2017 7:47 am
by hgm
In Polyglot books the weight the moves get is the number of half-points scored with them, and moves with zero weight are not stored in the book. So to make a book with only white moves you should use a set of games all won by white.

Note that you can select all white wins as a subset by making sure the game result is selected as one of the tags presented in Game List (using the View -> Game List Tags dialog), and, with the 'Filter' entry of the Game List, filter on the text '1-0'. Then only white wins from the currently loaded PGN file will be shown in the Game List, and saved in the book. For the black repertoire you then similarly filter on '0-1'.

Note you can always change the weights afterwards with the aid of the Edit Book dialog, to tune the frequecy with which the various main opening lines will be played.

Re: How to Make a .BIN opening book (for non programmers?)

Posted: Mon Apr 03, 2017 11:08 am
by BrendanJNorman
hgm wrote:In Polyglot books the weight the moves get is the number of half-points scored with them, and moves with zero weight are not stored in the book. So to make a book with only white moves you should use a set of games all won by white.

Note that you can select all white wins as a subset by making sure the game result is selected as one of the tags presented in Game List (using the View -> Game List Tags dialog), and, with the 'Filter' entry of the Game List, filter on the text '1-0'. Then only white wins from the currently loaded PGN file will be shown in the Game List, and saved in the book. For the black repertoire you then similarly filter on '0-1'.

Note you can always change the weights afterwards with the aid of the Edit Book dialog, to tune the frequecy with which the various main opening lines will be played.
Ahh interesting, that helps. Thanks.

Re: How to Make a .BIN opening book (for non programmers?)

Posted: Mon Apr 03, 2017 11:25 am
by Steve Maughan
I did a video a couple of years ago:

https://www.youtube.com/watch?v=rskcUNoirPU

Hope it helps,

Steve

Re: How to Make a .BIN opening book (for non programmers?)

Posted: Mon Apr 03, 2017 11:29 am
by Ferdy
I am trying to create one because even me is also tired of that command line :).

No need to do preliminary filtering by extracting wins of a particular player by white and black sides,
and no need to create white and black bin books separately and then run again to merge the two books to get a single polyglot bin book.
Now all will be done automatically.

Image

Re: How to Make a .BIN opening book (for non programmers?)

Posted: Mon Apr 03, 2017 11:50 am
by BrendanJNorman
Ferdy wrote:I am trying to create one because even me is also tired of that command line :).

No need to do preliminary filtering by extracting wins of a particular player by white and black sides,
and no need to create white and black bin books separately and then run again to merge the two books to get a single polyglot bin book.
Now all will be done automatically.

Image
Oh my! That's exactly what I need. Care to share buddy? :)

Re: How to Make a .BIN opening book (for non programmers?)

Posted: Mon Apr 03, 2017 12:18 pm
by hgm
Ferdy wrote:I am trying to create one because even me is also tired of that command line :).
Well, WinBoard is not exactly command line.
No need to do preliminary filtering by extracting wins of a particular player by white and black sides,
and no need to create white and black bin books separately and then run again to merge the two books to get a single polyglot bin book.
Now all will be done automatically.
There is never any need to do that if your PGN file contains both the white and the black games. Both Polyglot and WinBoard convert the entire file. Creating books for both colors separately is only needed when you want the repertoires to come from different PGN files.

Re: How to Make a .BIN opening book (for non programmers?)

Posted: Mon Apr 03, 2017 12:19 pm
by BrendanJNorman
Steve Maughan wrote:I did a video a couple of years ago:

https://www.youtube.com/watch?v=rskcUNoirPU

Hope it helps,

Steve
I actually watched your video about a year ago before making a .bin book, so thanks mate!

But I was wondering (hoping) that there was a simpler way to do it by now. :?