Home

Awesome

goma

goma is a stochastic Go engine written in python

go•ma [ごま] noun

  1. Sesamum indicum Sesame plant, produces small oval seeds.
                      A B C D E F G H J
                    1 · · · · · · ○ · · 1
                    2 · · · · · ○ · · ○ 2
                    3 · ● · · ○ ● ○ · · 3
                    4 · ○ · ● ○ · · · · 4
                    5 · · ○ · · · · · · 5
                    6 · · ○ · · · · · · 6
                    7 · · · ● ● ● · ● · 7
                    8 · · ○ · · · ● · · 8
                    9 · · · · · ○ · · ○ 9
                      A B C D E F G H J
                    genmove B
                    =F8

Project Motivation:

This project is an outgrowth of dango, with hope of being integrated back in the future. The goal isn't to compete with neural-net Go engines, rather to write a passably decent engine from scratch. It is very much a work in progress, and should be handled as such.

Usage

Installation

To download and launch, run the following:

git clone https://github.com/gsobell/goma.git
cd goma && chmod +x goma.py
./goma.py

To install on Arch-based distros, use the PKGBUILD:

curl -O https://raw.githubusercontent.com/gsobell/goma/home/PKGBUILD
makepkg -i

You can use goma with any board GUI that supports GTP For example, with Sabaki, go to preferences -> engines -> add engine, and place /{path to goma}/goma.py in the path field.

There is also the asciiboard() function, uncommented by default, that provides an ascii terminal interface similar to GnuGo's --mode ascii.

Features

Current

Future

Moonshots

goma is already better than most humans (most humans don't know how to play go)

Examples

Here's a recent game of goma v goma, run in Sabaki:

goma v. goma
------------
 ● : goma
 ○ : goma
 +---------------------------------------+
 | ● ● ● ● ● ○ ○ ● ● ● ● ● ○ · ● ● ● ● ● |
 | ● ● ● ● ○ · ○ ● ● ● ● ● ● ○ ● ● ○ ○ ● |
 | ● ● ● ● ○ ○ ○ ○ ● ● ● ● ● ● ○ ○ ○ ● ● |
 | ● ● ● ○ ○ ● ● ● ● ● ● ○ ○ ○ ○ ○ ● ● ● |
 | ● ● ● ● ○ ● ● ● ● ● ○ · ○ ○ ○ ○ ○ ○ ● |
 | · ● ○ ○ ● ● ● ● ● ● ○ ○ ○ ○ ○ ○ ○ ○ ● |
 | ● ○ ○ ○ ○ ● ● ● ● ● ● ○ ○ ○ ○ ○ ○ ○ ○ |
 | ● ○ ○ ○ ○ ○ ● ● ● ● ● ● ○ ● ○ ○ ○ ○ ○ |
 | ● ● ○ ○ ○ ○ ○ ● ● ● ● ● ● ● ● ○ ○ ○ ○ |
 | ○ ○ ○ ○ ● ● ● ● ● ● ● ● ● ○ ○ ○ ○ ○ ○ |
 | ○ ○ ○ ○ ● ● ○ ○ ● ● ● ● ● ○ ○ ○ ○ ○ ○ |
 | ○ ○ ○ ○ ○ ○ ○ ○ ● ● ● ● ● ○ ○ ○ ○ ○ ● |
 | ○ ○ ○ ○ ○ ○ ○ ○ ● ● ● ● ● ● ● ● ● ● ● |
 | ○ ○ ○ ○ ○ ○ ● ● ● ● ● ● ○ ○ ● ● ● ● ● |
 | ○ ○ ○ · ○ ● ● ● ● ● ● ● ○ ○ ● ● ● ● ● |
 | ○ ○ ○ ● ○ ● ● ● ● ● ● ● ○ · ● ● ● ● ● |
 | ○ ○ ○ ○ ○ ○ ● ● ● ● ● ● ● ○ ● ● ● ● ● |
 | ○ ○ ○ ○ ○ ● ● ● ● ● ● ● ● ● ● ● ● ● ● |
 | ○ ○ ○ ○ ○ ● ● ● ● ● ● ● ● ● ● ● ● ● ● |
 +---------------------------------------+

Currently all games goma plays against itself end in seki.


If you like this, you might also enjoy dango.

For a very interesting overview of Computer Go and a bot in Rust: rustygo.