From: Marco Costalba Date: Sun, 15 Jan 2012 08:54:27 +0000 (+0100) Subject: Don't allow LMR to fall in qsearch X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=1b69ef8e6c121f64b998533e5393470dad3a8453 Don't allow LMR to fall in qsearch And increase LMR limit. Tests show no change ELO wise, but we prefer to take the risk to commit anyhow becuase is a 'prune reducing' patch. After 10749 games Mod vs Orig: 1670 - 1676 - 7403 ELO 0 (+-3.7) Signed-off-by: Marco Costalba --- diff --git a/src/search.cpp b/src/search.cpp index 5440dd1e..3ec60e7c 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -966,7 +966,7 @@ split_point_start: // At split points actual search starts from here // Step 15. Reduced depth search (LMR). If the move fails high will be // re-searched at full depth. - if ( depth > 3 * ONE_PLY + if ( depth > 4 * ONE_PLY && !isPvMove && !captureOrPromotion && !dangerous @@ -975,11 +975,10 @@ split_point_start: // At split points actual search starts from here && ss->killers[1] != move) { ss->reduction = reduction(depth, moveCount); - Depth d = newDepth - ss->reduction; + Depth d = std::max(newDepth - ss->reduction, ONE_PLY); alpha = SpNode ? sp->alpha : alpha; - value = d < ONE_PLY ? -qsearch(pos, ss+1, -(alpha+1), -alpha, DEPTH_ZERO) - : - search(pos, ss+1, -(alpha+1), -alpha, d); + value = -search(pos, ss+1, -(alpha+1), -alpha, d); doFullDepthSearch = (value > alpha && ss->reduction != DEPTH_ZERO); ss->reduction = DEPTH_ZERO;