X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=0e3838371fe0bc95366462fd1b8d547a2e3bd079;hp=8d6ddb8d33708c7443c6c8fb8b8a02d893c21b2a;hb=a9e55d43262d11a916bdfa68cd1de0174d884cd3;hpb=0ff3bf34cda9479d6c0d40d11ed0496329462edf diff --git a/src/search.cpp b/src/search.cpp index 8d6ddb8d..0e383837 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1245,8 +1245,8 @@ namespace { { Value v = qsearch(pos, ss, beta-1, beta, Depth(0), ply, threadID); if ( (v < beta - RazorMargin - RazorMargin / 4) - || (depth < 3*OnePly && v < beta - RazorMargin) - || (depth < 2*OnePly && v < beta - RazorMargin / 2)) + || (depth <= 2*OnePly && v < beta - RazorMargin) + || (depth <= OnePly && v < beta - RazorMargin / 2)) return v; } @@ -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 >= 2 * 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