1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-11 19:49:14 +00:00

Small cleanup

In search remove one condition check and reorder conditions. Removes some code.

Passed non-regression test:
https://tests.stockfishchess.org/tests/view/64548fa06206ee34ebf853ad
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 282976 W: 75327 L: 75374 D: 132275
Ptnml(0-2): 604, 29673, 80995, 29598, 618

closes https://github.com/official-stockfish/Stockfish/pull/4557

No functional change
This commit is contained in:
Michael Chaly 2023-05-05 23:32:56 +03:00 committed by Joost VandeVondele
parent 28442195c7
commit 464ebdf127

View file

@ -1310,7 +1310,13 @@ moves_loop: // When in check, search starts here
if (PvNode && !rootNode) // Update pv even in fail-high case
update_pv(ss->pv, move, (ss+1)->pv);
if (PvNode && value < beta) // Update alpha! Always alpha < beta
if (value >= beta)
{
ss->cutoffCnt += 1 + !ttMove;
assert(value >= beta); // Fail high
break;
}
else
{
// Reduce other moves if we have found at least one score improvement (~1 Elo)
if ( depth > 1
@ -1319,13 +1325,7 @@ moves_loop: // When in check, search starts here
depth -= 1;
assert(depth > 0);
alpha = value;
}
else
{
ss->cutoffCnt += 1 + !ttMove;
assert(value >= beta); // Fail high
break;
alpha = value; // Update alpha! Always alpha < beta
}
}
}