|
BenBot 1.7.5
A chess engine
|
#include <libbenbot/eval/Score.hpp>
Public Types | |
| using | LibchessScore = chess::uci::printing::SearchInfo::Score |
Public Member Functions | |
| constexpr | operator Value () const noexcept |
| constexpr auto | operator- () const noexcept -> Score |
| auto | to_libchess () const noexcept -> LibchessScore |
| constexpr auto | to_tt (size_t plyFromRoot) const noexcept -> Value |
Mate queries | |
| auto | is_mate () const noexcept -> bool |
| constexpr auto | is_winning_mate () const noexcept -> bool |
| constexpr auto | is_losing_mate () const noexcept -> bool |
| auto | ply_to_mate () const noexcept -> size_t |
Static Public Member Functions | |
| static constexpr auto | from_tt (Value eval, size_t plyFromRoot) noexcept -> Score |
| static constexpr auto | mate (const size_t plyFromRoot) noexcept -> Score |
Public Attributes | |
| Value | value { UINT16_C(0) } |
An evaluation score. This is essentially a wrapper around an integer value, with a few helper methods.
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardnoexcept |
|
inlinenodiscardconstexprnoexcept |
|
inlinestaticnodiscardconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |
|
nodiscardconstexprnoexcept |
Returns a value suitable for storing in the transposition table. During search, mate scores are based on ply from the root position; this function converts mate scores to be relative to the node being stored (at plyFromRoot), so that the mate distance is preserved when the entry is probed at a different ply.
| Value ben_bot::eval::Score::value { UINT16_C(0) } |