Question to opening books builder

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
PeterO
Posts: 215
Joined: Sun Jul 31, 2016 6:35 pm

Question to opening books builder

Post by PeterO »

Hi,

Question to opening books builder:

I want to have an opening book where the engine ALWAYS make rochade on the OPPOSITE SIDE!
(Polyglott- .bin format)

Is this possible?

Peter
Zenmastur
Posts: 919
Joined: Sat May 31, 2014 8:28 am

Re: Question to opening books builder

Post by Zenmastur »

PeterO wrote: Mon Mar 30, 2020 1:24 pm Hi,

Question to opening books builder:

I want to have an opening book where the engine ALWAYS make rochade on the OPPOSITE SIDE!
(Polyglott- .bin format)

Is this possible?

Peter
I think this has already been done. Just pick games with opposite side castling and make a book from them. No big deal.
Only 2 defining forces have ever offered to die for you.....Jesus Christ and the American Soldier. One died for your soul, the other for your freedom.
User avatar
PeterO
Posts: 215
Joined: Sun Jul 31, 2016 6:35 pm

Re: Question to opening books builder

Post by PeterO »

Hi,

so I have to filter the games in my database. I use chessbase 13.
Is it possible to select opposite side rochade - how?

Peter
User avatar
phhnguyen
Posts: 1434
Joined: Wed Apr 21, 2010 4:58 am
Location: Australia
Full name: Nguyen Hong Pham

Re: Question to opening books builder

Post by phhnguyen »

The easiest and quickest way is to edit weights/scores of an existing book. Chess GUIs/chess engines will select moves based on their scores, after comparing them with scores of other moves (that are from the same positions). Modify scores of moves on the lines you want to higher values, the others in lower scores you can control how to pick up opening moves.

You may try my Banksia GUI. After opening (menu -> Tools -> Opening), a Polyglot book will be displayed in the form of a tree. Just double click on any score you want to edit, modify then press enter to complete. That is all :D

Image
https://banksiagui.com
The most features chess GUI, based on opensource Banksia - the chess tournament manager
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Question to opening books builder

Post by hgm »

WinBoard/XBoard allows you to filter for such games. (But it is not really a database program, so on huge PGN it could be pretty slow.)

First load the PGN collection through File - Load Game. Then set up a position with the white King on g1 and the black King on c8. You can then use the Position Search mode "Match if position is subset" (in the Options - Load Game dialog); this should only leave the games with white O-O and black O-O-O in the Game List (where neither King moved before the other castled). You can then specify a name for the book in the Engine - Common Settings dialog, and use File - Save Games to Book to make the filtered games into a book. You could then change the board position to one with the white King on c1 and the black King on g8, and repeat the procedure (using Save Games to book twice to force an overwrite of the file).