Nealo
June 28, 2022, 8:37pm
1
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!
Cheers!
1 Like
Not that I know of.
There does seems to be two methods of getting game data though
https://online-go.com/termination-api/game/44967620
and
Game Detail – Django REST framework
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.
3 Likes
Nealo
June 28, 2022, 8:47pm
3
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
Contribute to waltheri/go-libraries development by creating an account on GitHub.
There’s probably a bunch of random bits of python code though that people have made
deep_learning_and_the_game_of_go/code/dlgo/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 - google-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 https://github.com/deepmind/open_spiel/tree/master/open_spiel/games/go
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…
2 Likes
anoek
June 28, 2022, 9:19pm
5
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
9 Likes
Nealo
June 28, 2022, 10:13pm
6
Oh thanks so much, this is exactly what I need and will save tons of time!
2 Likes
system
Closed
September 28, 2022, 6:14am
7
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.