Respect minimum LMR depth during hash probing
authorH.G.Muller <hgm@hgm-xboard.(none)>
Sat, 14 Jan 2017 18:00:06 +0000 (19:00 +0100)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Sat, 14 Jan 2017 18:00:06 +0000 (19:00 +0100)
We can add the reduction to the actual search depth to determine up to
which depth a probe result ca be used, but only if the actual depth is
at least the miimumdepth where LMR is allowed.

dropper.c

index 825e6b9..64b0bab 100644 (file)
--- a/dropper.c
+++ b/dropper.c
@@ -1088,7 +1088,7 @@ if(PATH)printf("%d:%d   Hash Probe %016llx\n",ply,depth,f.hashKey);
        }
 if(PATH)printf("      Hit, d=%d, checker = %x\n",entry->depth,f.checker);
        if((entry->flags & H_LOWER || entry->score <= alpha) && (entry->flags & H_UPPER || entry->score >= beta)) { // compatible bound
-           d += (score >= beta)*reduction; // fail highs need to satisfy reduced depth only, so we fake higher depth than actually found
+           d += (score >= beta & entry->depth >= 3)*reduction; // fail highs need to satisfy reduced depth only, so we fake higher depth than actually found
            if(score > alpha && d >= depth || d >= maxDepth) { // sufficient depth
                ff->depth = d + 1; return entry->score; // depth was sufficient, take hash cutoff
            }