Manages loading and probing of Polyglot opening books.
More...
#include <polyglot_book.hpp>
|
| | PolyglotBook (const std::string &book_path) |
| | Constructs a PolyglotBook instance.
|
| | ~PolyglotBook () |
| bool | load () |
| | Loads the book into memory.
|
| chess::Move | probe (const chess::Board &board, const std::string &bookName="Book") |
| | Probes the book for a move matching the current board state.
|
Manages loading and probing of Polyglot opening books.
◆ PolyglotBook()
| PolyglotBook::PolyglotBook |
( |
const std::string & | book_path | ) |
|
◆ ~PolyglotBook()
| PolyglotBook::~PolyglotBook |
( |
| ) |
|
◆ compute_polyglot_key()
| uint64_t PolyglotBook::compute_polyglot_key |
( |
const chess::Board & | board | ) |
const |
|
private |
◆ load()
| bool PolyglotBook::load |
( |
| ) |
|
Loads the book into memory.
- Returns
- true if successful, false if the file could not be read.
◆ polyglot_to_move()
| chess::Move PolyglotBook::polyglot_to_move |
( |
uint16_t | poly_move, |
|
|
const chess::Board & | board ) const |
|
private |
◆ probe()
| chess::Move PolyglotBook::probe |
( |
const chess::Board & | board, |
|
|
const std::string & | bookName = "Book" ) |
Probes the book for a move matching the current board state.
Moves are selected probabilistically based on their relative weights.
- Parameters
-
| board | The chess board to probe. |
| bookName | Optional name for logging purposes. |
- Returns
- The selected move, or NO_MOVE if no match is found.
◆ book_path_
| std::string PolyglotBook::book_path_ |
|
private |
◆ entries_
The documentation for this class was generated from the following files: