Skip to content

Commit 93b14a1

Browse files
BM123499vondele
authored andcommitted
Don't direct prune a move if it's a retake
STC: LLR: 2.94 (-2.94,2.94) <0.00,2.50> Total: 36304 W: 9499 L: 9226 D: 17579 Ptnml(0-2): 96, 4102, 9508, 4325, 121 https://tests.stockfishchess.org/tests/view/61c7069ae68b2a714b6dca27 LTC: LLR: 2.95 (-2.94,2.94) <0.50,3.00> Total: 93824 W: 24478 L: 24068 D: 45278 Ptnml(0-2): 70, 9644, 27082, 10038, 78 https://tests.stockfishchess.org/tests/view/61c725fee68b2a714b6dcfa2 closes #3871 Bench: 4106806
1 parent 7d82f0d commit 93b14a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/search.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1503,10 +1503,11 @@ namespace {
15031503
// to search the moves. Because the depth is <= 0 here, only captures,
15041504
// queen promotions, and other checks (only if depth >= DEPTH_QS_CHECKS)
15051505
// will be generated.
1506+
Square prevSq = to_sq((ss-1)->currentMove);
15061507
MovePicker mp(pos, ttMove, depth, &thisThread->mainHistory,
15071508
&thisThread->captureHistory,
15081509
contHist,
1509-
to_sq((ss-1)->currentMove));
1510+
prevSq);
15101511

15111512
// Loop through the moves until no moves remain or a beta cutoff occurs
15121513
while ((move = mp.next_move()) != MOVE_NONE)
@@ -1525,6 +1526,7 @@ namespace {
15251526
// Futility pruning and moveCount pruning (~5 Elo)
15261527
if ( bestValue > VALUE_TB_LOSS_IN_MAX_PLY
15271528
&& !givesCheck
1529+
&& to_sq(move) != prevSq
15281530
&& futilityBase > -VALUE_KNOWN_WIN
15291531
&& type_of(move) != PROMOTION)
15301532
{

0 commit comments

Comments
 (0)