|
io-chess
UCI chess engine
|
Abstract interface for evaluators. More...
#include <IEvaluator.h>

Public Member Functions | |
| virtual | ~IEvaluator ()=default |
| virtual float | evaluate (const Board &board, int ply=0)=0 |
| Evaluates the board from the perspective of the side to move. | |
| virtual WDLConverter::WDL | evaluateWDL (const Board &board, int ply=0) |
| Evaluates the board and returns Win/Draw/Loss probabilities. | |
| virtual float | evaluate (const ChessInput &input) |
| Evaluates the position using pre-computed features. | |
| virtual void | setAggression (float aggression) |
| Sets the contempt or aggression factor for the evaluator. | |
| virtual void | setEvalScale (int base, int weight) |
| Sets the scaling parameters for the evaluation score. | |
| virtual void | setEvalNormalization (bool enable) |
| Enables or disables dynamic evaluation normalization. | |
| virtual void | setIncrementalRebuildInterval (int interval) |
| Sets the interval for forcing full feature rebuilds (to correct accumulation errors). | |
| virtual uint64_t | getFullRebuilds () const |
| Retrieves the number of full feature rebuilds performed (for profiling). | |
Abstract interface for evaluators.
Implementations of this interface are responsible for providing static evaluations of chess positions, translating them into centipawn scores or Win/Draw/Loss probabilities.
|
virtualdefault |
|
pure virtual |
Evaluates the board from the perspective of the side to move.
| board | The current chess board state. |
| ply | The current depth from the root of the search (used for scaling). |
Implemented in BatchEvalContext, EvalContextMoECache, and SimpleEvalContext.

|
inlinevirtual |
Evaluates the position using pre-computed features.
This is an optional optimization path for evaluators that utilize incremental feature extraction (like MoE neural networks).
| input | The pre-extracted neural network features. |
Reimplemented in BatchEvalContext.
|
inlinevirtual |
Evaluates the board and returns Win/Draw/Loss probabilities.
| board | The current chess board state. |
| ply | The current depth from the root of the search. |
Reimplemented in EvalContextMoECache.
|
inlinevirtual |
Retrieves the number of full feature rebuilds performed (for profiling).
Reimplemented in EvalContextMoECache.
|
inlinevirtual |
Sets the contempt or aggression factor for the evaluator.
| aggression | The aggression factor (positive encourages risk, negative encourages draws). |
Reimplemented in EvalContextMoECache.
|
inlinevirtual |
Enables or disables dynamic evaluation normalization.
| enable | True to enable normalization, false to use raw scores. |
Reimplemented in EvalContextMoECache.
|
inlinevirtual |
Sets the scaling parameters for the evaluation score.
| base | The base scaling divisor. |
| weight | The material weight scaling factor. |
Reimplemented in EvalContextMoECache.
|
inlinevirtual |
Sets the interval for forcing full feature rebuilds (to correct accumulation errors).
| interval | The number of incremental updates before forcing a rebuild. |
Reimplemented in EvalContextMoECache.