gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnugo-devel] metamachine


From: Evan Berggren Daniel
Subject: [gnugo-devel] metamachine
Date: Mon, 12 Jan 2004 12:54:21 -0500 (EST)

I have been slowly hacking away at a 9x9 metamachine for some time now.
Since there seems to be some interest in it, I've put up a source tarball
at
http://evand.rh.ncsu.edu/~evand/gnugo/metamachine.tar.gz

It's currently in a very (very) alpha state.

It's written in Java, so you'll need a Java 1.4 compiler and runtime
environment.  Sun has a freely available one that I use, available from
java.sun.com; I haven't tested with any other environments, but it should
work so long as it supports java 1.4.

compile as:

javac -source 1.4 *.java

to run the metamachine:

java -ea GTP.java

this starts the metamachine in GTP mode.  It expects to find a gnugo
binary in '../gnugo/interface/gnugo' which it will invoke with options
'--mode gtp --quiet'.  It also expects to find a file ./default.sgf, which
it will use for persistence of the game tree.

Currently, it only supports alternating play, and does not support
handicap.  It implements a subset of GTP version 2 sufficient to run the
twogtp scripts.

Commands of interest:
play
genmove
showboard
clear_board
score
import_sgf
export_sgf
quit

play and genmove are fairly obvious, with the alternating play only
restriction.  Score gets the current alpha-beta score.

import_sgf loads an sgf file (should be able to read sufficiently large
subsets of sgf to handle most files, though this is not well tested at
all) and adds all nodes to the game tree.

export_sgf saves the current game tree as an sgf file.


How it works:

Currently, it takes GNU Go's top 2 moves, and evaluates them.  It does
this by asking GNU Go to play out the remainder of the game using GNU Go's
top move, and then gets the score at the end.  If there are additional
moves in the game tree, from any source, those will be evaluated as well.
On load and exit, it will import / export to default.sgf.

Currently, it's kinda feature poor, largely because I haven't spent a lot
of time adding such.  The only known real bug (as opposed to lack of
implementation) is that if GNU Go returns an illegal move, the metamachine
will fail less that completely gracefully.  This is actually an issue more
often than would be expected, because GNU Go happily returns illegal ko
captures in the top_moves output.

GTP.java is currently available under the GPL; for now the rest is
copyright me and not for general distribution, though I suppose there's
really no reason for that if there's interest in GPL'ing it.

Anyway, I hope people find this interesting, and patches are welcome.
Some of the code really needs it ;)

Evan Daniel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]