From: H.G.Muller Date: Sat, 24 Dec 2016 18:39:57 +0000 (+0100) Subject: Print egt feature X-Git-Tag: v4.0~38 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=253fce139bb060488cd0cf4eabef66775b52c6fb;p=uci2wb.git Print egt feature Options of the form xxxPath for xxx = Nalimov, Gaviota of Syzygy are now intercepted, and the EGT type name 'xxx' collected, for printing as a single egt feature when 'uciok' is received. --- diff --git a/README.txt b/README.txt index e9f2399..97a6549 100644 --- a/README.txt +++ b/README.txt @@ -50,13 +50,15 @@ H.G.Muller Change log: -22/12/2016 3.0 +24/12/2016 3.0 Implement UCI_AnalyseMode option +Support egtpath command for Nalimov, Gaviota and Syzygy Allow ?, quit, force and result commands to terminate thinking Stop search during setoption commands, or buffer those until engine is done thinking Explicitly report when engine dies, through GUI popup (tellusererror) Make sure reporting of mated-in-0 score causes resign, even without PV Fix eclipsing of -var option with engines that have UCI_Chess960 option +Fix empty default of string options 8/11/2016 2.3 Implement handling of 'UCI_Variant' option for variant announcement and selection diff --git a/UCI2WB.c b/UCI2WB.c index 6b4d19d..4d3a4df 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -32,6 +32,7 @@ // Set VARIANTS for in WinBoard variant feature. (With -s option this will always be reset to use "shogi".) #define VARIANTS ",normal,xiangqi" #define STDVARS "chess,chess960,crazyhouse,threecheck,giveaway,atomic,seirawan,shogi,xiangqi" +#define EGT ",syzygypath,nalimovpath,gaviotapath," #define DPRINT if(debug) printf #define EPRINT(X) { char f[999]; sprintf X; DPRINT("%s", f); fprintf(toE, "%s", f + 2*(*f == '#')); /* strip optional # prefix */ } @@ -255,7 +256,7 @@ GetChar() void * Engine2GUI() { - char line[1024], command[256]; + char line[1024], command[256]; static char egts[999]; if(fromF = fopen("DefectiveEngineOptions.ini", "r")) printf("# fake engine input\n"); while(1) { @@ -354,6 +355,7 @@ Engine2GUI() } if(!strcasecmp(name, "newgame") && !strcmp(type, "button")) { newGame++; continue; } if(!strcasecmp(name, "usemillisec")) { unit = (!strcmp(val, "false") ? 2 : 1); continue; } + sprintf(buf, ",%s,", name); if(strcasestr(EGT, buf)) { buf[strlen(buf)-5] = 0; strcat(egts, buf); continue; } // collect EGT formats // pass on engine-defined option as WB option feature if(!strcmp(type, "filename")) type[4] = 0; sprintf(buf, "feature option=\"%s -%s", name, type); q = buf + strlen(buf); @@ -388,6 +390,7 @@ Engine2GUI() else *p++ = *q++; // copy other variant names unmodified if(frc) sprintf(p, ",normal,fischerandom"), printf("feature oocastle=%d\n", frc<0); // unannounced FRC uses O-O castling if(*varList) printf("feature variants=\"%s\"\n", varList+1); // from UCI_Variant combo and/or UCI_Chess960 check options + if(*egts) { for(p=egts; *p = tolower(*p); p++); printf("feature egt=\"%s\"\n", egts+1); } printf("feature smp=1 memory=%d done=1\n", hasHash); if(unit == 2) { unit = 1; EPRINT((f, "# setoption usemillisec true\n")) } Sync(WAKEUP); // done with options