assert(move_is_ok(mateKiller));
if (move_is_legal(pos, mateKiller, pinned))
return mateKiller;
- }
- break;
+ }
+ break;
case PH_GOOD_CAPTURES:
numOfMoves = generate_captures(pos, moves);
&& !move_is_castle(move)
&& !move_is_killer(move, ss[ply]))
{
- ss[ply].reduction = OnePly;
- value = -search(pos, ss, -(beta-1), newDepth-OnePly, ply+1, true, threadID);
+ // LMR dynamic reduction
+ Depth R = (moveCount >= 3 * LMRNonPVMoves && depth >= 7*OnePly ? 2*OnePly : OnePly);
+
+ ss[ply].reduction = R;
+ value = -search(pos, ss, -(beta-1), newDepth-R, ply+1, true, threadID);
}
else
value = beta; // Just to trigger next condition