I guess this counts as 'hashing by length'.Fulvio wrote: ↑Fri Nov 01, 2019 9:18 amhgm 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; } }
UCI Win/Draw/Loss reporting
Moderators: hgm, Rebel, chrisw
-
- Posts: 27866
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: UCI Win/Draw/Loss reporting
-
- Posts: 1447
- Joined: Wed Apr 21, 2010 4:58 am
- Location: Australia
- Full name: Nguyen Hong Pham
Re: UCI Win/Draw/Loss reporting
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)
https://banksiagui.com
The most features chess GUI, based on opensource Banksia - the chess tournament manager
The most features chess GUI, based on opensource Banksia - the chess tournament manager
-
- Posts: 177
- Joined: Wed May 23, 2018 9:29 pm
-
- Posts: 1447
- Joined: Wed Apr 21, 2010 4:58 am
- Location: Australia
- Full name: Nguyen Hong Pham
Re: UCI Win/Draw/Loss reporting
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.
https://banksiagui.com
The most features chess GUI, based on opensource Banksia - the chess tournament manager
The most features chess GUI, based on opensource Banksia - the chess tournament manager
-
- Posts: 1243
- Joined: Sat Dec 13, 2008 7:00 pm
Re: UCI Win/Draw/Loss reporting
I use this, which is the same thing right?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.
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.
-
- Posts: 438
- Joined: Mon Apr 24, 2006 8:06 pm
Re: UCI Win/Draw/Loss reporting
Yes, it is the same thing.Gian-Carlo Pascutto wrote: ↑Wed Nov 20, 2019 4:27 pmI use this, which is the same thing right?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.
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.