[computer-go] Engine development for beginners

7 views
Skip to first unread message

Joshua Shriver

unread,
Jul 27, 2007, 9:03:21 PM7/27/07
to computer-go
Are there any really simple engines out there that know just enough to
play a legal game of Go? Preferably C, Perl or Java?

Some of the open source engines I've looked at are rather complex and
not to friendly to a beginner.

Kinda looking for the tscp of chess for go :)

-Josh
_______________________________________________
computer-go mailing list
compu...@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/

Jason House

unread,
Jul 27, 2007, 9:40:19 PM7/27/07
to computer-go
Since my rewrite, I don't consider my bot (HouseBot) to be too far
along... It barely knows how to do more than play a legal game of go
(it does 1-ply monte carlo)

The class goban tracks the board state, checks for legality, etc... It
can be found here:
http://housebot.svn.sourceforge.net/viewvc/housebot/trunk/housebot/goban.d?view=markup

The relevant code spans lines 711-1227. 500 lines may sound like a lot,
but it doesn't really do a heck of a lot. About 40 lines are comments,
> 100 lines of unit tests and in contracts. The play function, the
heart of the class, is ~150 lines, but has 3 helper functions embedded
inside for both clarity and profiling.

If you poke around, looking at other code in the file, there are a few
things that will make it look more complex. I tried to add a
generalized code flavor to stuff allowing for different position and
board classes. The goban class was written quickly and doesn't use that
extra fluff.

I plan to refactor this file over the coming week(s). It's written in
D, which looks a lot like C++/Java.

Jeff Nowakowski

unread,
Jul 28, 2007, 5:21:33 AM7/28/07
to computer-go
On Fri, 2007-07-27 at 18:03 -0700, Joshua Shriver wrote:
> Are there any really simple engines out there that know just enough to
> play a legal game of Go? Preferably C, Perl or Java?

Have a look at GoGui and the included gtpdummy engine, which plays a
random game. It's Java based. If you write your engine to understand
GTP, you can then plug it seamlessly in to GoGui. Using GTP also means
your engine will be usable on CGOS and KGS and playable against other
GTP engines.

http://gogui.sourceforge.net/
http://gogui.sourceforge.net/doc/reference-gtpdummy.html

-Jeff

Oliver Lewis

unread,
Aug 6, 2007, 1:52:40 PM8/6/07
to computer-go
Orego version 3 in Java (before the C++ rewrite and the optimisation for Monte Carlo / UCT) was really simple to understand and add new players to.  Perhaps Peter Drake can reinstate the link from his site - otherwise I can email you a copy.

Joshua Shriver

unread,
Aug 6, 2007, 1:59:41 PM8/6/07
to computer-go
Thanks I'd appreciate that.

-Josh

Peter Drake

unread,
Aug 8, 2007, 12:25:03 PM8/8/07
to computer-go
The latest version is also fairly well-documented; if there's anything you'd like me to explain in more detail, just let me know and I'll (re)add it for the next version.
Reply all
Reply to author
Forward
0 new messages