Create a realistic custom opening book from GMI and Lichess books for my training

Discussion of chess software programming and technical issues.

Moderator: Ras

Hexabin
Posts: 1
Joined: Tue Dec 17, 2024 11:09 pm
Full name: Arnaud Leroy

Create a realistic custom opening book from GMI and Lichess books for my training

Post by Hexabin »

Hi,

I want to create a chess opening book by combining two sources: an opening book based on GMI games and another based on Lichess games with an ELO of 1600-1800. The final opening book will contain: the most frequent GMI move when it's my turn to play and moves representing 95% of the moves when it's my opponent's turn to play. This would give me a realistic opening book. Is there any software for this, or do I have to develop it myself, for example in Python from games extracted via Scid? Ideally, when the GMI book is out of print, the tool would retrieve Stockfish's best move to complete the book.
chesskobra
Posts: 321
Joined: Thu Jul 21, 2022 12:30 am
Full name: Chesskobra

Re: Create a realistic custom opening book from GMI and Lichess books for my training

Post by chesskobra »

What are GMI games? Do you mean GM games?

Using polyglot, you can create a book with whatever game collection you want. You may just use a generic book created with something like the 40h database as follows:

polyglot make-book -pgn 40h.pgn -bin 40h.bin

This will select variations that have appeared at least 3 times in the 40h.pgn database.

Another option is to use the opening books that are distributed with scid vs pc. Some engines also distribute books made by the authors of the engines.
cpeters
Posts: 161
Joined: Wed Feb 17, 2021 7:44 pm
Full name: Christian Petersen

Re: Create a realistic custom opening book from GMI and Lichess books for my training

Post by cpeters »

You could make two books with polyglot: one for white and one for black:

-create a book from a database/pgn (GM-games/white is grandmaster), but just take the white moves
-create another book from 1600-1800-pgn, but take only black moves

Merge these two books -> GM-white repertoire/black answers 1600-1800ish

Black: the other way around.

Code: Select all

polyglot make-book [-pgn inputfile] [-bin outputfile] [-max-ply ply]
       [-min-game games] [-min-score score] [-only-white] [-only-black] [-uniform]
polyglot merge-book -in1 inputfile1 -in2 inputfile2 [-out outputfile]
This should work, I suppose.