Skip to content

Commit 1ee552e

Browse files
VizvezdenecJoachim26
authored andcommitted
Do stats updates after LMR for captures
Since captures that are in LMR use continuation histories of corresponding quiet moves it makes sense to update this histories if this capture passes LMR by analogy to existing logic for quiet moves. Passed STC https://tests.stockfishchess.org/tests/view/61f367eef7fba9f1a4f1318b LLR: 2.94 (-2.94,2.94) <0.00,2.50> Total: 208464 W: 56006 L: 55407 D: 97051 Ptnml(0-2): 964, 23588, 54655, 23935, 1090 Passed LTC https://tests.stockfishchess.org/tests/view/61f41e34f7fba9f1a4f15241 LLR: 2.96 (-2.94,2.94) <0.50,3.00> Total: 69144 W: 18793 L: 18441 D: 31910 Ptnml(0-2): 65, 6982, 20142, 7302, 81 closes official-stockfish#3910 bench 4637392
1 parent 6d281b7 commit 1ee552e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/search.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1263,11 +1263,14 @@ namespace {
12631263
value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, newDepth + doDeeperSearch, !cutNode, mcts);//mcts
12641264

12651265
// If the move passed LMR update its stats
1266-
if (didLMR && !captureOrPromotion)
1266+
if (didLMR)
12671267
{
12681268
int bonus = value > alpha ? stat_bonus(newDepth)
12691269
: -stat_bonus(newDepth);
12701270

1271+
if (captureOrPromotion)
1272+
bonus /= 4;
1273+
12711274
update_continuation_histories(ss, movedPiece, to_sq(move), bonus);
12721275
}
12731276
}

0 commit comments

Comments
 (0)