From e64b957274b94e89ad1a6e3ec4571c9082246a0a Mon Sep 17 00:00:00 2001 From: Unai Corzo Date: Fri, 21 Aug 2020 09:24:25 +0200 Subject: [PATCH] Simplify away internal iterative deepening Remove the iterative deepening step. Instead, employ a depth reduction if the position is not in TT and on the PV. STC https://tests.stockfishchess.org/tests/view/5f3ce6eaa95672ddd56c637e LLR: 2.97 (-2.94,2.94) {-0.50,1.50} Total: 41096 W: 4421 L: 4257 D: 32418 Ptnml(0-2): 207, 3259, 13460, 3407, 215 LTC (old) https://tests.stockfishchess.org/tests/view/5f3d7d4fa95672ddd56c640b LLR: 2.92 (-2.94,2.94) {-1.50,0.50} Total: 26032 W: 1320 L: 1309 D: 23403 Ptnml(0-2): 22, 1152, 10654, 1169, 19 LTC (new) https://tests.stockfishchess.org/tests/view/5f3e31e0a95672ddd56c6464 LLR: 2.95 (-2.94,2.94) {-0.75,0.25} Total: 34160 W: 1844 L: 1766 D: 30550 Ptnml(0-2): 33, 1533, 13876, 1599, 39 bench: 3849173 --- src/search.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 7c839dfc..ba13680c 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -939,15 +939,11 @@ namespace { } } - // Step 11. Internal iterative deepening (~1 Elo) - if (depth >= 7 && !ttMove) - { - search(pos, ss, alpha, beta, depth - 7, cutNode); - - tte = TT.probe(posKey, ttHit); - ttValue = ttHit ? value_from_tt(tte->value(), ss->ply, pos.rule50_count()) : VALUE_NONE; - ttMove = ttHit ? tte->move() : MOVE_NONE; - } + // Step 11. If the position is not in TT, decrease depth by 2 + if ( PvNode + && depth >= 6 + && !ttMove) + depth -= 2; moves_loop: // When in check, search starts from here -- 2.39.2