From c94bcf62e4dac6b92455f2701fda794883044b8b Mon Sep 17 00:00:00 2001 From: FauziAkram Date: Sat, 18 Jan 2025 13:38:45 +0300 Subject: [PATCH] Moving up the if position is or has been on the PV reduction Passed STC: LLR: 2.93 (-2.94,2.94) <0.00,2.00> Total: 29664 W: 7880 L: 7570 D: 14214 Ptnml(0-2): 93, 3487, 7390, 3741, 121 https://tests.stockfishchess.org/tests/view/678ac957c00c743bc9e9fc3f Passed LTC: LLR: 2.94 (-2.94,2.94) <0.50,2.50> Total: 81354 W: 20903 L: 20487 D: 39964 Ptnml(0-2): 66, 9003, 22123, 9419, 66 https://tests.stockfishchess.org/tests/view/678ad359c00c743bc9e9fcfa closes https://github.com/official-stockfish/Stockfish/pull/5794 Bench: 1414638 --- src/search.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 983f387a..249ac56b 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -978,6 +978,10 @@ moves_loop: // When in check, search starts here Depth r = reduction(improving, depth, moveCount, delta); + // Decrease reduction if position is or has been on the PV (~7 Elo) + if (ss->ttPv) + r -= 1037 + (ttData.value > alpha) * 965 + (ttData.depth >= depth) * 960; + // Step 14. Pruning at shallow depth (~120 Elo). // Depth conditions are important for mate finding. if (!rootNode && pos.non_pawn_material(us) && !is_loss(bestValue)) @@ -1144,10 +1148,6 @@ moves_loop: // When in check, search starts here // so changing them or adding conditions that are similar requires // tests at these types of time controls. - // Decrease reduction if position is or has been on the PV (~7 Elo) - if (ss->ttPv) - r -= 1037 + (ttData.value > alpha) * 965 + (ttData.depth >= depth) * 960; - // Decrease reduction for PvNodes (~0 Elo on STC, ~2 Elo on LTC) if (PvNode) r -= 1018;