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/
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.
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
-Josh