|
BenBot 1.7.5
A chess engine
|
#include <libbenbot/eval/TaperedScore.hpp>
Public Member Functions | |
| constexpr auto | blend (const std::int32_t mgPhase, const std::int32_t maxPhase) const noexcept -> std::int32_t |
| constexpr auto | operator== (const TaperedScore &) const noexcept -> bool=default |
Arithmetic | |
| constexpr auto | operator+ (const TaperedScore &other) const noexcept -> TaperedScore |
| constexpr auto | operator- (const TaperedScore &other) const noexcept -> TaperedScore |
| constexpr auto | operator- () const noexcept -> TaperedScore |
| constexpr auto | operator* (const int factor) const noexcept -> TaperedScore |
| constexpr auto | operator+= (const TaperedScore &other) noexcept -> TaperedScore & |
| constexpr auto | operator-= (const TaperedScore &other) noexcept -> TaperedScore & |
Static Public Member Functions | |
| static constexpr auto | both (const std::int32_t value) noexcept -> TaperedScore |
Public Attributes | |
| std::int32_t | eg { 0 } |
| std::int32_t | mg { 0 } |
A pair of middlegame & endgame evaluation values. Eval terms return one of these, and evaluate() blends the total by game phase once at the end, using only integer math.
Definition at line 32 of file TaperedScore.hpp.
|
inlinenodiscardconstexprnoexcept |
Blends the middlegame & endgame values by game phase. mgPhase must be in the range [0, maxPhase], where maxPhase is the pure middlegame. The result is truncated toward zero.
Definition at line 89 of file TaperedScore.hpp.
|
inlinestaticnodiscardconstexprnoexcept |
Returns a score with the same value in the middlegame & endgame.
Definition at line 40 of file TaperedScore.hpp.
|
inlinenodiscardconstexprnoexcept |
Definition at line 62 of file TaperedScore.hpp.
|
inlinenodiscardconstexprnoexcept |
Definition at line 47 of file TaperedScore.hpp.
|
inlineconstexprnoexcept |
Definition at line 67 of file TaperedScore.hpp.
|
inlinenodiscardconstexprnoexcept |
Definition at line 57 of file TaperedScore.hpp.
|
inlinenodiscardconstexprnoexcept |
Definition at line 52 of file TaperedScore.hpp.
|
inlineconstexprnoexcept |
Definition at line 74 of file TaperedScore.hpp.
|
nodiscardconstexprdefaultnoexcept |
Compares two scores for equality.
| std::int32_t ben_bot::eval::TaperedScore::eg { 0 } |
The endgame value, in centipawns.
Definition at line 37 of file TaperedScore.hpp.
| std::int32_t ben_bot::eval::TaperedScore::mg { 0 } |
The middlegame value, in centipawns.
Definition at line 34 of file TaperedScore.hpp.