mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-23 02:27:00 +08:00
Use explicit logic for pruning
Also a speedup since we don't need to recalculate SEE
for extensions...as it already determined to be positive.
Results for 12 tests for each version:
Base Test Diff
Mean 2132395 2191002 -58607
StDev 128058 85917 134239
p-value: 0.669
speedup: 0.027
Non functional change.
This commit is contained in:
committed by
Marco Costalba
parent
16e1881126
commit
e27d3bb884
@@ -919,7 +919,7 @@ moves_loop: // When in check search starts from here
|
|||||||
|
|
||||||
// Step 13. Pruning at shallow depth
|
// Step 13. Pruning at shallow depth
|
||||||
if ( !rootNode
|
if ( !rootNode
|
||||||
&& bestValue > VALUE_MATED_IN_MAX_PLY)
|
&& bestValue > VALUE_MATED_IN_MAX_PLY)
|
||||||
{
|
{
|
||||||
if ( !captureOrPromotion
|
if ( !captureOrPromotion
|
||||||
&& !givesCheck
|
&& !givesCheck
|
||||||
@@ -941,6 +941,7 @@ moves_loop: // When in check search starts from here
|
|||||||
|
|
||||||
// Futility pruning: parent node
|
// Futility pruning: parent node
|
||||||
if ( lmrDepth < 7
|
if ( lmrDepth < 7
|
||||||
|
&& !inCheck
|
||||||
&& ss->staticEval + 256 + 200 * lmrDepth <= alpha)
|
&& ss->staticEval + 256 + 200 * lmrDepth <= alpha)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -950,6 +951,7 @@ moves_loop: // When in check search starts from here
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if ( depth < 7 * ONE_PLY
|
else if ( depth < 7 * ONE_PLY
|
||||||
|
&& !extension
|
||||||
&& !pos.see_ge(move, Value(-35 * depth / ONE_PLY * depth / ONE_PLY)))
|
&& !pos.see_ge(move, Value(-35 * depth / ONE_PLY * depth / ONE_PLY)))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user