diff --git a/src/search.cpp b/src/search.cpp index 192b837c902..09052d6d831 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1840,16 +1840,15 @@ void update_all_stats(const Position& pos, // Updates histories of the move pairs formed by moves // at ply -1, -2, -3, -4, and -6 with current move. void update_continuation_histories(Stack* ss, Piece pc, Square to, int bonus) { - static constexpr std::array conthist_bonuses = { - {{1, 1024}, {2, 571}, {3, 339}, {4, 500}, {6, 592}}}; + bonus = bonus * 50 / 64; - for (const auto [i, weight] : conthist_bonuses) + for (int i : {1, 2, 3, 4, 6}) { // 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; + (*(ss - i)->continuationHistory)[pc][to] << bonus / (1 + (i == 3)); } }