1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00:00

LMR dynamic reduction

Reduce of two plies near the leafs and when we still
have enough depth to go so to limit horizon effects.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2009-03-20 12:33:30 +01:00
parent 0ff3bf34cd
commit 24b7ad54c7
2 changed files with 7 additions and 4 deletions

View file

@ -1332,8 +1332,11 @@ namespace {
&& !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