Skip to content

Commit

Permalink
bench: 1045718
Browse files Browse the repository at this point in the history
bench: 1045718
  • Loading branch information
FauziAkram authored Dec 27, 2024
1 parent f656fdf commit 0cb19a8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<ConthistBonus, 5> 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));
}
}

Expand Down

0 comments on commit 0cb19a8

Please sign in to comment.