- 4923;
// Decrease/increase reduction for moves with a good/bad history (~30 Elo)
- if (!ss->inCheck)
- r -= ss->statScore / 14721;
+ r -= ss->statScore / 14721;
}
// In general we want to cap the LMR depth search at newDepth. But if
{
assert(is_ok(move));
+ // Check for legality
+ if (!pos.legal(move))
+ continue;
+
givesCheck = pos.gives_check(move);
captureOrPromotion = pos.capture_or_promotion(move);
// Speculative prefetch as early as possible
prefetch(TT.first_entry(pos.key_after(move)));
- // Check for legality just before making the move
- if (!pos.legal(move))
- {
- moveCount--;
- continue;
- }
-
ss->currentMove = move;
ss->continuationHistory = &thisThread->continuationHistory[ss->inCheck]
[captureOrPromotion]