From: candirufish <38038147+candirufish@users.noreply.github.com> Date: Tue, 7 Jun 2022 05:21:43 +0000 (+0200) Subject: Use qsearch on step 11 if depth is equal to or below 0 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=00297cfef0ad604a61aaff2747dea029fa6aa733;p=stockfish Use qsearch on step 11 if depth is equal to or below 0 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 --- diff --git a/src/search.cpp b/src/search.cpp index ea1e63fe..17ac05c4 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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(pos, ss, alpha, beta); + + if ( cutNode + && depth >= 8 && !ttMove) depth--;