From 007b58c758fdb300cbe21a202f85ebe733f6a786 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Tue, 12 Apr 2016 20:38:24 +0200 Subject: [PATCH] Set suspected non-standard Chess960 check options Any check-type option containing the substring "960" or "frc" in their name will be set automatically when UCI2WB is run with the -f option. They will also be reported to the GUI, but always as having default setting 'true', no matter what their original default setting was, to reflect the new reality. So the potential damage this heuristic can do is limited to altereing the default. --- UCI2WB.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/UCI2WB.c b/UCI2WB.c index fb80b68..ac6f788 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -308,6 +308,9 @@ Engine2GUI() if(p = strstr(line+6, " default ")) sscanf(p+1, "default %[^\n]*", val), *p = '\n'; if(!(p = strstr(line+6, " name "))) p = line+1; sscanf(p+6, "%[^\n]", name); // 'name' is omitted in UCCI if(!strcasecmp(name, "UCI_Chess960")) { frc=2; continue; } + if(frc< 0 && (strstr(name, "960") || strcasestr(name, "frc")) && !strcmp(type, "check")) { + fprintf(toE, "setoption name %s value true\n", name); strcpy(val, "true"); // set non-standard suspected FRC options + } if(!strcasecmp(name, "Threads")) { strcpy(threadOpt, name); continue; } if(!strcasecmp(name, "Ponder") || !strcasecmp(name, "USI_Ponder")) { strcpy(canPonder, name); continue; } if(!strcasecmp(name, "Hash") || !strcasecmp(name, "USI_Hash") || !strcasecmp(name, "hashsize")) { -- 1.7.0.4