Skip to content

Fix zero byte book produced by "polyglot make-book"#3

Open
selliott512 wants to merge 2 commits into
sshivaji:masterfrom
selliott512:fix-zero-byte-make-book
Open

Fix zero byte book produced by "polyglot make-book"#3
selliott512 wants to merge 2 commits into
sshivaji:masterfrom
selliott512:fix-zero-byte-make-book

Conversation

@selliott512

Copy link
Copy Markdown

I don't quite understand the intent of the commit in question, but I do know that it breaks polyglot make-book in latest master, which means that polyglot make-book is broken in at least Fedora 33.

To reproduce:

polyglot make-book -pgn fools-mate.pgn -bin fools-mate.bin -min-game 1

which produces a 80 byte file with this fix, and zero byte otherwise. The problem has to do with entries incorrectly being filtered. Consider these two output lines in the 80 byte fixed case:

filtering entries ...
5 entries.

and in the zero byte broken case:

filtering entries ...
0 entries.

This merge request probably isn't suitable as is, but it's at least a starting point for people trying to figure out polyglot make-book on Linux.

Also, I included a .gitignore - all of the *.o files show up as untracked files otherwise.

The fools-mate.pgn mentioned above:

[Event "Black wins"]
[Site "cube"]
[Date "2020.12.15"]
[Round "-"]
[White "-"]
[Black "-"]
[Result "0-1"]

1. f3 e6 2. g4 Qh4# 0-1

[Event "White wins"]
[Site "cube"]
[Date "2020.12.15"]
[Round "-"]
[White "-"]
[Black "-"]
[Result "1-0"]

1. e4 f6 2. d4 g5 3. Qh5# 1-0

This reverts commit e5a9f1a.

Revert this revert because it produces zero byte books when
"polyglot make-book ..." is used.
@selliott512 selliott512 changed the title Fix zero byte book produces by "polyglot make-book" Fix zero byte book produced by "polyglot make-book" Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant