From: Shahin M. Shahin <41402573+peregrineshahin@users.noreply.github.com> Date: Sat, 19 Aug 2023 22:15:22 +0000 (+0300) Subject: Reduce repetitions branches X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=440feecb4da2f051da6dafb70b4eb6cf443ccc1e Reduce repetitions branches Increase reduction on retrying a move we just retreated that falls in a repetition: if current move can be the same move from previous previous turn then we retreated that move on the previous turn, this patch increases reduction if retrying that move results in a repetition. How to continue from there? Maybe we some variants of this idea could bring Elo too (only testing the destination square, or triangulations, etc.) Passed STC: https://tests.stockfishchess.org/tests/view/64e1aede883cbb7cbd9ad976 LLR: 2.94 (-2.94,2.94) <0.00,2.00> Total: 424000 W: 108675 L: 107809 D: 207516 Ptnml(0-2): 1296, 47350, 113896, 48108, 1350 Passed LTC: https://tests.stockfishchess.org/tests/view/64e32d629970091252666872 LLR: 2.94 (-2.94,2.94) <0.50,2.50> Total: 89682 W: 22976 L: 22569 D: 44137 Ptnml(0-2): 39, 8843, 26675, 9240, 44 closes https://github.com/official-stockfish/Stockfish/pull/4757 bench: 1574347 --- diff --git a/src/search.cpp b/src/search.cpp index d911593c..d9b41cb3 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1143,6 +1143,11 @@ moves_loop: // When in check, search starts here // Decrease reduction if ttMove has been singularly extended (~1 Elo) if (singularQuietLMR) r--; + + // Increase reduction on repetition (~1 Elo) + if ( move == (ss-4)->currentMove + && pos.has_repeated()) + r += 2; // Increase reduction if next ply has a lot of fail high (~5 Elo) if ((ss+1)->cutoffCnt > 3)