Skip to content

Commit 1efd871

Browse files
authored
Merge pull request #1538 from IIvec/master
Do stats updates after LMR for captures
2 parents 28bb957 + 90d0519 commit 1efd871

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
@@ -1202,11 +1202,14 @@ namespace {
12021202
value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, newDepth + doDeeperSearch, !cutNode);
12031203

12041204
// If the move passed LMR update its stats
1205-
if (didLMR && !captureOrPromotion)
1205+
if (didLMR)
12061206
{
12071207
int bonus = value > alpha ? stat_bonus(newDepth)
12081208
: -stat_bonus(newDepth);
12091209

1210+
if (captureOrPromotion)
1211+
bonus /= 4;
1212+
12101213
update_continuation_histories(ss, movedPiece, to_sq(move), bonus);
12111214
}
12121215
}

0 commit comments

Comments
 (0)