#include <libbenbot/data-structures/TranspositionTable.hpp>
The transposition table data structure.
Definition at line 91 of file TranspositionTable.hpp.
◆ ProbedEval
Represents a probed evaluation from the table. This is a pair of the evaluation value and the value type.
Definition at line 114 of file TranspositionTable.hpp.
◆ TranspositionTable() [1/3]
| ben_bot::TranspositionTable::TranspositionTable |
( |
const size_t | initialSize = 16uz | ) |
|
|
inlineexplicit |
◆ ~TranspositionTable()
| ben_bot::TranspositionTable::~TranspositionTable |
( |
| ) |
|
|
inline |
◆ TranspositionTable() [2/3]
| ben_bot::TranspositionTable::TranspositionTable |
( |
const TranspositionTable & | | ) |
|
|
delete |
◆ TranspositionTable() [3/3]
| ben_bot::TranspositionTable::TranspositionTable |
( |
TranspositionTable && | other | ) |
|
|
noexcept |
◆ clear()
| void ben_bot::TranspositionTable::clear |
( |
| ) |
|
Clears the contents of the table. Note that no memory is freed.
◆ find()
| auto ben_bot::TranspositionTable::find |
( |
const Position & | pos | ) |
const -> std::optional< TTData > |
|
nodiscard |
Retrieves the stored record for the given position, or nullopt if the given position isn't in the table.
◆ get_best_response()
| auto ben_bot::TranspositionTable::get_best_response |
( |
const Position & | pos, |
|
|
Move | move ) const -> std::optional< Move > |
|
nodiscard |
Returns the opponent's best response to the given move, if one is recorded.
◆ hashfull()
| auto ben_bot::TranspositionTable::hashfull |
( |
| ) |
const -> size_t |
|
nodiscard |
Returns an estimate of the percentage of entries (permille) that have been written to during this search.
◆ new_search()
| void ben_bot::TranspositionTable::new_search |
( |
| ) |
|
|
noexcept |
This must be called at the beginning of a new search to keep track of entry aging.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ prefetch()
| void ben_bot::TranspositionTable::prefetch |
( |
const Position & | pos | ) |
const |
|
noexcept |
Hints to the CPU to prefetch the memory bucket containing data for the given position. This function returns immediately.
◆ probe_eval()
Similar to find(), this function instead probes for an evaluation value of the given position, searched to at least the given depth and honoring the given search bounds.
Returns pair of the evaluation value and the value type.
◆ resize()
| void ben_bot::TranspositionTable::resize |
( |
size_t | sizeMB | ) |
|
Resizes the table to a given size in megabytes.
- Exceptions
-
| std::bad_alloc | An exception is thrown if sizeMB is 0 or if the allocation fails. |
◆ store()
| void ben_bot::TranspositionTable::store |
( |
const Position & | pos, |
|
|
const TTData & | record ) |
Stores a record for a given position.
The documentation for this class was generated from the following file: