Discover Packages
github.com/leonhfr/polyglot
pkg
polyglot
package
Version:
v0.0.0-...-a3cfd58
Opens a new window with list of versions in this module.
Published: Oct 3, 2022
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package polyglot reads and provides an interface to polyglot opening book
files (.bin) and provides an interface to.
Book holds the opening book data.
New returns a new empty Book.
func (b *Book ) Bounds() (min, max int )
Bounds returns the mix and max values of all weights.
Init takes a reader to binary data from Polyglot files (.bin) and
initializes it. It may be called several times with data from
different books and data will be merged. Weights will be returned as is
so it is up to the user to ensures they are consistent across books.
Lookup takes a position and returns a sorted list of weighted moves.
If the position is not found, nil is returned.
WeightedMove is a single weight move. The weight is positive but no
bounds are enforced.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.