This is probably the safest option for backward compatibility.
However, if it can be proved that almost all the GUIs will just ignore the additional wdl info, I think it would be best to not add any option at all.
Moderators: hgm, Rebel, chrisw
In many GUIs the options are showed to the user without modifying the case.
Code: Select all
option name Debug Log File type string default
option name Contempt type spin default 24 min -100 max 100
option name Analysis Contempt type combo default Both var Off var White var Black var Both
option name Threads type spin default 1 min 1 max 512
option name Hash type spin default 16 min 1 max 131072
option name Clear Hash type button
option name Ponder type check default false
option name MultiPV type spin default 1 min 1 max 500
option name Skill Level type spin default 20 min 0 max 20
option name Move Overhead type spin default 30 min 0 max 5000
option name Minimum Thinking Time type spin default 20 min 0 max 5000
option name Slow Mover type spin default 84 min 10 max 1000
option name nodestime type spin default 0 min 0 max 10000
option name UCI_Chess960 type check default false
option name UCI_AnalyseMode type check default false
option name SyzygyPath type string default <empty>
option name SyzygyProbeDepth type spin default 1 min 1 max 100
option name Syzygy50MoveRule type check default true
option name SyzygyProbeLimit type spin default 7 min 0 max 7
I also like the consistency in using spaces vs underscores vs camelCase for multiword params.Fulvio wrote: ↑Thu Oct 31, 2019 5:05 pmIn many GUIs the options are showed to the user without modifying the case.
Also some people save the output of the engine to a txt file.
For example Stockfish almost fully respect that convention:and notice how ugly is "nodestime" compared to the others.Code: Select all
option name Debug Log File type string default option name Contempt type spin default 24 min -100 max 100 option name Analysis Contempt type combo default Both var Off var White var Black var Both option name Threads type spin default 1 min 1 max 512 option name Hash type spin default 16 min 1 max 131072 option name Clear Hash type button option name Ponder type check default false option name MultiPV type spin default 1 min 1 max 500 option name Skill Level type spin default 20 min 0 max 20 option name Move Overhead type spin default 30 min 0 max 5000 option name Minimum Thinking Time type spin default 20 min 0 max 5000 option name Slow Mover type spin default 84 min 10 max 1000 option name nodestime type spin default 0 min 0 max 10000 option name UCI_Chess960 type check default false option name UCI_AnalyseMode type check default false option name SyzygyPath type string default <empty> option name SyzygyProbeDepth type spin default 1 min 1 max 100 option name Syzygy50MoveRule type check default true option name SyzygyProbeLimit type spin default 7 min 0 max 7
But this becomes a decision of the engine author. No matter what we define as a standard name, the case insensitivity gives the engine author the freedom to 'style' the option name in any way he prefers.
That's correct as per the UCI spec:
But it should still fit in with the other parameters of the UCI spec - if it is even necessary, which it shouldn't be.The name and value of the option in <id> should not be case sensitive and can inlude spaces.
Especially because engines like LC0 score only in terms of probability - without WDL support, there is no meaningful eval display possible. Printing the score in centipawns and expecting the user to know this is meant as win score expectation is a bad hack anyway. The other way around fails also because LC0 cannot just print the eval in centipawns instead.
You can use the logit of the probability of winning, and multiply it by a constant so that it looks like centipawns. I do this for my program, and it works very well.Ras wrote: ↑Thu Oct 31, 2019 6:56 pm Especially because engines like LC0 score only in terms of probability - without WDL support, there is no meaningful eval display possible. Printing the score in centipawns and expecting the user to know this is meant as win score expectation is a bad hack anyway. The other way around fails also because LC0 cannot just print the eval in centipawns instead.
Salut Rémi,Rémi Coulom wrote: ↑Thu Oct 31, 2019 11:33 pm
You can use the logit of the probability of winning, and multiply it by a constant so that it looks like centipawns. I do this for my program, and it works very well.
I guess all GUIs scan for keywords too, thus it is safe to put anything programmers want, just avoid keywords.hgm wrote: ↑Thu Oct 31, 2019 9:16 pm In UCI2WB I just scan with strstr (or StrCaseStr) for the keywords of the standard infos, and then read the token that follows them as the corresponding value. So it would indeed just ignore the 'wdl' and its parameters.
This is not optimally efficient; it would be better to just scan through the info string once testing every token for being an info name (e.g. through a small hash table of keywords). Then you only have to traverse the info string once. But I was lazy, and just repeating the strstr on the entire string produced the simplest code.
Code: Select all
info depth abc
hgm wrote: ↑Thu Oct 31, 2019 9:16 pm In UCI2WB I just scan with strstr (or StrCaseStr) for the keywords of the standard infos, and then read the token that follows them as the corresponding value. So it would indeed just ignore the 'wdl' and its parameters.
This is not optimally efficient; it would be better to just scan through the info string once testing every token for being an info name (e.g. through a small hash table of keywords). Then you only have to traverse the info string once. But I was lazy, and just repeating the strstr on the entire string produced the simplest code.
Code: Select all
void parseInfoUCI(const char* info) {
long valueNum;
const char* value;
while ((value = strchr(info, ' ')) != NULL) {
//Calculate length and skip the space
switch (value++ - info) {
case 2:
if (memcmp(info, "pv", 2) == 0) {
// Do something with value
return;
}
break;
case 3:
if (memcmp(info, "nps", 3) == 0) {
valueNum = strtol(value, (char**) &info, 10);
// Do something with valueNum
continue;
}
/// etc...
}
// Unknown: ignore it
info = value;
}
}