Page 7 of 7

Re: UCI Win/Draw/Loss reporting

Posted: Fri Nov 01, 2019 8:27 am
by hgm
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-)

Re: UCI Win/Draw/Loss reporting

Posted: Tue Nov 19, 2019 8:44 am
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

Re: UCI Win/Draw/Loss reporting

Posted: Tue Nov 19, 2019 12:25 pm
by crem
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

Re: UCI Win/Draw/Loss reporting

Posted: Tue Nov 19, 2019 9:43 pm
by phhnguyen
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

Re: UCI Win/Draw/Loss reporting

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

Re: UCI Win/Draw/Loss reporting

Posted: Wed Nov 20, 2019 9:45 pm
by Rémi Coulom
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.