#pragma once #include "position.h" namespace rigby::eval { // Value: the network trained on Lc0 data, behind a capture-only quiescence // search. Policy: move heuristics until a policy network exists. void init(); // Static evaluation (the value network) in centipawns, side to move's view. int static_eval(const Position& pos); // Static exchange evaluation: true when the exchange `m` starts on its target // square gains at least `threshold` centipawns for the side to move (pins ignored). bool see_ge(const Position& pos, Move m, int threshold); // Capture-only search on top of the static evaluation, side to move's view. int quiescence(const Position& pos, int alpha, int beta, int ply); // Expected score in [-1, 1] for the side to move. float value(const Position& pos); // Writes softmax-normalised priors for `moves` into `out`. void policy(const Position& pos, const MoveList& moves, float temperature, float* out); // Conversion between centipawns and Q in [-1, 1]. One scale for both directions, // so reported scores match what the search actually optimises. float cp_to_q(int cp); int q_to_cp(float q); } // namespace rigby::eval