Is there a way to get the current board state of an active OGS game from the API instead of just the sequence of moves played?

Hello again! I am still working on this app and it would be really convenient if it were possible to pull the board state of an active (or completed for that matter) game instead of just getting the moves played in order.

If this isn’t possible I can work with the list of moves, but thought I would ask before I go and write that code. Let me know if there is a way to do this!


1 Like

Not that I know of.

There does seems to be two methods of getting game data though


The termination api data seems to be recommended


Thanks for this. Do you happen to know of any libraries for calculating liberties of groups? I began writing code for this but it would be great if this already exists. Looking for python ideally. Thanks!

1 Like

I’m not really sure.

It looks like some people tried to collect some resources though

There’s probably a bunch of random bits of python code though that people have made

deep_learning_and_the_game_of_go/ at master · maxpumperla/deep_learning_and_the_game_of_go · GitHub from GitHub - maxpumperla/deep_learning_and_the_game_of_go: Code and other material for the book "Deep Learning and the Game of Go"

is in python I believe.

I think deepmind was supposed to have some C++ libraries for games GitHub - deepmind/open_spiel: OpenSpiel is a collection of environments and algorithms for research in general reinforcement learning and search/planning in games. with some code open_spiel/open_spiel/games/go at master · deepmind/open_spiel · GitHub

The core API and games are implemented in C++ and exposed to Python. Algorithms and tools are written both in C++ and Python.

I must’ve tried googling for things before:


This is what you’re looking for I think: for example

The board state is a 2d array, 0 is empty, 1 is black, 2 is white


Oh thanks so much, this is exactly what I need and will save tons of time!


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.