Skip to content

Add polyglot book writing - #1232

Open
noobpwnftw wants to merge 1 commit into
niklasf:mainfrom
noobpwnftw:polyglot-writer
Open

noobpwnftw wants to merge 1 commit into
niklasf:mainfrom
noobpwnftw:polyglot-writer

Conversation

@noobpwnftw

Copy link
Copy Markdown
Contributor

For #876, the writing part: make_entry() encodes a move in a position as a book entry, and write_book() writes entries sorted by position, then by weight, highest first, as Polyglot does. Building books from games or merging them is policy left to the caller (the docstring shows building one from a game's moves).

Pawn drops raise ValueError: the drop encoding the reader uses has no slot for a pawn.

make_entry() encodes a move in a position as a book entry, and
write_book() writes entries sorted by position, then by weight, highest
first. Choosing and weighting entries is up to the caller.
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