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!
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
The termination-api endpoint is much faster and easier on the servers, the v1 stuff exists for backwards compatibility but should be avoided in general.
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!
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/goboard_fast.py 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:
I made a very simple Go board in Processing before. It has both a java and python scripting language
Overview \ Processing.org .
It just does everything in a main while loop and it’s pretty easy to draw graphics to the screen.
Other than that I guess to just make a “Go board” you just need some lists or arrays and few functions to update the elements of the arrays, whether with a mouse click or with user input from a terminal for example. It can be a bit more complicated to implement a superko…
This is what you’re looking for I think:
https://online-go.com/termination-api/game/GAMEID/state for example https://online-go.com/termination-api/game/44478587/state
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!