Site hosted by Angelfire.com: Build your free website today!
welcome to
Remote Gnu Go


Remote GnuGo is about how to use a Pocket PC as a remote GUI client for GnuGo (or any other engine that speaks the Go Text Protocol).



If you don't want to hear the whole story, jump down to the quicksteps.


clueless about go? try senseis library!
There is a lot of stuff out for playing Go on PPCs, if you are new to the topic, check it out at sensei's library (anyway, an awesome source for everything concerning Go).

Unfortunately, the hardware of common PPCs is behind the software for about a couple of years, or, in other words: it is painfully slow.

Thus I was looking for a possibility to let the engine, actually that piece of software that slows down the PPC to jelly, run on the PC, while the GUI would be with me wherever I go (well, at least in the range of my home's WLAN). This would give me the opportunity to hang around on the couch, sit at dinner, have an eye on the children in the garden... and always have a fancy, quick game of Go with me.


napping for the answer

The only software promissing to do this is Pocket GNU Go a very cool Go playing PPC software, but I never managed to get it work remotely. Anyway, this is the place to say thanks to Ivan Davtchev, the brainbox who invented the pocket gnu go project, and who answered my call for help within hours from his mobile phone.

Finally, I found the sources of Go Suite , another stunning Go software, and, as far as I am concerned, the up to date reference for a sgf editor and GnuGo frontend on the PPC. The code was originally written by Ashley Nathan Feniello, who did a perfect job on Go Suite and a lot more, highly interesting stuff about computer GO that can be found on sensei's library. The source is now available at the mobile gnu go project, btw the one I lay all my hope in, because the propellerhats who ported gnuGo to PPC, Sid Liu and Mike Zhang are with it.



I did some few modifications on the code so that it is now possible to either play go locally on the PPC or against an engine running on a remote machine.

Hardware Requirements

What you need to play against a remote engine is quite obvious:
  • a Pocket PC with either Windows Mobile 2003 or WM5. The PPC must be equipped with a Network connector, usually a WLAN device. If you can browse the Internet on your PPC, everything should be set up right.
  • a PC(Windows or Linux)or a Mac torun the engine and
  • a running Networkthat connects the PC and the Pocket PC.

Quicksteps

Here is in short what you have to do to set up and connect GoSuite to an GTP engine on your PC. The "default download" suggests the probably most popular targets for each OS. Note, that this is not always the only or best solutions, follow the "Details" links for explanations, restrictions and  alternatives. It will also bring up detailed usage notes on each topic.


StepDescriptiondefault downloadDetails
Windows LinuxMacOS(X)
1. download the GoSuite client with network support and copy it to your Pocket PC  download download downloadcompatibility details
2. download and install a gtp engine on your PC. The most common is GnuGo, but especially for windows, there are some other engines available.GnuGo-3.7.10
GnuGo-3.6
debian bins
other
OSX 10.1
OSX 10.4.3
other
Lists of
alternatives and related links
3. download and install a network proxy for the engine. GtpProxy comes with a comfortable Gui and needs a .NET 1.1 framework or higher. GTPServer is a command line tool from the GoGui library and needs a java VM.GtpProxy
GoGui
GoGuiGoGui.net and java download links
4.start and configure the Proxy chosen in step 3.setup gtpProxy or
setup gogui/gtpserver
5.run GoSuite on your ppc and start a computer gameutilizing the new network features


Detailed setup

1. Go Suite - pimped

This is the modified GoSuite PPC client. It comes as an .exe compiled for WM 2003, no CAB, no pads, just balls. I tested it on a Dell Axim 51v with WM5, probably the most far from a WM2003 standard PPC, and it still works. I humbly appreciate any experience with other platforms, however, the execution of this code is done solely on your own risk.

download here

Just copy the file to your PPC and run it.
A detailed descriptions of the new features is here, but first set up the Go Engine on the PC with the next steps.

2.GTP engine

There are several GTP engines available for the major platforms Windows, Linux and MacOS. The most famous one, GnuGo is ported to all three OS. You can find more information about GnuGo on the GnuGo Homepage.

Windows binaries for GnuGo can be downloaded at Ben Lambrecht's site.

Support and binaries for GnuGo under MacOSX is offered at Sente- Goban.

For Linux, start at the GnuGo Homepage (Ah, Linux Geeks don't need binaries anyway, you have a compiler, don't you)

Alternative Engines (only Windows) are listed and available at the Dariush Go software gtp engine list,
and, of course at sensei's GTP page.

Download your favoured engine and install it ( usually this is done by simply unpacking the downloaded archive).

Note, that the engine has to run in gtp mode later on.  Most engines are configured to do this by setting an option in the command line. The Dariush Go software gtp engine list also provides the according options for each engine.

For gnuGo the option is

"--mode gtp"

3. The proxy - connecting client and engine

According to the documentation, the latest versions of GnuGo ( I think >= 3.3.6) should support GTP over the network. It can be set up using the option "--gtp-listen". However, in all binaires I tried out this feature was deactivated.

Therefore a proxy software is needed, that connects the network socket to the local input/output of the engine. For this purpose, I implemented a small Windows application  wich can be downloaded here:

GtpProxy

The GtpProxy provides a graphical interface and therefore offers some kind of comfort. To be executed, GtpServer needs the .NET framework 1.1 or higher.If it is not installed on your PC yet,  .net can be downloaded here

If you work on MacOS or Linux, or prefer not to install .NET, the tool gtpserver that comes with GoGui  is an alternative option. 
GoGui, written by Markus Enzenberger (another member in the hall of fame of computer go programmers) is mainly a superb Gui for gtp engines, but it also provides a nice collection of gtp tools. Among that, there is gtpserver, a tinny command line tool that does exactly what we need.

GoGui can be downloaded here

GoGui is written in java, and therefore needs an installed java virtual machine.

If you don't have any yet, Sun's Java VM can be downloaded here
choose the Java Runtime Environment (JRE) to download. (current veriosn is JRE 5.0 Update 9)

4. Make it work together

If everything is installed, first configure the proxy of your choice.

GtpProxy Setup


GtpServer does not have to be installed, it is an executable. Remember, that you need .NET 1.1 or 2.0 to run it. Starting GtpProxy should display a Dialog like this:



the fields are defined as follows:

  • Address: Shows the name and IP Address of the host. This information ,must be entered at the ppc client later on.
  • Port: The port, at which a network connection is expected.
  • Engine:Path to the GTP engine.
  • Arguments: the argument list for the engine

the little light bulb on the lower left shows the current state of the proxy and engine. It can either be
  • red: not started,
  • yellow : engine started and waiting for connection, or
  • green: engine started and connected

This is an example of an filled out dialog:[b]



Note that "--mode gtp" is set as an argument. It is important to start the engine in gtp mode. Refer to the dariush engine list to get the proper argument for your engine.

Pressing the start button will start the engine, it is now ready to receive a network connection. All parameters will be saved when the proxy is closed and avilable agian with the next start

GoGui /GtpServer Setup


GoGui is implemented in java and thus can be run on every operating system that provides a proper java runtime.
Unpack the GoGui zipfile. All files will be extracted to a directory named "gogui-0.9.1" (depending on the version number, but I don't think that it will change significantly the next time ).
Open a command shell  and go to the directory "gogui-0.9.1\lib" ("gogui-0.9.1/lib" for linux and mac). Enter the following command:

java -jar gtpserver.jar - port portnumber gtp_engine_path arglist

With
  • portnumber The port, at which a network connection is expected.
  • gtp_engine_path Path to the GTP engine.
  • arglist the argument list for the engine
Example (gnugo under windows):

java -jar gtpserver.jar - port 7777 "c:/Program Files/gnugo/gnugo-3.7.10.exe" "--mode gtp"

This will start gnugo 3.7.10 in gtp mode and link it's input/output to a socket, that connects on port 7777.
Favourably you should put this line into a shellschipt or .bat file and save it in the lib directory, so you don't have to enter it each time you want to start the proxy.

start a client network game

Make sure your Pocket PC  is connected to the network and start the modified GoSuite.exe



choose "Play Computer...", and the configuration computer game configuration will appear:



the screen layout differs a bit from the original one, I had to gain some space for the extra parameters.
check the "play remote engine" option, and fields for the remote address and port become visible:



enter the ip address (name should also work) of the PC running the engine and the port that was configured at the proxy.  Confirm with "OK" and the game will start. If you use gtpProxy and everything works properly, the state on the gtpProxy gui should now become green/connected, elseway you will get an error message.



That's it, enjoy the game!


heavy concentration
Note, that both proxies (gtpProxy and GoGui/gtpserver) do not terminate, when the socket is closed, but return to listen to the port. You can switch off your ppc and restart a game later on without anything to do on the PC!

I tried playing on  LAN only, but I don't see a reason, why it should not work across the WAN. With all the public access points popping up in airports, railway stations and fastfood restaurants, the range of remote gnu go may increase dramatically in the near future :-)




Contact me at remotegnugo@gmx.de to share experiences or for further help.