Depth ext, newDepth;
Value bestValue, value, ttValue;
Value eval, nullValue, futilityValue;
- bool inCheck, givesCheck, pvMove, singularExtensionNode;
+ CheckType givesCheck;
+ bool inCheck, pvMove, singularExtensionNode;
bool captureOrPromotion, dangerous, doFullDepthSearch;
int moveCount, playedMoveCount;
if (PvNode && dangerous)
ext = ONE_PLY;
- else if (givesCheck && pos.see_sign(move) >= 0)
+ else if (givesCheck && (givesCheck == DISCO_CHECK || pos.see_sign(move) >= 0))
ext = ONE_PLY / 2;
// Singular extension search. If all moves but one fail low on a search of
// Prune moves with negative SEE at low depths
if ( predictedDepth < 2 * ONE_PLY
+ && givesCheck != DISCO_CHECK
&& pos.see_sign(move) < 0)
{
if (SpNode)
Key posKey;
Move ttMove, move, bestMove;
Value bestValue, value, ttValue, futilityValue, futilityBase;
- bool givesCheck, enoughMaterial, evasionPrunable, fromNull;
+ CheckType givesCheck;
+ bool enoughMaterial, evasionPrunable, fromNull;
Depth ttDepth;
ss->currentMove = bestMove = MOVE_NONE;
if ( !PvNode
&& (!InCheck || evasionPrunable)
&& move != ttMove
+ && givesCheck != DISCO_CHECK
&& type_of(move) != PROMOTION
&& pos.see_sign(move) < 0)
continue;