From 45e5e65a28ce7e304c279fabf5f8a83cced73013 Mon Sep 17 00:00:00 2001 From: Joost VandeVondele Date: Mon, 1 Nov 2021 08:40:33 +0100 Subject: [PATCH] do not store qsearch positions in TT as exact. in qsearch don't store positions in TT with the exact flag. passed STC: https://tests.stockfishchess.org/tests/view/617f9a29af49befdeee40231 LLR: 2.95 (-2.94,2.94) <-2.25,0.25> Total: 155568 W: 39003 L: 39022 D: 77543 Ptnml(0-2): 403, 17854, 41305, 17803, 419 passed LTC: https://tests.stockfishchess.org/tests/view/6180d47259e71df00dcc42a5 LLR: 2.94 (-2.94,2.94) <-2.25,0.25> Total: 79640 W: 19993 L: 19910 D: 39737 Ptnml(0-2): 37, 8356, 22957, 8427, 43 closes https://github.com/official-stockfish/Stockfish/pull/3775 Bench: 7531210 --- src/search.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 46c95ef0..6c894c17 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1416,13 +1416,12 @@ moves_loop: // When in check, search starts here Key posKey; Move ttMove, move, bestMove; Depth ttDepth; - Value bestValue, value, ttValue, futilityValue, futilityBase, oldAlpha; + Value bestValue, value, ttValue, futilityValue, futilityBase; bool pvHit, givesCheck, captureOrPromotion; int moveCount; if (PvNode) { - oldAlpha = alpha; // To flag BOUND_EXACT when eval above alpha and no available moves (ss+1)->pv = pv; ss->pv[0] = MOVE_NONE; } @@ -1612,8 +1611,7 @@ moves_loop: // When in check, search starts here // Save gathered info in transposition table tte->save(posKey, value_to_tt(bestValue, ss->ply), pvHit, - bestValue >= beta ? BOUND_LOWER : - PvNode && bestValue > oldAlpha ? BOUND_EXACT : BOUND_UPPER, + bestValue >= beta ? BOUND_LOWER : BOUND_UPPER, ttDepth, bestMove, ss->staticEval); assert(bestValue > -VALUE_INFINITE && bestValue < VALUE_INFINITE); -- 2.39.2