From: peregrineshahin Date: Sun, 13 Nov 2022 09:08:17 +0000 (+0200) Subject: Simplify both quiet check evasions' conditions X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=1370127fcd72b5c6646ff03a4a779b81ad0bcf3d;p=stockfish Simplify both quiet check evasions' conditions passed Non-regression STC: https://tests.stockfishchess.org/tests/view/6370b647f1b748d4819e0b64 LLR: 2.95 (-2.94,2.94) <-1.75,0.25> Total: 162904 W: 43249 L: 43171 D: 76484 Ptnml(0-2): 491, 17089, 46220, 17155, 497 closes https://github.com/official-stockfish/Stockfish/pull/4228 No functional change --- diff --git a/src/search.cpp b/src/search.cpp index 5cef5c40..e73f68ff 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1552,12 +1552,11 @@ moves_loop: // When in check, search starts here && (*contHist[1])[pos.moved_piece(move)][to_sq(move)] < 0) continue; - // movecount pruning for quiet check evasions + // We prune after 2nd quiet check evasion where being 'in check' is implicitly checked through the counter + // and being a 'quiet' apart from being a tt move is assumed after an increment because captures are pushed ahead. if ( bestValue > VALUE_TB_LOSS_IN_MAX_PLY - && quietCheckEvasions > 1 - && !capture - && ss->inCheck) - continue; + && quietCheckEvasions > 1) + break; quietCheckEvasions += !capture && ss->inCheck;