Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
Skip moves-loop pruning in qsearch if we have only pawns
Browse files Browse the repository at this point in the history
At first my idea was only to cover movecount and futility pruning, but
@peregrineshahin suggested to test it on all moves-loop pruning and it worked.

Passed STC:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 167968 W: 42970 L: 42480 D: 82518
Ptnml(0-2): 444, 18324, 46002, 18726, 488
https://tests.stockfishchess.org/tests/view/6511181a55b420c569d0d54c

Passed LTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 40794 W: 10496 L: 10182 D: 20116
Ptnml(0-2): 12, 4021, 12025, 4319, 20
https://tests.stockfishchess.org/tests/view/6512ccc4b3e74811c8aee86c

closes official-stockfish#4809

Bench: 1338472
  • Loading branch information
cj5716 authored and Disservin committed Sep 29, 2023
1 parent 4f0feca commit 660da1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1427,6 +1427,7 @@ namespace {
Value bestValue, value, ttValue, futilityValue, futilityBase;
bool pvHit, givesCheck, capture;
int moveCount;
Color us = pos.side_to_move();

// Step 1. Initialize node
if (PvNode)
Expand Down Expand Up @@ -1537,7 +1538,7 @@ namespace {
moveCount++;

// Step 6. Pruning.
if (bestValue > VALUE_TB_LOSS_IN_MAX_PLY)
if (bestValue > VALUE_TB_LOSS_IN_MAX_PLY && pos.non_pawn_material(us))
{
// Futility pruning and moveCount pruning (~10 Elo)
if ( !givesCheck
Expand Down

0 comments on commit 660da1c

Please sign in to comment.