From: H.G.Muller Date: Mon, 29 May 2017 17:31:58 +0000 (+0200) Subject: Remove most debug print statements X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=5925761664e15c3df91a4b8038ea712af1941c97;p=crazywa.git Remove most debug print statements --- diff --git a/dropper.c b/dropper.c index 671a16c..d911549 100644 --- a/dropper.c +++ b/dropper.c @@ -1133,7 +1133,7 @@ Search (int stm, int alpha, int beta, StackFrame *ff, int depth, int reduction, f.pstEval = -ff->newEval; f.rights = ff->rights | spoiler[ff->toSqr] | spoiler[ff->fromSqr]; m.epSqr = ff->epSqr; // put in m, because MoveGen needs it -if(PATH)printf("%d:%d Hash Probe %016llx\n",ply,depth,f.hashKey); + // hash probe hashKeyH = f.hashKey >> 32; entry = hashTable + (f.hashKey + (stm + 9849 + f.rights)*(m.epSqr + 51451) & hashMask); @@ -1150,7 +1150,6 @@ if(PATH)printf("%d:%d Hash Probe %016llx\n",ply,depth,f.hashKey); } reduction = 0; // checks are not reduced } -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 >= 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) && ply) { // sufficient depth @@ -1258,7 +1257,6 @@ if(PATH)printf(" Hit, d=%d, checker = %x\n",entry->depth,f.checker); do { // IID loop int curMove, highDepth; iterDepth++; -if(PATH)printf("%d:%d:%d new iter moveStack[%d..%d]\n",ply,depth,iterDepth,m.firstMove,moveSP); highDepth = (iterDepth > depth ? iterDepth : depth) - 1; // reply depth for high-failing moves alpha = startAlpha; pvPtr = pvStart; *pvPtr++ = 0; // empty PV @@ -1341,7 +1339,7 @@ if(PATH)printf("%d:%d:%d new iter moveStack[%d..%d]\n",ply,depth,iterDepth,m.fir for(i=moveNr+ply-1; i>=d; i-=2) if(checkHist[i+1] == CK_NONE) break; if(i < d) score = -INF; // we deliver a perpetual, so lose else { - for(i=moveNr+ply-2; i>=d; i-=2) {if(PATH)printf(" %2d. %d\n",i,checkHist[i+1]);if(checkHist[i+1] == CK_NONE) break;} + for(i=moveNr+ply-2; i>=d; i-=2) if(checkHist[i+1] == CK_NONE) break; if(i < d) score = INF-1; // we are suffering a perpetual, so lose else if(perpLoses == 1) score = (stm == WHITE ? -INF : INF-1); // mini-Shogi, sente loses else if(perpLoses == 5) score = -INF; // Tori Shogi, repeating loses @@ -1416,7 +1414,6 @@ printf("%d:%d:%d %2d. %08x %c%d%c%d %6d %6d %6d\n",ply,depth,iterDepth,curMove,m // self-deepening if(resultDepth > iterDepth) iterDepth = resultDepth; // unexpectedly deep result (from hashed daughters?) if(reduction && iterDepth == depth) depth += reduction, originalReduction = reduction = 0; // no fail high, start unreduced re-search on behalf of parent -if(PATH)printf("%d:%d:%d iter end, max=%d, alpha=%d start=%d\n", ply, depth,iterDepth, maxDepth, alpha, startAlpha); if(iterDepth >= depth && alpha > startAlpha ) break; // move is PV; nominal depth suffices alpha = startAlpha; // reset alpha for next iteration @@ -1456,7 +1453,6 @@ if(PATH)printf("%d:%d:%d iter end, max=%d, alpha=%d start=%d\n", ply, depth,iter entry->depth = resultDepth; entry->flags = (bestScore > alpha)*H_LOWER + (bestScore < beta)*H_UPPER; entry->checker = f.checker + 11*(f.checkDist != 0); // encode distant check as off-board checker -if(PATH || f.hashKey == 0x1348708590)printf("%d:%d Hash store %16llx, d=%d, checker=%x move=%s\n",ply,depth,f.hashKey,resultDepth,entry->checker,MoveToText(entry->move)); // return results moveSP = oldSP; anaSP = oldAna; pvPtr = pvStart; depthLimit = oldLimit;