GoGui Overview for Cmput 455

GoGui is a graphical user interface (GUI) and set of tools for the game of Go. GoGui is written in Java. It was originally developed at University of Alberta by Markus Enzenberger. Recently, Remi Coulom added support for games other than Go; we use his most recent version 1.5.1 in this course. We use this GUI for all game projects that support it.

Regression testing with gogui-regress

This example assumes you have downloaded the Go1 program.

Make sure that gogui-regress is in your PATH

Type on the command line:


If the response is

Usage: gogui-regress [options] program test.tst [...]

then everything is set up. However, if the reply is something like

gogui-regress: Command not found.

... then you need to set up your PATH to add the location where you installed the gogui tools. For example, on my machine they are at /Applications/gogui-1.5.1/bin .

Run gogui-regress

This example shows how to run a test using the assignment1-public-tests.gtp file in the assignment1 directory. Change into the assignment1 directory and type

gogui-regress ./ public-tests-nogo.gtp

Then open index.html in your browser to see the results.

Example - Playing Test Games with gogui-twogtp

This example assumes you have two versions of your Go program. gogui-twogtp is a tool for playing games between two Go programs.

Make sure that gogui-twogtp is in your PATH. Same procedure as for gogui-regress above.

For using gogui-twogtp to play test games between two players, it is most convenient to use a small shell script. You can save the text below as a script such as, modify it to suit your needs, and run it. The example plays 10 games on 3x3 between Go1 and Go2.

set -eu
RESULTDIR="path to where to store your experiment here"
# Modify paths to your programs below as needed

run() {
echo Match with $NUGAMES games on board size $BOARDSIZE. Storing results in $RESULTDIR

mkdir -p $RESULTDIR
$TWOGTP -black "$GO1" -white "$GO2" \
-auto  -komi 0 -size $BOARDSIZE -games $NUGAMES \
-sgffile $RESULTDIR/game 

$TWOGTP -analyze $RESULTDIR/game.dat -force


Once you have a script that you like, run it with

chmod u+x

gogui-twogtp will run the specified number of games ($NUGAMES) between two players $GO1 and $GO2. In the example, GO1 always plays black, but you can use the option -alternate.

The first run of gogui-twogtp will produce a file with ending .dat with the raw results. The second run, gogui-twogtp -analyze, will produce a html file with the result.

GoGui visualisation of policy moves

Starting with Go3, our programs implement the functionality to view the output of the GTP policy_moves command on the board. Here are the steps:



Watching games in GoGui with gogui-twogtp

It is possible, if not exactly intuitive, to have GoGui play a game between two different Go engines. Here is the procedure:

Created: Jan 15, 2017 Last modified: Aug 26, 2020

Martin Müller and Ting-Han Wei