]> git.sesse.net Git - stockfish/commitdiff
Reduce depth after score improvement at PV nodes
authorStéphane Nicolet <cassio@free.fr>
Wed, 4 May 2022 05:39:23 +0000 (07:39 +0200)
committerStéphane Nicolet <cassio@free.fr>
Wed, 4 May 2022 05:47:56 +0000 (07:47 +0200)
STC:
LLR: 2.95 (-2.94,2.94) <0.00,2.50>
Total: 73760 W: 19590 L: 19244 D: 34926
Ptnml(0-2): 285, 8352, 19292, 8634, 317
https://tests.stockfishchess.org/tests/view/626eb2dc9116b52aa83b73da

LTC:
LLR: 2.93 (-2.94,2.94) <0.50,3.00>
Total: 114400 W: 30561 L: 30111 D: 53728
Ptnml(0-2): 68, 11432, 33785, 11812, 103
https://tests.stockfishchess.org/tests/view/626f730859e9c431e0b10b21

closes https://github.com/official-stockfish/Stockfish/pull/4008

bench: 6174823

src/search.cpp

index 70b852f35a830e7f111b10571b61574759719424..c12b60e6815fc7209ddaae90ba5265fa67615b07 100644 (file)
@@ -1300,7 +1300,18 @@ moves_loop: // When in check, search starts here
                   update_pv(ss->pv, move, (ss+1)->pv);
 
               if (PvNode && value < beta) // Update alpha! Always alpha < beta
+              {
                   alpha = value;
+
+                  // Reduce other moves if we have found at least one score improvement
+                  if (   depth > 2
+                      && depth < 7
+                      && beta  <  VALUE_KNOWN_WIN
+                      && alpha > -VALUE_KNOWN_WIN)
+                     depth -= 1;
+
+                  assert(depth > 0);
+              }
               else
               {
                   ss->cutoffCnt++;