From 7258567804ccd0730d7c309f150d96c8f6c3816d Mon Sep 17 00:00:00 2001 From: Stefan Geschwentner Date: Sat, 8 Feb 2025 20:17:47 +0100 Subject: [PATCH] Refactor reduction rules Refactor reduction rules so that all ttPv/Pv related stuff is in one rule and the scaling becomes more clear. No functional change closes https://github.com/official-stockfish/Stockfish/pull/5871 No functional change --- src/search.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index be511791..4dfdbaaf 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1158,10 +1158,8 @@ moves_loop: // When in check, search starts here // Decrease reduction for PvNodes (*Scaler) if (ss->ttPv) - r -= 2230 + (ttData.value > alpha) * 925 + (ttData.depth >= depth) * 971; - - if (PvNode) - r -= 1013; + r -= 2230 + PvNode * 1013 + (ttData.value > alpha) * 925 + + (ttData.depth >= depth) * (971 + cutNode * 1159); // These reduction adjustments have no proven non-linear scaling @@ -1171,7 +1169,7 @@ moves_loop: // When in check, search starts here // Increase reduction for cut nodes if (cutNode) - r += 2608 - (ttData.depth >= depth && ss->ttPv) * 1159; + r += 2608; // Increase reduction if ttMove is a capture but the current move is not a capture if (ttCapture && !capture)