mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Refactor previous patch
No functional change.
This commit is contained in:
parent
38428ada54
commit
d909d10f33
1 changed files with 36 additions and 41 deletions
|
@ -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)));
|
||||||
|
|
Loading…
Add table
Reference in a new issue