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
// Step 13. Pruning at shallow depth
if ( !rootNode
- && !inCheck
&& bestValue > VALUE_MATED_IN_MAX_PLY)
{
if ( !captureOrPromotion
// 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()];