From 66aee01bb1430ee25ba4df96e0c4c4a931759e4c Mon Sep 17 00:00:00 2001 From: Shawn Xu Date: Sun, 2 Mar 2025 01:29:38 -0800 Subject: [PATCH] Simplify Return Value Adjustment Condition Passed Non-regression STC: LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 82112 W: 21281 L: 21110 D: 39721 Ptnml(0-2): 258, 9630, 21112, 9795, 261 https://tests.stockfishchess.org/tests/view/67c42528b7226b5d8a2dd3a0 Passed Non-regression LTC: LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 182652 W: 46295 L: 46240 D: 90117 Ptnml(0-2): 103, 20025, 51003, 20104, 91 https://tests.stockfishchess.org/tests/view/67c4d56b685e87e15e7c43d8 closes https://github.com/official-stockfish/Stockfish/pull/5925 Bench: 1711791 --- src/search.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 440cdc8e3..baf99c0c6 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1406,9 +1406,8 @@ moves_loop: // When in check, search starts here assert(moveCount || !ss->inCheck || excludedMove || !MoveList(pos).size()); - // Adjust best value for fail high cases at non-pv nodes - if (!PvNode && bestValue >= beta && !is_decisive(bestValue) && !is_decisive(beta) - && !is_decisive(alpha)) + // Adjust best value for fail high cases + if (bestValue >= beta && !is_decisive(bestValue) && !is_decisive(beta) && !is_decisive(alpha)) bestValue = (bestValue * depth + beta) / (depth + 1); if (!moveCount)