Popular opening books

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

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
MikeB
Posts: 3945
Joined: Thu Mar 09, 2006 5:34 am
Location: Pen Argyl, Pennsylvania

Re: Popular opening books

Post by MikeB » Fri Aug 31, 2018 1:34 am

Graham Banks wrote:
Tue Aug 28, 2018 8:20 am
Guenther wrote:
Tue Aug 28, 2018 8:17 am
Graham Banks wrote:
Tue Aug 28, 2018 7:17 am
I can't successfully convert Dann's epd into a pgn file suitable to be read and used.

Comes out like this:

[Event "Computer Chess Test Suite"]
[Site "EPD2diag V1.5"]
[Date "2018.08.28"]
[Round "?"]
[White "?"]
[Black "Qe3"]
[Result "*"]
[SetUp "1"]
[FEN "1k1r2nr/1pp1bpp1/p1p2q2/4p2p/4P1b1/3P1N1P/PPPNQPP1/R1B1R1K1 w - - acd 36; 0 1"]

1.*
There will be no other way. All tools which convert epd to pgn create the pgn headers and a fen tag.
It is (nearly) impossible to construct a pgn which contains all possible moves until the final epd position
due to bazillions of transpositions.

Normally all programs, which read pgn should read the one you showed above.
Are you sure ChessGUI cannot read above valid pgn example?
Doesn't seem to.
Graham,

Try this "pgn" with out the move 1.:

Code: Select all

[Event "Computer Chess Test Suite"]
[Site "EPD2diag V1.5"]
[Date "2018.08.28"]
[Round "?"]
[White "?"]
[Black "Qe3"]
[Result "*"]
[FEN "1k1r2nr/1pp1bpp1/p1p2q2/4p2p/4P1b1/3P1N1P/PPPNQPP1/R1B1R1K1 w - - 0 1"]
[SetUp "1"]

*
MikeB

User avatar
Graham Banks
Posts: 33974
Joined: Sun Feb 26, 2006 9:52 am
Location: Auckland, NZ

Re: Popular opening books

Post by Graham Banks » Fri Aug 31, 2018 1:44 am

MikeB wrote:
Fri Aug 31, 2018 1:34 am
Graham,

Try this "pgn" with out the move 1.:

Code: Select all

[Event "Computer Chess Test Suite"]
[Site "EPD2diag V1.5"]
[Date "2018.08.28"]
[Round "?"]
[White "?"]
[Black "Qe3"]
[Result "*"]
[FEN "1k1r2nr/1pp1bpp1/p1p2q2/4p2p/4P1b1/3P1N1P/PPPNQPP1/R1B1R1K1 w - - 0 1"]
[SetUp "1"]

*
MikeB
Thanks for the suggestion. I'll give it a try shortly and report back.
My email addresses:
gbanksnz at gmail.com
gbanksnz at yahoo.co.nz

Ferdy
Posts: 4235
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Popular opening books

Post by Ferdy » Fri Aug 31, 2018 2:02 am

Graham Banks wrote:
Tue Aug 28, 2018 9:37 pm
Guenther wrote:
Tue Aug 28, 2018 9:15 am
Hmmm can you try this one below?
This is done with a little macro and yace epdtest utility which also creates valid pgn.
I noticed though that it does not produce the 'Setup' tag and still I could load it in all GUIs
I tested e.g. LucasChess, WB, etc.
(note that it is created from the popbooksmi-epd mentioned above)

http://rwbc-chess.de/Downloads/popbkm.zip

You can see that even the pgn generator from talkchess can read it :)
(I added the first three games from the pgn)
This means if ChessGUI cannot read it this time I am running out of ideas.
ChessGUI still can't produce a cgb book from this file.
Ferdy's explanation of how to use the epd2pgn tool in ChessGUI seems to be working, but it is going to take many hours before I report success.
According to readme, the game in pgn must have results tag 1-0, or 1/2-1/2 or 0-1. Perhaps this is the issue.
Creating Books from Pgn Files
=============================
ChsGUI_Book.cgb in GUI_DATA directory is ChessGUI's remis opening book.
ChsGUI_Book.bk3 in GUI_DATA directory is ChessGUI's main GUI opening book.
Save these 2 files in some safe place to avoid accidentally overwriting them
during book creation. The "Borrow main GUI Book" option in
[Engines ...\Edit Engine ...] permits an engine to use ChsGUI_Book.bk3 as its
own opening book.
Instead of borrowing this main book, let us now create a private book:
1.) Miscellaneous ... / Utilities ... / Create ChessGUI Book ...
2.) Browse for a Pgn input file
3.) Browse for location to put private B/W GUI Book
4.) Choose whether to create new books or append or none
5.) Set number of half moves to read from each Pgn game
6.) If Pgn file is last Pgn file, check the "Last Pgn" checkbox, otherwise
uncheck it.
7.) Click "Create Books" and wait
8.) If necessary, repeat 2,4,5,6,7
You choose "create new book" only for first pgn file and "Last Pgn" only for last.
The games in pgn file are expected to have result tags (1-0, 0-1, 1/2-1/2).
To use this newly created engine book, check "has a private GUI Book" in
[Engines ...\Edit Engine ...] and save options with
"Save engine options". Secondly, choose the book file in engine installation
window.
For a game to be played from a pgn start position, both engines must be able
to use GUI remis book also.
The book with equal chances for black and white is automatically named
ChsGUI_Book.cgb during creation. After creation, it can be manually renamed
but name must end with ".cgb". Only games that end as remis "1/2-1/2" are
considered for this book.

User avatar
Graham Banks
Posts: 33974
Joined: Sun Feb 26, 2006 9:52 am
Location: Auckland, NZ

Re: Popular opening books

Post by Graham Banks » Fri Aug 31, 2018 2:45 am

Ferdy wrote:
Fri Aug 31, 2018 2:02 am
According to readme, the game in pgn must have results tag 1-0, or 1/2-1/2 or 0-1. Perhaps this is the issue.
Creating Books from Pgn Files
=============================
ChsGUI_Book.cgb in GUI_DATA directory is ChessGUI's remis opening book.
ChsGUI_Book.bk3 in GUI_DATA directory is ChessGUI's main GUI opening book.
Save these 2 files in some safe place to avoid accidentally overwriting them
during book creation. The "Borrow main GUI Book" option in
[Engines ...\Edit Engine ...] permits an engine to use ChsGUI_Book.bk3 as its
own opening book.
Instead of borrowing this main book, let us now create a private book:
1.) Miscellaneous ... / Utilities ... / Create ChessGUI Book ...
2.) Browse for a Pgn input file
3.) Browse for location to put private B/W GUI Book
4.) Choose whether to create new books or append or none
5.) Set number of half moves to read from each Pgn game
6.) If Pgn file is last Pgn file, check the "Last Pgn" checkbox, otherwise
uncheck it.
7.) Click "Create Books" and wait
8.) If necessary, repeat 2,4,5,6,7
You choose "create new book" only for first pgn file and "Last Pgn" only for last.
The games in pgn file are expected to have result tags (1-0, 0-1, 1/2-1/2).
To use this newly created engine book, check "has a private GUI Book" in
[Engines ...\Edit Engine ...] and save options with
"Save engine options". Secondly, choose the book file in engine installation
window.
For a game to be played from a pgn start position, both engines must be able
to use GUI remis book also.
The book with equal chances for black and white is automatically named
ChsGUI_Book.cgb during creation. After creation, it can be manually renamed
but name must end with ".cgb". Only games that end as remis "1/2-1/2" are
considered for this book.
Thanks Ferdy. Will try this too.
My email addresses:
gbanksnz at gmail.com
gbanksnz at yahoo.co.nz

User avatar
Graham Banks
Posts: 33974
Joined: Sun Feb 26, 2006 9:52 am
Location: Auckland, NZ

Re: Popular opening books

Post by Graham Banks » Fri Aug 31, 2018 3:01 am

Still no luck Ferdy and Mike.
Meantime the epd2pgn conversion is approaching 80%. :)
My email addresses:
gbanksnz at gmail.com
gbanksnz at yahoo.co.nz

User avatar
Graham Banks
Posts: 33974
Joined: Sun Feb 26, 2006 9:52 am
Location: Auckland, NZ

Re: Popular opening books

Post by Graham Banks » Fri Aug 31, 2018 8:33 pm

Here is the PGN that ChessGUI produced plus the cgb book created from it.
Only 72 lines found using the TWIC2018 pgn, which has almost 2 million games.
Popbooks-MiLo.7z
PGN file plus cgb book
(18.14 KiB) Downloaded 66 times
My email addresses:
gbanksnz at gmail.com
gbanksnz at yahoo.co.nz

User avatar
Graham Banks
Posts: 33974
Joined: Sun Feb 26, 2006 9:52 am
Location: Auckland, NZ

Re: Popular opening books

Post by Graham Banks » Fri Aug 31, 2018 8:41 pm

This is the format produced by ChessGUI:

[Event "Third World War"]
[Site "ChessGUI"]
[Date "????.??.??"]
[Round "?"]
[White "?"]
[Black "?"]
[Result "*"]
[WhiteElo "2518"]
[BlackElo "2713"]
[Variant "normal"]

1.e4 e5 2.Nf3 Nc6 3.Bb5 g6 *
My email addresses:
gbanksnz at gmail.com
gbanksnz at yahoo.co.nz

Jonathan003
Posts: 114
Joined: Fri Jul 06, 2018 2:23 pm
Full name: Jonathan Cremers

Re: Popular opening books

Post by Jonathan003 » Sat Jan 04, 2020 5:08 am

It seems Chessgui has the tool.

Image

Try to find a big pgn file as your Pgn Input File. Every pos in epd file will be searched in the input pgn file. If it is there it will save the moves in sequence in pgn format. If not found it will still save in pgn format but using the FEN Tag as was used in epdconvert.
[Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "2834"]
[White "?"]
[Black "?"]
[Result "*"]
[SetUp "1"]
[FEN "r2qkbnr/1pp2pp1/p1p5/4p2p/4P1b1/5N1P/PPPP1PP1/RNBQ1RK1 w kq - 0 1"]

*

[Event "Third World War"]
[Site "ChessGUI"]
[Date "????.??.??"]
[Round "?"]
[White "?"]
[Black "?"]
[Result "*"]
[WhiteElo "2740"]
[BlackElo "2775"]
[Variant "normal"]

1.e4 c6 2.d4 d5 3.Nd2 dxe4 4.Nxe4 Nd7 *
Top
User avatarGraham Banks
Posts: 33358
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ
Contact: Contact Graham Banks
Re: Popular opening books
Post by Graham Banks » Tue Aug 28, 2018 11:21 pm

Ferdy wrote: ↑Tue Aug 28, 2018 12:43 pm
Graham Banks wrote: ↑Tue Aug 28, 2018 11:44 am
No luck using the epdConvert tool.
Perhaps Dann could just provide a PGN in addition to the epd.
It seems Chessgui has the tool.

Image

Try to find a big pgn file as your Pgn Input File. Every pos in epd file will be searched in the input pgn file. If it is there it will save the moves in sequence in pgn format. If not found it will still save in pgn format but using the FEN Tag as was used in epdconvert.
[Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "2834"]
[White "?"]
[Black "?"]
[Result "*"]
[SetUp "1"]
[FEN "r2qkbnr/1pp2pp1/p1p5/4p2p/4P1b1/5N1P/PPPP1PP1/RNBQ1RK1 w kq - 0 1"]

*

[Event "Third World War"]
[Site "ChessGUI"]
[Date "????.??.??"]
[Round "?"]
[White "?"]
[Black "?"]
[Result "*"]
[WhiteElo "2740"]
[BlackElo "2775"]
[Variant "normal"]

1.e4 c6 2.d4 d5 3.Nd2 dxe4 4.Nxe4 Nd7 *
Thanks Ferdy. I was unsure how to use the PGN input for this.
I am giving it a go now and it seems to be working okay. :)
Can I get a download link please for this epd2pgn tool? It isn't included in the latest version of ChessGue 0.25m

Norm Pollock
Posts: 1024
Joined: Thu Mar 09, 2006 3:15 pm
Location: Long Island, NY, USA
Contact:

Re: Popular opening books

Post by Norm Pollock » Sun Jan 05, 2020 3:04 am

Without changing any data, I made an edited version of the popbooks files. I combined the 3 files. I removed most of the opcodes, only keeping ce and pv. I re-ordered the records by descending ce value. I inserted id's. And then I made 2 "pgn" versions, one with the pv moves, and one without.

http://www.mediafire.com/file/j2higjff4 ... im.7z/file

the files in the compressed download are:

p04.epd -- an edited version of the 3 popbook files combined
p04.pgn -- a pgn version of p04.epd with FEN and additional moves from the pv opcode
p04a.pgn -- a pgn version of p04.epd with FEN but without any additional moves
It is not the strongest of the species that survive, nor the most intelligent, but the one most responsive to change. -- Charles Darwin

Post Reply