From 75f07da912577adbfab96f57716172cc972fe026 Mon Sep 17 00:00:00 2001 From: Nonlinear2 <131959792+Nonlinear2@users.noreply.github.com> Date: Mon, 25 Aug 2025 14:09:48 +0200 Subject: [PATCH] Avoid high rule50 count zeroing cutoffs If the depth is low enough, don't TT cut if the rule50 count is high and the TT move is zeroing. Passed STC: https://tests.stockfishchess.org/tests/view/68a8fdd8b6fb3300203bcb92 LLR: 3.05 (-2.94,2.94) <0.00,2.00> Total: 110304 W: 28805 L: 28402 D: 53097 Ptnml(0-2): 275, 11174, 31875, 11529, 299 Passed LTC: https://tests.stockfishchess.org/tests/view/68aa200f75da51a345a5a809 LLR: 3.00 (-2.94,2.94) <0.50,2.50> Total: 187956 W: 48489 L: 47928 D: 91539 Ptnml(0-2): 59, 16118, 61075, 16655, 71 closes https://github.com/official-stockfish/Stockfish/pull/6271 bench: 2641840 --- src/search.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index 5f2f63c65..01155e260 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -679,7 +679,10 @@ Value Search::Worker::search( if (!PvNode && !excludedMove && ttData.depth > depth - (ttData.value <= beta) && is_valid(ttData.value) // Can happen when !ttHit or when access race in probe() && (ttData.bound & (ttData.value >= beta ? BOUND_LOWER : BOUND_UPPER)) - && (cutNode == (ttData.value >= beta) || depth > 5)) + && (cutNode == (ttData.value >= beta) || depth > 5) + // avoid a TT cutoff if the rule50 count is high and the TT move is zeroing + && (depth > 8 || ttData.move == Move::none() || pos.rule50_count() < 80 + || (!ttCapture && type_of(pos.moved_piece(ttData.move)) != PAWN))) { // If ttMove is quiet, update move sorting heuristics on TT hit if (ttData.move && ttData.value >= beta)