online-go / online-go.com

Source code for the Online-Go.com web interface
https://online-go.com/
GNU Affero General Public License v3.0
1.26k stars 346 forks source link

AI win rate graph for main branch of demo/review board #2862

Open JDNdeveloper opened 1 week ago

JDNdeveloper commented 1 week ago

Currently the win rate shown in the demo/review board is limited to a single board position, however it would be really useful if the win rate graph could be shown for the entire main/top branch.

My current need for this is from recording live games using a demo board. At the end of the game I'd like to review and see the win rate graph for the entire game, however this isn't possible from within the demo board. My workaround is to download the SGF and then reupload to the SGF library and run an analysis, but I'd prefer to not have a separate history of the game in two places, as well as avoid the manual download/reupload step.

My understanding for why this wasn't included originally is that demo/review boards usually have many branches, so it's not obvious which branch should be used. However, I think the main/top branch is a logical default, and would likely work for most people.

I can help make this change, however from a brief look over the code in AIDemoReview.tsx and AIReview.tsx it wasn't obvious to me how to do this. I also haven't been able to get AI reviews showing in demo boards in my dev account, which will make this harder to test. Is there a way to test that out?

anoek commented 1 week ago

There's some back end structural changes that'd need to happen to make this work as the way reviews work is fairly different than games. With games, the main line doesn't ever change when we send it off for review, with demos and reviews that's not true at all and can be copy/pasted, added and deleted, and so that flux was troublesome to deal with and a bit worrisome from a server load perspective. I think what we can probably do is do a fast pass update on those kind of changes and update a graph, then do a deeper review when someone is actually looking at a move, but implementing all of that is quite an undertaking and there have been other priorities.