|
BenBot 1.7.5
A chess engine
|
Files | |
| file | ContinuationHistory.hpp |
| file | HistoryGravity.hpp |
| file | HistoryTable.hpp |
| file | KillerMoves.hpp |
| file | PawnTable.hpp |
| file | SearchStack.hpp |
| file | TranspositionTable.hpp |
Classes | |
| struct | ben_bot::ContinuationHistory |
| struct | ben_bot::HistoryTable |
| struct | ben_bot::KillerMoves |
| struct | ben_bot::PawnEntry |
| class | ben_bot::PawnTable |
| struct | ben_bot::SearchStack |
| struct | ben_bot::SearchStackEntry |
| class | ben_bot::TranspositionTable |
| struct | ben_bot::TTData |
Enumerations | |
| enum class | ben_bot::EvalType : std::uint_least8_t { ben_bot::EvalType::Exact , ben_bot::EvalType::Alpha , ben_bot::EvalType::Beta } |
Functions | |
| template<std::integral Entry> | |
| void | ben_bot::apply_history_gravity (Entry &entry, const int bonus, const int maxScore) noexcept |
| auto | is_improving (const SearchStackEntry *const entry) noexcept -> bool |
Data structures used by BenBot's search algorithm.
|
strong |
This enumeration defines types of evaluation values that different nodes in the search tree may be assigned.
| Enumerator | |
|---|---|
| Exact | Indicates that the evaluation value is an exact evaluation. This also indicates that this is a PV node. |
| Alpha | Indicates that the evaluation value is a maximum evaluation; for example, if eval is 16, this means that the evaluation of this node was at most 16. |
| Beta | Indicates that the evaluation is a minimum evaluation; for example, if eval is 16, this means that the evaluation of this node was at least 16. |
Definition at line 55 of file TranspositionTable.hpp.
|
noexcept |
Applies a bonus (or penalty, if negative) to a history heuristic score.
This uses the "history gravity" formula: the bonus is first clamped to [-maxScore, maxScore], and then it's scaled down the closer the score already is to the limit in the bonus's direction. So a score that starts within [-maxScore, maxScore] always stays within it.
The maths is done in int and then narrowed, so this can be used with smaller entry types too, as long as they can hold maxScore.
Definition at line 44 of file HistoryGravity.hpp.
|
Returns true if the given node's static eval is better than it was at the same side's previous turn, i.e. the node 2 plies earlier on the search path.
The comparison is strict, so a node whose eval hasn't changed isn't improving.
The entry must be in a SearchStack at or after the root, so that the 4 entries before it are valid (they may be sentinels).
Definition at line 118 of file SearchStack.hpp.