if ( captureOrPromotion
|| givesCheck)
{
- // Capture history based pruning when the move doesn't give check
- if ( !givesCheck
- && lmrDepth < 1
- && captureHistory[movedPiece][to_sq(move)][type_of(pos.piece_on(to_sq(move)))] < 0)
- continue;
-
// Futility pruning for captures
if ( !pos.empty(to_sq(move))
&& !givesCheck
extension = -2;
}
- // Capture extensions for PvNodes and cutNodes
- else if ( (PvNode || cutNode)
- && captureOrPromotion
- && moveCount != 1)
- extension = 1;
-
// Check extensions
else if ( givesCheck
&& depth > 6