Adding a simple AI to Pocket Go
By golly I’ve done it, you can now play against a computer Go player in Pocket Go!
Admittedly, this player is extremely bad and predictable. But with some help from analyzing the Simple Player code for Fuego I have created a liberties maximizing computer player. It won’t fill in its own captured area and will try and expand the liberties of its groups (and minimize yours) which is a good enough analogue given the limited power of the Playdate and the complexities of Go.
There are still kinks to work out, like how it is very aggressive in placing stones in an area that is very clearly under your control instead of just skipping its turn, it will not respect Ko which is frustrating, and it always starts with the same moves.
It is fast enough that you won’t need to wait more than a second for the computer to make a move, but to add more intelligent moves like not giving up seki which it currently loves to do, I will need to optimize the code by converting the move scoring into C. Hopefully that gives enough of a performance boost that I can implement as many checks as possible so that it no longer plays like a 6 year old.
Let me know if you encounter any issues with the computer player, and enjoy!
Files
Get Pocket Go
Pocket Go
Take Go on the go with your Playdate.
Status | Released |
Author | Nathan Heffley |
Genre | Strategy |
Tags | Board Game, pass-and-play, Playdate |
More posts
- Pocket GoFeb 01, 2023
Leave a comment
Log in with itch.io to leave a comment.