From a5643b89fda5060d4b40dff54afe02816c899dd4 Mon Sep 17 00:00:00 2001 From: MinetaS Date: Fri, 7 Apr 2023 14:30:59 +0000 Subject: [PATCH] Remove extraReduction Since bestValue becomes value and beta - alpha is always non-negative, extraReduction is always false, hence it has no effect. This patch includes small changes to improve readability. closes https://github.com/official-stockfish/Stockfish/pull/4505 No functional change --- src/search.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 5d54a15d..4463b42a 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1335,15 +1335,14 @@ moves_loop: // When in check, search starts here if (PvNode && value < beta) // Update alpha! Always alpha < beta { - // Reduce other moves if we have found at least one score improvement (~1 Elo) if ( depth > 1 - && ((improving && complexity > 971) || (value < (5 * alpha + 75 * beta) / 87) || depth < 6) + && ( (improving && complexity > 971) + || value < (5 * alpha + 75 * beta) / 87 + || depth < 6) && beta < 12535 - && value > -12535) { - bool extraReduction = depth > 2 && alpha > -12535 && bestValue != -VALUE_INFINITE && (value - bestValue) > (7 * (beta - alpha)) / 8; - depth -= 1 + extraReduction; - } + && value > -12535) + depth -= 1; assert(depth > 0); alpha = value; -- 2.39.2