#define NONE 2\r
#define ANALYZE 3\r
\r
-char move[2000][10], checkOptions[8192], iniPos[256], hashOpt[20], pause, pondering, suspended, ponder, post, hasHash, c, sc='c', *suffix, *variants;\r
-int mps, tc, inc, sTime, depth, myTime, hisTime, stm, computer = NONE, memory, oldMem=0, cores, moveNr, lastDepth, lastScore, startTime, debug;\r
+char move[2000][10], checkOptions[8192], iniPos[256], hashOpt[20], pause, pondering, suspended, ponder, post, hasHash, c, sc='c', suffix[81], *variants;\r
+int mps, tc, inc, sTime, depth, myTime, hisTime, stm, computer = NONE, memory, oldMem=0, cores, moveNr, lastDepth, lastScore, startTime, debug, flob;\r
int statDepth, statScore, statNodes, statTime, currNr, size, collect, nr, sm, inex, on[500], frc;\r
char currMove[20], moveMap[500][10], /* for analyze mode */ canPonder[20], threadOpt[20];\r
char board[100]; // XQ board for UCCI\r
DPRINT( "\n# go%s %stime %d %stime %d", ponder, bTime, black ? myTime : hisTime, wTime, !black ? myTime : hisTime);\r
if(sTime > 0) { fprintf(toE, " movetime %d", sTime); DPRINT(" movetime %d", sTime); } else\r
if(mps) { fprintf(toE, " movestogo %d", mps*(nr/(2*mps)+1)-nr/2); DPRINT(" movestogo %d", mps*(nr/(2*mps)+1)-nr/2); }\r
- if(inc && !suffix) { fprintf(toE, " %s %d %s %d", wInc, inc, bInc, inc); DPRINT(" %s %d %s %d", wInc, inc, bInc, inc); }\r
+ if(flob) sprintf(suffix, " byoyomi %d", inc + myTime/40); // for engines running purely on byoyomi\r
+ if(inc && !*suffix) { fprintf(toE, " %s %d %s %d", wInc, inc, bInc, inc); DPRINT(" %s %d %s %d", wInc, inc, bInc, inc); }\r
if(depth > 0) { fprintf(toE, " depth %d", depth); DPRINT(" depth %d", depth); }\r
- if(suffix) { fprintf(toE, suffix, inc); DPRINT(suffix, inc); }\r
+ if(*suffix) { fprintf(toE, suffix, inc); DPRINT(suffix, inc); }\r
fprintf(toE, "\n"); DPRINT("\n");\r
}\r
\r
} else move[moveNr][0] = 0;\r
Move4GUI(line+9);\r
printf("move %s\n", line+9); // send move to GUI\r
+ if(move[moveNr][0]) printf("Hint: %s\n", move[moveNr]);\r
if(pause) { pause = 0; Sync(WAKEUP); } // release commands that came in during think\r
if(lastScore == 100001 && iniPos[0] != 'f') { printf("%s {mate}\n", stm == BLACK ? "1-0" : "0-1"); computer = NONE; }\r
}\r
else if(!strcmp(command, "info")) {\r
- int d=0, s=0, t=0, n=0;\r
+ int d=0, s=0, t=(GetTickCount() - startTime)/10, n=1;\r
char *pv;\r
if(sscanf(line+5, "string times @ %c", &dummy) == 1) { printf("# %s", line+12); continue; }\r
if(collect && (pv = strstr(line+5, "currmove "))) {\r
else if(!strcmp(command, "option")) {\r
char name[80], *p;\r
if(sscanf(line+7, "UCI2WB debug output=%d", &debug) == 1) ; else\r
+ if(sscanf(line+7, "Floating Byoyomi=%d", &flob) == 1) ; else\r
if(p = strchr(line, '=')) {\r
*p++ = 0;\r
if(strstr(checkOptions, line+7)) sprintf(p, "%s\n", atoi(p) ? "true" : "false");\r
if(!variants) variants = sc=='s' ? "shogi,5x5+5_shogi" : VARIANTS;\r
printf("feature variants=\"%s\" setboard=1 usermove=1 debug=1 ping=1 reuse=0 exclude=1 pause=1 sigint=0 sigterm=0 done=0\n", variants);\r
printf("feature option=\"UCI2WB debug output -check %d\"\n", debug);\r
+ if(sc == 's') printf("feature option=\"Floating Byoyomi -check %d\"\n", flob);\r
fprintf(toE, sc == 'x' ? "ucci\n" : "u%ci\n", sc); fflush(toE); // prompt UCI engine for options\r
Sync(PAUSE); // wait for uciok\r
}\r
if(argc > 1 && argv[1][0] == '-') { sc = argv[1][1]; argc--; argv++; }\r
if(argc < 2) { printf("usage is: U%cI2WB [debug] [-s] <engine.exe> [<engine directory>]\n", sc-32); exit(-1); }\r
if(argc > 2) dir = argv[2];\r
- if(argc > 3) suffix = argv[3];\r
+ if(argc > 3) strncpy(suffix, argv[3], 80);\r
\r
if(sc == 'x') nameWord = valueWord = bTime = "", wTime = "opp", bInc = "increment", wInc = "oppincrement", unit = 1000; // switch to UCCI keywords\r
else if(sc == 'f' ) frc = -1, sc = 'c'; // UCI for unannounced Chess960\r