mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Refactor previous patch
No functional change.
This commit is contained in:
@@ -921,10 +921,11 @@ 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
|
||||||
&& !captureOrPromotion
|
|
||||||
&& !inCheck
|
&& !inCheck
|
||||||
|
&& bestValue > VALUE_MATED_IN_MAX_PLY)
|
||||||
|
{
|
||||||
|
if ( !captureOrPromotion
|
||||||
&& !givesCheck
|
&& !givesCheck
|
||||||
&& bestValue > VALUE_MATED_IN_MAX_PLY
|
|
||||||
&& !pos.advanced_pawn_push(move))
|
&& !pos.advanced_pawn_push(move))
|
||||||
{
|
{
|
||||||
// Move count based pruning
|
// Move count based pruning
|
||||||
@@ -957,15 +958,9 @@ moves_loop: // When in check search starts from here
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( depth < 3 * ONE_PLY
|
else if ( depth < 3 * ONE_PLY
|
||||||
&& !inCheck
|
&& pos.see_sign(move) < VALUE_ZERO)
|
||||||
&& bestValue > VALUE_MATED_IN_MAX_PLY
|
|
||||||
&& !rootNode
|
|
||||||
&& ( captureOrPromotion
|
|
||||||
|| givesCheck
|
|
||||||
|| pos.advanced_pawn_push(move))
|
|
||||||
&& pos.see_sign(move) < VALUE_ZERO
|
|
||||||
)
|
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Speculative prefetch as early as possible
|
// Speculative prefetch as early as possible
|
||||||
prefetch(TT.first_entry(pos.key_after(move)));
|
prefetch(TT.first_entry(pos.key_after(move)));
|
||||||
|
|||||||
Reference in New Issue
Block a user