// Step 8. Futility pruning: child node (~50 Elo)
if ( !PvNode
- && depth < 6
+ && depth < 8
&& eval - futility_margin(depth, improving) >= beta
&& eval < VALUE_KNOWN_WIN) // Do not return unproven wins
return eval;
&& (ss-1)->statScore < 23824
&& eval >= beta
&& eval >= ss->staticEval
- && ss->staticEval >= beta - 33 * depth - 33 * improving + 112 * ttPv + 311
+ && ss->staticEval >= beta - 28 * depth - 28 * improving + 94 * ttPv + 200
&& !excludedMove
&& pos.non_pawn_material(us)
&& (ss->ply >= thisThread->nmpMinPly || us != thisThread->nmpColor))
continue;
// Futility pruning: parent node (~5 Elo)
- if ( lmrDepth < 6
+ if ( lmrDepth < 8
&& !ss->inCheck
&& ss->staticEval + 284 + 188 * lmrDepth <= alpha
&& (*contHist[0])[movedPiece][to_sq(move)]
&& !(PvNode && abs(bestValue) < 2)
&& PieceValue[MG][type_of(movedPiece)] >= PieceValue[MG][type_of(pos.piece_on(to_sq(move)))]
&& !ss->inCheck
- && ss->staticEval + 267 + 391 * lmrDepth
+ && ss->staticEval + 178 + 261 * lmrDepth
+ PieceValue[MG][type_of(pos.piece_on(to_sq(move)))] <= alpha)
continue;
/* && ttValue != VALUE_NONE Already implicit in the next condition */
&& abs(ttValue) < VALUE_KNOWN_WIN
&& (tte->bound() & BOUND_LOWER)
- && tte->depth() >= depth - 3
- && pos.legal(move))
+ && tte->depth() >= depth - 3)
{
Value singularBeta = ttValue - ((formerPv + 4) * depth) / 2;
Depth singularDepth = (depth - 1 + 3 * formerPv) / 2;
if (type_of(move) == CASTLING)
extension = 1;
+ // Late irreversible move extension
+ if ( move == ttMove
+ && pos.rule50_count() > 80
+ && (captureOrPromotion || type_of(movedPiece) == PAWN))
+ extension = 2;
+
// Add extension to new depth
newDepth += extension;