MovePicker mp(pos, ttMove, depth, &thisThread->mainHistory, &thisThread->captureHistory,
contHist, &thisThread->pawnHistory);
- int quietCheckEvasions = 0;
-
// Step 5. Loop through all pseudo-legal moves until no moves remain
// or a beta cutoff occurs.
while ((move = mp.next_move()) != Move::none())
}
}
- // We prune after the second quiet check evasion move, where being 'in check' is
- // implicitly checked through the counter, and being a 'quiet move' apart from
- // being a tt move is assumed after an increment because captures are pushed ahead.
- if (quietCheckEvasions > 1)
- break;
-
// Continuation history based pruning (~3 Elo)
if (!capture
&& (*contHist[0])[pos.moved_piece(move)][move.to_sq()]
&thisThread
->continuationHistory[ss->inCheck][capture][pos.moved_piece(move)][move.to_sq()];
- quietCheckEvasions += !capture && ss->inCheck;
-
// Step 7. Make and search the move
thisThread->nodes.fetch_add(1, std::memory_order_relaxed);
pos.do_move(move, st, givesCheck);