replyDep = (depth < 1 ? depth-1 : iterDep);\r
while(++iterDep <= depth || iterDep == 1) {\r
if(flag && depth>= 0) printf("iter %d:%d\n", depth,iterDep),fflush(stdout);\r
+ oldBest = bestScore;\r
iterAlpha = alpha; bestScore = -INF; bestMoveNr = 0; resDep = 60;\r
for(curMove = firstMove; ; curMove++) { // loop over moves\r
if(flag && depth>= 0) printf("phase=%d: first/curr/last = %d / %d / %d\n", phase, firstMove, curMove, msp);fflush(stdout);\r
if(postThinking > 0) {\r
int i; // WB thinking output\r
printf("%d %d %d %d", iterDep, bestScore, (GetTickCount() - startTime)/10, nodes);\r
+ if(ponderMove) printf(" (%s)", MoveToText(ponderMove, 0));\r
for(i=0; pv[i]; i++) printf(" %s", MoveToText(pv[i], 0));\r
if(iterDep == 1) printf(" { root eval = %4.2f dif = %4.2f; abs = %4.2f}", curEval/100., difEval/100., PSTest()/100.);\r
printf("\n");\r
fflush(stdout);\r
}\r
+printf("# s=%d t=%d 1=%d 3=%d f=%d\n",startTime,GetTickCount(),tlim1,tlim3,abortFlag);\r
if(!(abortFlag & 1) && GetTickCount() - startTime > tlim1) break; // do not start iteration we can (most likely) not finish\r
}\r
replyDep = iterDep;\r
if(stm == engineSide) { // if it is the engine's turn to move, set it thinking, and let it move\r
\r
pboard(board);\r
+ SetSearchTimes(10*timeLeft);\r
score = SearchBestMove(&move, &ponderMove);\r
\r
if(move == INVALID) { // game apparently ended\r
PrintResult(stm, score);\r
} else {\r
stm = MakeMove2(stm, move); // assumes MakeMove returns new side to move\r
- gameMove[moveNr++] = move; // remember game\r
+ gameMove[moveNr++] = move; // remember game\r
printf("move %s\n", MoveToText(move, 1));\r
listEnd = 0;\r
+ continue;\r
}\r
}\r
\r
}\r
continue;\r
}\r
+ ponderMove = INVALID; // the following commands change the position, invalidating ponder move\r
listEnd = 0;\r
if(!strcmp(command, "new")) {\r
engineSide = BLACK; Init(V_CHESS); stm = Setup2(NULL); maxDepth = MAXPLY; randomize = OFF; curVarNr = comp = 0;\r