diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 4e895fd3..44890a36 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -85,6 +85,9 @@ Value Eval::evaluate(const Eval::NNUE::Networks& networks, int material = 554 * pos.count() + pos.non_pawn_material(); v = (nnue * (73921 + material) + optimism * (8112 + material)) / 73260; + // Evaluation grain (to get more alpha-beta cuts) with randomization (for robustness) + v = (v / 16) * 16 - 1 + (pos.key() & 0x2); + // Damp down the evaluation linearly when shuffling v -= v * pos.rule50_count() / 212;