|
BenBot 1.7.5
A chess engine
|
#include <libbenbot/eval/Weights.hpp>
Public Member Functions | |
| constexpr auto | get (const Term term, const size_t index=0uz) const noexcept -> TaperedScore |
| constexpr auto | get (const Term term, const size_t index=0uz) noexcept -> TaperedScore & |
| constexpr auto | material (const PieceType type) const noexcept -> TaperedScore |
| constexpr auto | of_term (const Term term) const noexcept -> std::span< const TaperedScore > |
| constexpr auto | operator== (const Weights &) const noexcept -> bool=default |
| constexpr auto | pst (const PieceType type) const noexcept -> std::span< const TaperedScore, chess::board::NUM_SQUARES > |
| constexpr auto | pst (const PieceType type) noexcept -> std::span< TaperedScore, chess::board::NUM_SQUARES > |
| auto | to_cpp () const -> std::string |
Public Attributes | |
| std::array< TaperedScore, NUM_WEIGHTS > | values { } |
All the eval weights, stored in one flat array in the order given by TERMS. The engine's eval uses DEFAULT_WEIGHTS (in DefaultWeights.hpp), and a tuner can treat values as one parameter vector.
Definition at line 209 of file Weights.hpp.
|
inlinenodiscardconstexprnoexcept |
Returns the weight at index within the given term.
Definition at line 214 of file Weights.hpp.
|
inlinenodiscardconstexprnoexcept |
Returns the weight at index within the given term.
Definition at line 222 of file Weights.hpp.
|
inlinenodiscardconstexprnoexcept |
Returns the material value of a pawn, knight, bishop, rook or queen.
Definition at line 236 of file Weights.hpp.
|
inlinenodiscardconstexprnoexcept |
Returns all the weights of the given term.
Definition at line 230 of file Weights.hpp.
|
nodiscardconstexprdefaultnoexcept |
Compares two sets of weights for equality.
|
inlinenodiscardconstexprnoexcept |
Returns the piece square table for the given piece type. Squares are indexed from White's point of view.
Definition at line 244 of file Weights.hpp.
|
inlinenodiscardconstexprnoexcept |
Returns the piece square table for the given piece type. Squares are indexed from White's point of view.
Definition at line 255 of file Weights.hpp.
|
nodiscard |
Returns the C++ source of DefaultWeights.hpp, with these weights as the defaults. A tuner can use this to write out its results.
| std::array<TaperedScore, NUM_WEIGHTS> ben_bot::eval::Weights::values { } |
The weights, in the order given by TERMS.
Definition at line 211 of file Weights.hpp.