]> git.sesse.net Git - stockfish/commitdiff
Remove extraReduction
authorMinetaS <skdty87@gmail.com>
Fri, 7 Apr 2023 14:30:59 +0000 (14:30 +0000)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Mon, 10 Apr 2023 07:28:37 +0000 (09:28 +0200)
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

index 5d54a15d628070707d6f08db5b7e6483635b3d27..4463b42aaed89e51aa561e81b30419b4abe62104 100644 (file)
@@ -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;