|
BenBot 1.7.5
A chess engine
|
#include <libbenbot/data-structures/HistoryTable.hpp>
Public Member Functions | |
| void | age () noexcept |
| void | clear () noexcept |
| auto | get (const bool whiteToMove, const Move move) const noexcept -> int |
| void | update (const bool whiteToMove, const Move move, const int bonus) noexcept |
Static Public Attributes | |
| static constexpr auto | MAX_SCORE { 16384 } |
This structure stores history heuristic scores for quiet moves. Scores are indexed by side to move and the move's from & to squares. Moves that cause beta cutoffs get a bonus, and the quiet moves that were searched before them get a penalty.
Definition at line 38 of file HistoryTable.hpp.
|
inlinenoexcept |
Halves all the stored scores. This is called at the start of each search, so that scores from previous searches still count, but less than new ones.
Definition at line 49 of file HistoryTable.hpp.
|
inlinenoexcept |
Clears all the stored scores.
Definition at line 43 of file HistoryTable.hpp.
|
inlinenodiscardnoexcept |
Returns the score for the given move.
Definition at line 66 of file HistoryTable.hpp.
|
inlinenoexcept |
Applies a bonus (or penalty, if negative) to the given move's score. This uses the "history gravity" formula, which keeps scores within [-MAX_SCORE, MAX_SCORE].
Definition at line 60 of file HistoryTable.hpp.
|
staticconstexpr |
The maximum absolute value of any score in the table.
Definition at line 40 of file HistoryTable.hpp.