1
0
Fork 0

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 <mcostalba@gmail.com>
sf_2.3.1_base
Marco Costalba 2012-01-15 09:54:27 +01:00
parent 972dec454c
commit 1b69ef8e6c
1 changed files with 3 additions and 4 deletions

View File

@ -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<PvNode>(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<NonPV>(pos, ss+1, -(alpha+1), -alpha, DEPTH_ZERO)
: - search<NonPV>(pos, ss+1, -(alpha+1), -alpha, d);
value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, d);
doFullDepthSearch = (value > alpha && ss->reduction != DEPTH_ZERO);
ss->reduction = DEPTH_ZERO;