1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00

Clamp NNUE evaluation score

No functional change.
This commit is contained in:
Dariusz Orzechowski 2020-07-27 23:14:51 +02:00
parent 6349062d42
commit 7bb14c2489

View file

@ -152,7 +152,10 @@ namespace Eval::NNUE {
// Evaluation function. Perform differential calculation.
Value evaluate(const Position& pos) {
return ComputeScore(pos, false);
Value v = ComputeScore(pos, false);
v = Utility::clamp(v, VALUE_TB_LOSS_IN_MAX_PLY + 1, VALUE_TB_WIN_IN_MAX_PLY - 1);
return v;
}
// Evaluation function. Perform full calculation.