UCI Win/Draw/Loss reporting

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
hgm
Posts: 23725
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: UCI Win/Draw/Loss reporting

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'. 8-)

User avatar
phhnguyen
Posts: 397
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: UCI Win/Draw/Loss reporting

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

Image
https://banksiagui.com
A freeware chess GUI, based on opensource Banksia - the chess tournament manager

crem
Posts: 125
Joined: Wed May 23, 2018 7:29 pm

Re: UCI Win/Draw/Loss reporting

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.
Image

User avatar
phhnguyen
Posts: 397
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: UCI Win/Draw/Loss reporting

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.

Image

Image
https://banksiagui.com
A freeware chess GUI, based on opensource Banksia - the chess tournament manager

Gian-Carlo Pascutto
Posts: 1185
Joined: Sat Dec 13, 2008 6:00 pm
Contact:

Re: UCI Win/Draw/Loss reporting

Post by Gian-Carlo Pascutto » 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.

Rémi Coulom
Posts: 434
Joined: Mon Apr 24, 2006 6:06 pm
Contact:

Re: UCI Win/Draw/Loss reporting

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.

Post Reply