Is accessing AI review's metadata for many users possible?

I’d like to make the large-scale analysis of the games. The answers I’d like to find are:

  • what is the difference between given level and another in terms of points loss
  • how does the user compare to other players e.g. should one practice midgame/joseki/fuseki, etc.

This knowledge would be helpful for me to understand the nature of a game, set the goals etc.

Basically the public data would be already a lot of information, especially the standard performance trend plotted for every game. Obviously more AI metadata (average points lost) would be also helpful.

I tried to access OGS API and even with token it looks like I can really download the game, and further reviews.

Can anyone confirm/deny if I should be able to get the data I’m looking for via API?

2 Likes

You can download the games, yes.

If you want an ai to analyse them and classify the players’ styles, then you’ll need to run an AI yourself.

There are several ai projects out there with the goal of inferring a player’s rank or style from their moves. You’ll have to look them up.

I think getting AI information should already be possible on a per-game basis, because the web client can get that information too. So checking out the (open) source code for the web client could tell you how to do that.

Might want to see if the SGF with AI commentary would suffice: online-go.com/api/v1/games/<GAME_ID>/sgf?ai_review=<REVIEW_ID>

The client code for AI review is kind of hairy :sweat_smile:

Edit: for example, https://online-go.com/api/v1/games/48137357/sgf?ai_review=17d694c7-1e38-4c0b-8389-9af9775b1902

2 Likes

Thank you all for your comments.

It would be all much easier to understand for me, if I could successfully parse endpoints. Maybe I can get help here?

This is the Python code I have. After obtaining the token correctly, this code is returning me a nice parsed dictionary with all my games:

url = "https://online-go.com/api/v1/me/games"
games = requests.get(url, headers={"Authorization": "Bearer " + token})
games = games.json()

However, when I’m hitting other endpoints, for example http://online-go.com/v1/games/, I am getting some html page in the games.content that starts with:

'<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Play Go at online-go.com! | OGS</title>

So it looks like I can just access the /me information. Anyone knows the reason?

Fortunately I realized the problem with my requests was that I was using http (from docs…) instead of https.

Hello, thanks for the response! When I download the sgf from the link you included, I can see there is no other metadata than just a game. The only mention of AI is:
“C[AI Review by KataGo strength 12000 using the 40x256 network b40c256-s11101799168-d2715431527.”

also the endpoint https://online-go.com/api/v1/games/48137357/reviews shows the count==0

Oh huh, I should have checked that before posting a link. I found another example that seems to have all the variations/winrates: https://online-go.com/api/v1/games/48160826/sgf?ai_review=af3c0a24-ff8c-4011-8702-7e88fe59f4cf

But it’s strange the other one doesn’t show up.

I think this is just human reviews. I started a review on this game, and now something shows up: Game Reviews – Django REST framework

This one:
https://online-go.com/api/v1/games/48160826/sgf?ai_review=af3c0a24-ff8c-4011-8702-7e88fe59f4cf
doesn’t include any ai review either. Do you see something? Maybe that’s just for the player? I can see the variations on OGS, but nothing in the file / via API

Oh weird I think we found a bug. I definitely got AI variations the first time, but they’re gone now.

Here’s what showed up yesterday:

48160826-066-benjito-Xipe Totec(1).sgf (205.6 KB)

Or maybe the link I get from copying is invalid… hmm

Wow. Indeed what you’re showing is exactly what I’m looking for… and indeed it doesn’t exist in the link anymore.

I’m not familiar with ogs development group, should I make an issue on github or reference someone here?