From: H.G. Muller Date: Tue, 17 Apr 2012 05:31:24 +0000 (+0200) Subject: Use 30msec margin in st->movetime translation X-Git-Tag: v2.0~44 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=e0f320de58c30fb0dfd700055cf00480283dfca3;p=uci2wb.git Use 30msec margin in st->movetime translation Because of the different definition of the time mentioned in the WB st and UCI movetime (max time vs exact time), a margin is needed to not make the engine forfeit on time. num --- diff --git a/README.txt b/README.txt index e3ca509..026ad8b 100644 --- a/README.txt +++ b/README.txt @@ -34,6 +34,9 @@ H.G.Muller Change log: +15/4/2012 v1.7 +Take 30ms safety margin in translating st command to movetime + 14/1/2011 v1.6 Replaced all polling by blocking synchronization (through pipes). Implemented ping (using isready/readyok) diff --git a/UCI2WB.c b/UCI2WB.c index a0abcfe..3d26fcc 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -1,6 +1,6 @@ /************************* UCI2WB by H.G.Muller ****************************/ -#define VERSION "1.6" +#define VERSION "1.7" #include #include @@ -350,7 +350,7 @@ GUI2Engine() else if(!strcmp(command, "memory")) sscanf(line, "memory %d", &memory); else if(!strcmp(command, "cores")) sscanf(line, "cores %d", &cores); else if(!strcmp(command, "sd")) sscanf(line, "sd %d", &depth); - else if(!strcmp(command, "st")) sscanf(line, "st %d", &sTime), sTime *= 1000, inc = 0; + else if(!strcmp(command, "st")) sscanf(line, "st %d", &sTime), sTime = 1000*sTime - 30, inc = 0; else if(!strcmp(command, "quit")) fprintf(toE, "quit\n"), fflush(toE), exit(0); } }