Skip to content

Commit

Permalink
Avoid recomputing moveCountPruning
Browse files Browse the repository at this point in the history
In search, when moveCountPruning becomes true, it can never turn false again.

Passed STC https://tests.stockfishchess.org/tests/view/652075ceac57711436728aac
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 136448 W: 34923 L: 34472 D: 67053
Ptnml(0-2): 420, 15094, 36767, 15501, 442

closes #4823

Non functional change
  • Loading branch information
gab8192 authored and vondele committed Oct 8, 2023
1 parent 25d444e commit f7fbc68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/search.cpp
Expand Up @@ -984,7 +984,8 @@ namespace {
&& bestValue > VALUE_TB_LOSS_IN_MAX_PLY)
{
// Skip quiet moves if movecount exceeds our FutilityMoveCount threshold (~8 Elo)
moveCountPruning = moveCount >= futility_move_count(improving, depth);
if (!moveCountPruning)
moveCountPruning = moveCount >= futility_move_count(improving, depth);

// Reduced depth of the next LMR search
int lmrDepth = newDepth - r;
Expand Down

0 comments on commit f7fbc68

Please sign in to comment.