From 9eb7b607cf69f6b613c89ae767b7f934f26e59e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ste=CC=81phane=20Nicolet?= Date: Wed, 4 May 2022 07:39:23 +0200 Subject: [PATCH] Reduce depth after score improvement at PV nodes 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 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/search.cpp b/src/search.cpp index 70b852f35a8..c12b60e6815 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1300,7 +1300,18 @@ namespace { 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++;