Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI win rate graph support #19

Open
marant opened this issue Jun 27, 2020 · 3 comments
Open

AI win rate graph support #19

marant opened this issue Jun 27, 2020 · 3 comments

Comments

@marant
Copy link

marant commented Jun 27, 2020

Having an option to enable rendering of AI win rate graphs for SGFs that have that information would be great. Having the graph display some kind of a marker for the current move would be nice as well.

If this is not possible, would it be possible to add callbacks for tree navigation events so that users could add their own graphing functionality?

@yewang
Copy link
Owner

yewang commented Jun 29, 2020

That sounds like a nice feature idea. However, I'm not sure how to best do that, since I'm not familiar with the format that AI win rate information is typically encoded into SGFs. Is there now some sort of standard for how AI engines format this information in their SGF output?

As for callbacks for tree navigation events, the core editor object (see editor.js) is already designed to notify the list of objects of the various GUI panels, and one of the types of notification messages is for a navigation change.

@marant
Copy link
Author

marant commented Jun 29, 2020

I didn't find any mentions of any kind of standard online, so I created two sample files with Lizzie using KataGo and LeelaZero. Lizzie seems to store the AI analysis information in LZ properties for both bots. Here are the examples (I removed a lots of variations generated by the bot, they are in the same property):

  • KataGo: B[pd]LZ[0.7.2 41.6 2.8k move D4 visits 988 winrate 5846 scoreMean 0.739948 <SNIP> ];
  • LeelaZero: B[pd]LZ[0.7.2 42.7 34k move D4 visits 14761 winrate 5740 <SNIP>]

I also downloaded a SGF from online-go.com (using the "SGF With AI Review" feature) to see how they store the AI analysis information for their games and seems like the downloaded SGFs contain the information in C properties, but the information is apparently only provided for variations. Here's an example comment from such a file:

  • C[Black's win rate: %100.0 visits: 745]

I'll take a look at SGFs produced by other tools later. For now it seems that getting this information out of SGFs saved with Lizzie is relatively straightforward. I might look into this myself at some point, but I can't promise anything.

@yewang
Copy link
Owner

yewang commented Jul 15, 2020

@marant, I don't think that I will have time to implement a feature like this in the near or mid-term.

However, I found out today that another user of BesoGo has already implemented something similar.

See this post from the Nordic Go Dojo website
https://www.nordicgodojo.eu/post/103/winrate-graphs-in-ai-analysed-games-and-sample-ngd-game-review

Perhaps they might be willing to share their code if you reach out to them.

@ParmuzinAlexander ParmuzinAlexander mentioned this issue Jun 1, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants