Skip to content

Commit 910d26b

Browse files
G-Lorenzvondele
authored andcommitted
Simplification in LMR
This commit removes the `!captureOrPromotion` condition from ttCapture reduction and from good/bad history reduction (similar to #3619). passed STC: https://tests.stockfishchess.org/tests/view/60fc734ad8a6b65b2f3a7922 LLR: 2.97 (-2.94,2.94) <-2.50,0.50> Total: 48680 W: 3855 L: 3776 D: 41049 Ptnml(0-2): 118, 3145, 17744, 3206, 127 passed LTC: https://tests.stockfishchess.org/tests/view/60fce7d5d8a6b65b2f3a794c LLR: 2.93 (-2.94,2.94) <-2.50,0.50> Total: 86528 W: 2471 L: 2450 D: 81607 Ptnml(0-2): 28, 2203, 38777, 2232, 24 closes #3629 Bench: 4951406
1 parent b939c80 commit 910d26b

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

src/search.cpp

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,21 +1159,18 @@ namespace {
11591159
if (cutNode && move != ss->killers[0])
11601160
r += 2;
11611161

1162-
if (!captureOrPromotion)
1163-
{
1164-
// Increase reduction if ttMove is a capture (~3 Elo)
1165-
if (ttCapture)
1166-
r++;
1167-
1168-
ss->statScore = thisThread->mainHistory[us][from_to(move)]
1169-
+ (*contHist[0])[movedPiece][to_sq(move)]
1170-
+ (*contHist[1])[movedPiece][to_sq(move)]
1171-
+ (*contHist[3])[movedPiece][to_sq(move)]
1172-
- 4923;
1173-
1174-
// Decrease/increase reduction for moves with a good/bad history (~30 Elo)
1175-
r -= ss->statScore / 14721;
1176-
}
1162+
// Increase reduction if ttMove is a capture (~3 Elo)
1163+
if (ttCapture)
1164+
r++;
1165+
1166+
ss->statScore = thisThread->mainHistory[us][from_to(move)]
1167+
+ (*contHist[0])[movedPiece][to_sq(move)]
1168+
+ (*contHist[1])[movedPiece][to_sq(move)]
1169+
+ (*contHist[3])[movedPiece][to_sq(move)]
1170+
- 4923;
1171+
1172+
// Decrease/increase reduction for moves with a good/bad history (~30 Elo)
1173+
r -= ss->statScore / 14721;
11771174

11781175
// In general we want to cap the LMR depth search at newDepth. But if
11791176
// reductions are really negative and movecount is low, we allow this move

0 commit comments

Comments
 (0)