mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
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
This commit is contained in:
committed by
Joost VandeVondele
parent
ab83d320b8
commit
525a5749bc
+1
-4
@@ -1856,16 +1856,13 @@ void update_continuation_histories(Stack* ss, Piece pc, Square to, int bonus) {
|
|||||||
static constexpr std::array<ConthistBonus, 6> conthist_bonuses = {
|
static constexpr std::array<ConthistBonus, 6> conthist_bonuses = {
|
||||||
{{1, 1108}, {2, 652}, {3, 273}, {4, 572}, {5, 126}, {6, 449}}};
|
{{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)
|
for (const auto [i, weight] : conthist_bonuses)
|
||||||
{
|
{
|
||||||
// Only update the first 2 continuation histories if we are in check
|
// Only update the first 2 continuation histories if we are in check
|
||||||
if (ss->inCheck && i > 2)
|
if (ss->inCheck && i > 2)
|
||||||
break;
|
break;
|
||||||
if (((ss - i)->currentMove).is_ok())
|
if (((ss - i)->currentMove).is_ok())
|
||||||
(*(ss - i)->continuationHistory)[pc][to]
|
(*(ss - i)->continuationHistory)[pc][to] << (bonus * weight / 1024) + 80 * (i < 2);
|
||||||
<< (bonus * weight / 1024) + conthist_offsets[i - 1];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user