# bookmaker.html Stockfish bookmaker




13.09.2019
Update to ver 4.0

Added basic filter games:

Some games are very short 10-20 moves and its often caused by some bug like engine crash ,gui crash.

So these games has incorecct results and should not be saved to books.


Creating backup is now optional.

Fixed default settings.

Added option to store all games extracted from pgn database in single file.

Download bookmaker


10.09.2019
Update to ver 3.9

Added option to automatically fix games result i.e. if some game is stored as draw but in notation is mate

then games will be stored according to notation not the tag.

Now winbooks is stored in single book file (winbook.bin) instead two (whitewin.bin & blackwin.bin).

Posibble to load at once:

-winbook

-drawbook

-two custom books

Stockfish engine reconfigured to new book settings.

Download bookmaker


08.09.2019
Update to ver 3.8

Added option to set custom book depth,out of specified range 20-100.

Now its possible to create book at any ply depth.

Added select elo range 2800 for creating books only from Top GM games

Download bookmaker


05.09.2019
Update to ver 3.7

Changed select elo range options from 2000-2700 to 2300-2700:

It was 2000 2200 2400 2600 2700

Now 2300 2400 2500 2600 2700

Added option to only extract games from PGN databases whithout creating books.

Stockfish updated to http://tests.stockfishchess.org/tests/view/5d6234bb0ebc5939d09f2aa2 (latest version)

Tweaked uci options.

Download bookmaker


16.08.2019
Update to ver 3.6

Added option to use books as single book.bin

Stockfish updated to http://tests.stockfishchess.org/tests/view/5d527cfa0ebc5925cf107f93

To use the book.bin in the current stockfish, change the name to equal.bin

Download bookmaker


10.08.2019
Update to ver 3.5

Stockfish updated to http://tests.stockfishchess.org/tests/view/5d49d72e0ebc5925cf101461

bookmaker simplified few options,no functional changes.

Download bookmaker


03.08.2019
Update to ver 3.4

ECO code support added. Now books can be created and updated at the ECO code specified.Browse ECO codes

Download bookmaker


02.08.2019
Cutechess added to download

Cute Chess is a set of cross-platform tools for working with chess engines like running tournaments.Compiled on 64 bit.

Download Cutechess

01.08.2019
Update to ver 3.2

Tuned drawbook (equal.bin) generate settings.Now position in the database must be tied at least 3 times to save it in drawbook.

Update to ver 3.1

Added option to skip elo players tag,if there is no such in pgn database.It is common in engine vs engine matches in CB interface

Support more games than 15000 in single pgn file.

Download bookmaker


31.07.2019
Update to ver 3

Added minimum elo players from range 2200-2700 that moves from games count to the books.This option help avoid blunders in books.

During testing bookmaker i found that each pgn should contain max 15000 games.If you got in 1 pgn more games then first split it in few files.

Download bookmaker


30.07.2019
Update to ver 2

Added the book width option,the books play 2 types of openings,the most popular or the widest.

Very good for not playing all the time same openings.Not affect books playing strength.

Download bookmaker



29.07.2019

1.This is project similar to Brainfish the difference is that it cointains 3 books each for result of playing game.And its update automatically based to applied PGN database.
a) whitewin.bin - book contains only white moves from games winning by white
b) blackwin.bin - book contains only black moves from games winning by black
c) equal.bin - book contains moves from games ended in draw.

I belive than this way of using opening books is more clear than base on persentage wining games.The order in which book to use by engine is:
for white -> whitewin -> (if not found) pick move from drawbook,
for black -> blackwin -> (if not found) pick move from drawbook.
Since the wining books do not contain moves for different color,always the move from winning book have higher priority than from the drawbook(contains moves for both colors).

2.How the book is created
Opening books is generated by script bookmaker and 2 additional PGN database sorting programs Polyglot and pgn-extract.To generate or update books to include new variations from latest PGN databases:
    a. paste pgn files to current folder,multiple files at once allowed,it will be processing  file by file
    b. run program bookmaker
    c. backup is inside directory C:\_Backup-books
    d. select book depth from range 20 -100
    e. wait till end
    f. run stockfish public to support generated book


3. how to play...
    a.playchess just create uci engine then select playing mode computer in engine room,then it will play from generated books
    b.infinity chess just create engine by option define ctg ,then select stockfish public adjust settings and select ctg book
  (empty ctg for playing from generated bin books) then engine will play moves from generated books.

4. what is stockfish public ...
Its Stockfish dev with option to support generated books from bookmaker.It is updated to 29072019  

5. throubleshooting ...
Only problem i experienced during using this tool is where in games pgn was Chess960 games,then throws error of invalid move.
So its important to only generate from standard chess pgn.

6. how to view generated books
To view and edit manually generated books use program Scid vs PC and paste books to Scid \bin\books directory.

7. backup
To avoid messing something bookmaker always backup first  current books in directory C:\_Backup-books\ with current date so its easy to recover.

8. is it safe ?
yes here is report from virustotal
https://www.virustotal.com/gui/file/25321728729e9a7c0fcfca79ca5cfd85c0e76853dec52592e7dfe9d0d10297d8/detection
some antivirus shows false positive but its clean,maybe is that it is SFX packed archive.But its only 8 from  70 and best antivirus show its safe,because its safe.
Im not a hacker but computer chess enthusiast :)

9. where i find source of the script
If you like to view what under the hood here is bookmaker script source.


10. Download
Download bookmaker

Regards

if any question email me pleomati@gmail.com