]> git.sesse.net Git - stockfish/commitdiff
Use qsearch on step 11 if depth is equal to or below 0
authorcandirufish <38038147+candirufish@users.noreply.github.com>
Tue, 7 Jun 2022 05:21:43 +0000 (07:21 +0200)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Tue, 7 Jun 2022 06:34:14 +0000 (08:34 +0200)
larger reduction of depth if no TT entry is found, and go in qsearch as needed.

stc:
https://tests.stockfishchess.org/tests/view/629dfacd593a4a9b6482db72
LLR: 2.93 (-2.94,2.94) <0.00,2.50>
Total: 31920 W: 8591 L: 8322 D: 15007
Ptnml(0-2): 127, 3551, 8376, 3738, 168

ltc:
https://tests.stockfishchess.org/tests/view/629e304e593a4a9b6482e451
LLR: 2.95 (-2.94,2.94) <0.50,3.00>
Total: 17488 W: 4842 L: 4614 D: 8032
Ptnml(0-2): 13, 1670, 5151, 1896, 14

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

Bench: 5870283

src/search.cpp

index ea1e63fea0a869a3dcd7abc0315aadc1033c77d9..17ac05c4c9a71ef17b383126cfd425d356897a1a 100644 (file)
@@ -908,14 +908,17 @@ namespace {
          ss->ttPv = ttPv;
     }
 
-    // Step 11. If the position is not in TT, decrease depth by 2 or 1 depending on node type (~3 Elo)
-    if (   PvNode
-        && depth >= 3
+    // Step 11. If the position is not in TT, decrease depth by 3.
+    // Use qsearch if depth is equal or below zero (~4 Elo)
+    if (    PvNode
         && !ttMove)
-        depth -= 2;
+        depth -= 3;
 
-    if (   cutNode
-        && depth >= 8
+    if (depth <= 0)
+        return qsearch<PV>(pos, ss, alpha, beta);
+
+    if (    cutNode
+        &&  depth >= 8
         && !ttMove)
         depth--;