From: H.G.Muller Date: Sat, 14 Jan 2017 18:07:55 +0000 (+0100) Subject: Make minimum LMR depth a macro, foreasy tuning X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=63155fb8438f660ace9dea9cff7470f603e8a658;p=crazywa.git Make minimum LMR depth a macro, foreasy tuning --- diff --git a/dropper.c b/dropper.c index 64b0bab..5f5e3ea 100644 --- a/dropper.c +++ b/dropper.c @@ -9,6 +9,8 @@ #include #include +#define LMR 2 + #define ON 1 #define OFF 0 #define INVALID 0 @@ -1088,7 +1090,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 & entry->depth >= 3)*reduction; // fail highs need to satisfy reduced depth only, so we fake higher depth than actually found + d += (score >= beta & entry->depth >= LMR)*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 } @@ -1120,8 +1122,8 @@ if(hashMove && board[hashMove>>8&255] == 0) {char s[100];sprintf(s,"bad hash mov if(f.checker != CK_NONE) { depth++, maxDepth++, reduction = originalReduction = 0 /*, killers[ply][2] = -1*/; // extend check evasions if(earlyGen && f.checkDist && maxDepth <= 1) ipMask = SafeIP(&f); - } else if(depth > 3) { - if(depth - reduction < 3) reduction = depth - 3; // never reduce to below 3 ply + } else if(depth > LMR) { + if(depth - reduction < LMR) reduction = depth - LMR; // never reduce to below 'LMR' ply depth -= reduction; } else reduction = originalReduction = 0; if(PATH)printf("%d:%d {%d,%d} max=%d eval=%d check=%02x,%d,%d\n",ply,depth,alpha,beta,maxDepth,curEval,f.checker,f.checkDir,f.checkDist);