mirror of
https://github.com/sockspls/badfish
synced 2025-07-12 03:59:15 +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:
parent
28442195c7
commit
464ebdf127
1 changed files with 8 additions and 8 deletions
|
@ -1310,7 +1310,13 @@ moves_loop: // When in check, search starts here
|
||||||
if (PvNode && !rootNode) // Update pv even in fail-high case
|
if (PvNode && !rootNode) // Update pv even in fail-high case
|
||||||
update_pv(ss->pv, move, (ss+1)->pv);
|
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)
|
// Reduce other moves if we have found at least one score improvement (~1 Elo)
|
||||||
if ( depth > 1
|
if ( depth > 1
|
||||||
|
@ -1319,13 +1325,7 @@ moves_loop: // When in check, search starts here
|
||||||
depth -= 1;
|
depth -= 1;
|
||||||
|
|
||||||
assert(depth > 0);
|
assert(depth > 0);
|
||||||
alpha = value;
|
alpha = value; // Update alpha! Always alpha < beta
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ss->cutoffCnt += 1 + !ttMove;
|
|
||||||
assert(value >= beta); // Fail high
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue