From 8a8640a761f266979c7130a49ebbc9ed4c680102 Mon Sep 17 00:00:00 2001 From: Stefan Geschwentner Date: Thu, 21 Oct 2021 09:39:28 +0200 Subject: [PATCH] Double extend more often via LMR Allow for first three moves always a two plies deeper LMR search. STC: LLR: 2.96 (-2.94,2.94) <-2.50,0.50> Total: 206096 W: 51966 L: 52093 D: 102037 Ptnml(0-2): 664, 23817, 54293, 23530, 744 https://tests.stockfishchess.org/tests/view/616f197d40f619782fd4f75a LTC: LLR: 2.93 (-2.94,2.94) <-2.50,0.50> Total: 62384 W: 15567 L: 15492 D: 31325 Ptnml(0-2): 40, 6633, 17777, 6696, 46 https://tests.stockfishchess.org/tests/view/616ffa1b4f0b65a0e231e682 closes https://github.com/official-stockfish/Stockfish/pull/3752 Bench: 6154836 --- src/search.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 65e496b8..f511cce6 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -790,8 +790,8 @@ namespace { ss->staticEval = eval = evaluate(pos); // Save static evaluation into transposition table - if(!excludedMove) - tte->save(posKey, VALUE_NONE, ss->ttPv, BOUND_NONE, DEPTH_NONE, MOVE_NONE, eval); + if (!excludedMove) + tte->save(posKey, VALUE_NONE, ss->ttPv, BOUND_NONE, DEPTH_NONE, MOVE_NONE, eval); } // Use static evaluation difference to improve quiet move ordering @@ -1210,11 +1210,11 @@ moves_loop: // When in check, search starts here // In general we want to cap the LMR depth search at newDepth. But if reductions // are really negative and movecount is low, we allow this move to be searched // deeper than the first move (this may lead to hidden double extensions). - int deeper = r >= -1 ? 0 - : moveCount <= 3 && r <= -3 ? 2 - : moveCount <= 5 ? 1 - : PvNode && depth > 6 ? 1 - : 0; + int deeper = r >= -1 ? 0 + : moveCount <= 3 ? 2 + : moveCount <= 5 ? 1 + : PvNode && depth > 6 ? 1 + : 0; Depth d = std::clamp(newDepth - r, 1, newDepth + deeper); -- 2.39.2