Computer Go

How to create a bot to play Go on KGS

To have a bot playing on KGS, you will need an internet connection from a Windows, Linux, or Mac system. The system will have to be one of these as you will need to run the KGS bot-client on it.

You should start by registering an account on KGS for your bot. You do this in the same way as you would register an account for a human.

A human who plays on KGS uses the "human" client CGoban2. A Go-playing program, or "bot", uses instead, the bot-client kgsGtp. This is written in Java (like CGoban2), so it should run on any sytem with a recent version of Java installed. So you will need to download kgsGtp and install it on your system. Itis available, free, from http://www.igoweb.org/~wms/upload. It comes with an html file documenting its use: there is a copy of this file (possibly not the latest version) here.

You will need to add some code to your program, so that it can communicate in GTP, "Go Text Protocol". This protocol includes all the features of GMP, "Go Modem Protocol", and new features which are used for such things as agreeing the overtime system. Code to implement GTP in C, and documentation for GTP, are available at http://www.lysator.liu.se/~gunnar/gtp/.

If your program already supports GMP, you need not add GTP support, you can just use a GMP to GTP convertor. This is available from http://mail.gnu.org/archive/html/gnugo-devel/2003-07/msg00195.html, as C source code. Presumably if you use this method of adding GTP support, you will be restricted to using those features that are also supported by GMP, and therefore your bot won't understand, for instance, how overtime applies to its games.

There are several versions of GnuGo that support GTP and play on KGS. As GnuGo source is public, you can examine it, and see how it supports GTP. It is available from http://www.gnu.org/software/gnugo/gnugo.html.

If you want your bot to play in bot-tournaments on KGS, you must also read kgsGtp and tournament play.