UCI Win/Draw/Loss reporting

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: UCI Win/Draw/Loss reporting

Post by hgm »

Fulvio wrote: Fri Nov 01, 2019 9:18 am
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;
    }
}
I guess this counts as 'hashing by length'. 8-)
User avatar
phhnguyen
Posts: 1434
Joined: Wed Apr 21, 2010 4:58 am
Location: Australia
Full name: Nguyen Hong Pham

Re: UCI Win/Draw/Loss reporting

Post by phhnguyen »

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

Image
https://banksiagui.com
The most features chess GUI, based on opensource Banksia - the chess tournament manager
crem
Posts: 177
Joined: Wed May 23, 2018 9:29 pm

Re: UCI Win/Draw/Loss reporting

Post by crem »

phhnguyen wrote: Tue Nov 19, 2019 9: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.
Image
User avatar
phhnguyen
Posts: 1434
Joined: Wed Apr 21, 2010 4:58 am
Location: Australia
Full name: Nguyen Hong Pham

Re: UCI Win/Draw/Loss reporting

Post by phhnguyen »

crem wrote: Tue Nov 19, 2019 1:25 pm
phhnguyen wrote: Tue Nov 19, 2019 9: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.

Image

Image
https://banksiagui.com
The most features chess GUI, based on opensource Banksia - the chess tournament manager
Gian-Carlo Pascutto
Posts: 1243
Joined: Sat Dec 13, 2008 7:00 pm

Re: UCI Win/Draw/Loss reporting

Post by Gian-Carlo Pascutto »

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 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.
Rémi Coulom
Posts: 438
Joined: Mon Apr 24, 2006 8:06 pm

Re: UCI Win/Draw/Loss reporting

Post by Rémi Coulom »

Gian-Carlo Pascutto wrote: Wed Nov 20, 2019 4:27 pm
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 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.