From 525a5749bc873a55893d8b4d4041b49ce074f407 Mon Sep 17 00:00:00 2001 From: Daniel Monroe Date: Sun, 27 Jul 2025 10:06:40 -0400 Subject: [PATCH] Simplify extra continuation history updates Passed simplification STC LLR: 2.95 (-2.94,2.94) <-1.75,0.25> Total: 254464 W: 65774 L: 65793 D: 122897 Ptnml(0-2): 699, 30087, 65638, 30150, 658 https://tests.stockfishchess.org/tests/view/68863283966ed85face24a59 Passed simplification LTC LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 144750 W: 37111 L: 37018 D: 70621 Ptnml(0-2): 79, 15676, 40764, 15785, 71 https://tests.stockfishchess.org/tests/view/6886655f7b562f5f7b731359 closes https://github.com/official-stockfish/Stockfish/pull/6189 Bench: 3071078 --- src/search.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 71a46ea7b..743f4bce7 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1856,16 +1856,13 @@ void update_continuation_histories(Stack* ss, Piece pc, Square to, int bonus) { static constexpr std::array conthist_bonuses = { {{1, 1108}, {2, 652}, {3, 273}, {4, 572}, {5, 126}, {6, 449}}}; - static constexpr int conthist_offsets[6]{71, 106, -22, -20, 29, -74}; - for (const auto [i, weight] : conthist_bonuses) { // Only update the first 2 continuation histories if we are in check if (ss->inCheck && i > 2) break; if (((ss - i)->currentMove).is_ok()) - (*(ss - i)->continuationHistory)[pc][to] - << (bonus * weight / 1024) + conthist_offsets[i - 1]; + (*(ss - i)->continuationHistory)[pc][to] << (bonus * weight / 1024) + 80 * (i < 2); } }