mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Allow inCheck pruning
This is a bit tricky because we don't want to prune the only legal evasions, even if with negative SEE. So add an assert to avoid this subtle bug to slip in later. STC: LLR: 2.96 (-2.94,2.94) [0.00,4.00] Total: 14140 W: 2625 L: 2421 D: 9094 LTC: LLR: 2.95 (-2.94,2.94) [0.00,4.00] Total: 11558 W: 1555 L: 1379 D: 8624 bench: 5256717
This commit is contained in:
parent
eccccba0ce
commit
ab26c61971
1 changed files with 3 additions and 1 deletions
|
@ -919,7 +919,6 @@ moves_loop: // When in check search starts from here
|
|||
|
||||
// Step 13. Pruning at shallow depth
|
||||
if ( !rootNode
|
||||
&& !inCheck
|
||||
&& bestValue > VALUE_MATED_IN_MAX_PLY)
|
||||
{
|
||||
if ( !captureOrPromotion
|
||||
|
@ -1121,6 +1120,9 @@ moves_loop: // When in check search starts from here
|
|||
// All legal moves have been searched and if there are no legal moves, it
|
||||
// must be a mate or a stalemate. If we are in a singular extension search then
|
||||
// return a fail low score.
|
||||
|
||||
assert(moveCount || !inCheck || excludedMove || !MoveList<LEGAL>(pos).size());
|
||||
|
||||
if (!moveCount)
|
||||
bestValue = excludedMove ? alpha
|
||||
: inCheck ? mated_in(ss->ply) : DrawValue[pos.side_to_move()];
|
||||
|
|
Loading…
Add table
Reference in a new issue