Skip to content

Commit

Permalink
simplify away quietCheckEvasions pruning
Browse files Browse the repository at this point in the history
simplifies away the pruning of quiet evasion moves in quiescent search.

Passed STC:
LLR: 2.98 (-2.94,2.94) <-1.75,0.25>
Total: 343520 W: 88356 L: 88470 D: 166694
Ptnml(0-2): 1061, 40073, 89706, 39759, 1161
https://tests.stockfishchess.org/tests/view/663c7ddfc0b75d7f7b980f3b

Passed LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 168744 W: 42454 L: 42384 D: 83906
Ptnml(0-2): 75, 18678, 46782, 18776, 61
https://tests.stockfishchess.org/tests/view/663ce34fc0b75d7f7b981ed9

closes #5231

bench 3681552
  • Loading branch information
xu-shawn authored and vondele committed May 13, 2024
1 parent b881213 commit 540545d
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1502,8 +1502,6 @@ Value Search::Worker::qsearch(Position& pos, Stack* ss, Value alpha, Value beta,
MovePicker mp(pos, ttMove, depth, &thisThread->mainHistory, &thisThread->captureHistory,
contHist, &thisThread->pawnHistory);

int quietCheckEvasions = 0;

// Step 5. Loop through all pseudo-legal moves until no moves remain
// or a beta cutoff occurs.
while ((move = mp.next_move()) != Move::none())
Expand Down Expand Up @@ -1556,12 +1554,6 @@ Value Search::Worker::qsearch(Position& pos, Stack* ss, Value alpha, Value beta,
}
}

// We prune after the second quiet check evasion move, where being 'in check' is
// implicitly checked through the counter, and being a 'quiet move' apart from
// being a tt move is assumed after an increment because captures are pushed ahead.
if (quietCheckEvasions > 1)
break;

// Continuation history based pruning (~3 Elo)
if (!capture
&& (*contHist[0])[pos.moved_piece(move)][move.to_sq()]
Expand All @@ -1585,8 +1577,6 @@ Value Search::Worker::qsearch(Position& pos, Stack* ss, Value alpha, Value beta,
&thisThread
->continuationHistory[ss->inCheck][capture][pos.moved_piece(move)][move.to_sq()];

quietCheckEvasions += !capture && ss->inCheck;

// Step 7. Make and search the move
thisThread->nodes.fetch_add(1, std::memory_order_relaxed);
pos.do_move(move, st, givesCheck);
Expand Down

0 comments on commit 540545d

Please sign in to comment.