X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=hachu.c;h=7fd6fb867be77be6f6a3fbfd4b958c2827865d6e;hb=8b9b119cd471219b66a0e943381a9621dd04a256;hp=ca7f32d40993280d1c30c5bcd1263d2cb3b192da;hpb=df950afb30088935a862f9e0d5194e432de0af5a;p=hachu.git diff --git a/hachu.c b/hachu.c index ca7f32d..7fd6fb8 100644 --- a/hachu.c +++ b/hachu.c @@ -799,6 +799,20 @@ Init (int var) p[EDGE].qval = 5; // tenjiku jump-capturer sentinel } +int +PSTest () +{ + int r, f, score, tot=0; + for(r=0; r= 0) printf("iter %d:%d\n", depth,iterDep),fflush(stdout); @@ -1541,7 +1555,7 @@ if(flag && depth>= 0) printf("phase=%d: first/curr/last = %d / %d / %d\n", phase #if 0 if(curEval >= beta) { stm ^= WHITE; - score = -Search(-beta, -iterAlpha, difEval, depth-3, promoSuppress & SQUARE, ABSENT); + score = -Search(-beta, -iterAlpha, -difEval, depth-3, promoSuppress & SQUARE, ABSENT); stm ^= WHITE; if(score >= beta) { msp = oldMSP; retDep += 3; return score + (score < curEval); } } @@ -1651,7 +1665,11 @@ MapFromScratch(attacks); // for as long as incremental update does not work. if(promoSuppress & PROMOTE) score = -INF; // non-Lion captures Lion after opponent did same defer |= PROMOTE; // if we started, flag he cannot do it in reply } - if(score == -INF) { moveStack[curMove] = 0; goto abortMove; } // zap illegal moves + if(score == -INF) { + if(level == 1) repeatMove[repCnt++] = move & 0xFFFFFF | (p[tb.piece].value == 10*LVAL ? 3<<24 : 1 << 24); + moveStack[curMove] = 0; // zap illegal moves + goto abortMove; + } } #if 1 score = -Search(-beta, -iterAlpha, -difEval - tb.booty, replyDep, promoSuppress & ~PROMOTE, defer); @@ -1704,7 +1722,9 @@ if(PATH) printf("%d:%2d:%d %3d %6x %-10s %6d %6d\n", level, depth, iterDep, curM int i; // WB thinking output printf("%d %d %d %d", iterDep, bestScore, (GetTickCount() - startTime)/10, nodes); for(i=0; pv[i]; i++) printf(" %s", MoveToText(pv[i], 0)); - printf("\n"); fflush(stdout); + if(iterDep == 1) printf(" { root eval = %4.2f dif = %4.2f; abs = %4.2f}", curEval/100., difEval/100., PSTest()/100.); + printf("\n"); + fflush(stdout); } if(GetTickCount() - startTime > tlim1) break; // do not start iteration we can (most likely) not finish } @@ -1938,7 +1958,8 @@ printf("# deferral of %d\n", deferred); for(i=retFirst; i