Discussion of chess software programming and technical issues.
Moderators: hgm, Dann Corbit, Harvey Williamson
Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
-
hgm
- Posts: 25922
- Joined: Fri Mar 10, 2006 9:06 am
- Location: Amsterdam
- Full name: H G Muller
-
Contact:
Post
by hgm » Fri Nov 01, 2019 8:27 am
Fulvio wrote: ↑Fri Nov 01, 2019 8:18 am
hgm wrote: ↑Thu Oct 31, 2019 8: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;
}
}
I guess this counts as 'hashing by length'.

-
phhnguyen
- Posts: 895
- Joined: Wed Apr 21, 2010 2:58 am
- Location: Australia
- Full name: Nguyen Hong Pham
-
Contact:
Post
by phhnguyen » Tue Nov 19, 2019 8:44 am
I am going to support UCI_ShowWDL in the next release of Banksia GUI. The WDL data will be
- turned on/off via UCI_ShowWDL option
- saved into PGN in the form of W/D/L (similar way to write down score/depth time node)
- shown in engine info box as a simple string
- shown in score-chart as simple bars (selectable between W/D/L)
Any idea, suggestion? Thanks

-
crem
- Posts: 169
- Joined: Wed May 23, 2018 7:29 pm
Post
by crem » Tue Nov 19, 2019 12:25 pm
phhnguyen wrote: ↑Tue Nov 19, 2019 8:44 am
I am going to support UCI_ShowWDL in the next release of Banksia GUI. The WDL data will be
- shown in score-chart as simple bars (selectable between W/D/L)
I think it would be the most convenient to use stacked graph for WDL visualization.

-
phhnguyen
- Posts: 895
- Joined: Wed Apr 21, 2010 2:58 am
- Location: Australia
- Full name: Nguyen Hong Pham
-
Contact:
Post
by phhnguyen » Tue Nov 19, 2019 9:43 pm
crem wrote: ↑Tue Nov 19, 2019 12:25 pm
phhnguyen wrote: ↑Tue Nov 19, 2019 8:44 am
I am going to support UCI_ShowWDL in the next release of Banksia GUI. The WDL data will be
- shown in score-chart as simple bars (selectable between W/D/L)
I think it would be the most convenient to use stacked graph for WDL visualization.
Thanks for the suggestion. I have implemented it. Now BSG can display WDL in both stacked area and stacked bar charts. Chart types and colors are selectable.

-
Rémi Coulom
- Posts: 436
- Joined: Mon Apr 24, 2006 6:06 pm
-
Contact:
Post
by Rémi Coulom » Wed Nov 20, 2019 9:45 pm
Gian-Carlo Pascutto wrote: ↑Wed Nov 20, 2019 3:27 pm
Rémi Coulom wrote: ↑Thu Oct 31, 2019 10: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 use this, which is the same thing right?
https://www.chessprogramming.org/Pawn_A ... e,_and_Elo
It's convenient to remember and reason that 1 pawn = 100 centipawn = +100 Elo = 63% winrate.
Yes, it is the same thing.