Skip to content

Commit 525a574

Browse files
daniel-monroevondele
authored andcommitted
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 #6189 Bench: 3071078
1 parent ab83d32 commit 525a574

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/search.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,16 +1856,13 @@ void update_continuation_histories(Stack* ss, Piece pc, Square to, int bonus) {
18561856
static constexpr std::array<ConthistBonus, 6> conthist_bonuses = {
18571857
{{1, 1108}, {2, 652}, {3, 273}, {4, 572}, {5, 126}, {6, 449}}};
18581858

1859-
static constexpr int conthist_offsets[6]{71, 106, -22, -20, 29, -74};
1860-
18611859
for (const auto [i, weight] : conthist_bonuses)
18621860
{
18631861
// Only update the first 2 continuation histories if we are in check
18641862
if (ss->inCheck && i > 2)
18651863
break;
18661864
if (((ss - i)->currentMove).is_ok())
1867-
(*(ss - i)->continuationHistory)[pc][to]
1868-
<< (bonus * weight / 1024) + conthist_offsets[i - 1];
1865+
(*(ss - i)->continuationHistory)[pc][to] << (bonus * weight / 1024) + 80 * (i < 2);
18691866
}
18701867
}
18711868

0 commit comments

Comments
 (0)