This subsystem provides opening libraries and implements the Polyglot opening book format. This format is currently the only one available, which is not proprietary. Corresponding book files and associated tools are freely available on the Internet.
The Opening subsystem provides its functionality via the Java interface
org.dokchess.opening.OpeningLibrary.
The class org.dokchess.opening.polyglot.PolyglotOpeningBook provides one possible implementation.
Fig.: Schnittstelle Eroeffnungsbibliothek, Implementierung PolyglotOpeningBook
Method | Short description |
---|---|
lookUpMove | Returns a standard move for the specified position from the library, or null. |
Table: Methods of the interface OpeningLibrary |
The PolyglotOpeningBook class is an adapter for the Polyglot opening book file format. Implementation of OpeningLibrary that reads a binary file in the appropriate format and returns a move to the specified position, if the library contains any.
Method | Short description |
---|---|
PolyglotOpeningBook | Constructor, expects the input file. |
setSelectionMode | Sets the mode to select a move, if there is more than one candidate in the library for the given position. |
Table: Methods of the class PolyglotOpeningBook (in addition to interface OpeningLibrary): |
→ Concept 8.2 Chess Domain Model describes the types used in the interface as call and return parameters (Move, Position).
The implementation, unit tests and test data for the Polyglot file format are located below the packages
org.dokchess.opening…