X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=hachu.c;h=07398bebc77cde7aa0de4a4c5b721570ee58dda7;hb=179bc3d3c6e5d65c14c0bff1b896cc72b7f919df;hp=fd6cbfef2d4a8a2406197e7e03b67e9fd000a373;hpb=4b32cf9c95afe8272e7a1e68be72a48c99235a65;p=hachu.git diff --git a/hachu.c b/hachu.c index fd6cbfe..07398be 100644 --- a/hachu.c +++ b/hachu.c @@ -409,6 +409,13 @@ typedef struct { char age; } HashEntry; // hash-table entry + // Some global variables that control your engine's behavior + int ponder; + int randomize; + int postThinking; + int resign; // engine-defined option + int contemptFactor; // likewise + int squareKey[BSIZE]; int rawBoard[BSIZE + 11*BW + 6]; @@ -1384,6 +1391,12 @@ if(PATH) printf("%d:%2d:%d %3d %6x %-10s %6d %6d\n", level, depth, iterDep, curM } // next move cutoff: if(!level) { // root node + if(postThinking > 0) { + 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(GetTickCount() - startTime > tlim1) break; // do not start iteration we can (most likely) not finish } replyDep = iterDep; @@ -1590,7 +1603,9 @@ ParseMove (char *moveText) if(*moveText == '+') ret |= PROMOTE; printf("# suppress = %c%d\n", sup1%BW+'a', sup1/BW); MapFromScratch(attacks); + postThinking--; Search(-INF-1, INF+1, 0, 1, sup1, sup2); + postThinking++; for(i=retFirst; i> SQLEN & SQUARE)) break; // any null move matches @@@@ @@ -1623,7 +1638,9 @@ Highlight(char *coords) ReadSquare(coords, &sqr); MapFromScratch(attacks); flag=1; + postThinking--; Search(-INF-1, INF+1, 0, 1, sup1, sup2); + postThinking++; flag=0; for(i=retFirst; i>SQLEN & SQUARE)) { @@ -1690,13 +1707,6 @@ PonderUntilInput (int stm) { } - // Some global variables that control your engine's behavior - int ponder; - int randomize; - int postThinking; - int resign; // engine-defined option - int contemptFactor; // likewise - int TakeBack(int n) { // reset the game and then replay it to the desired point int last, stm;