Tuesday, July 13, 2010

Not dead yet

Neither I, nor my project, are dead ! A lot has happened since I last posted here, personnaly and concerning this project. For my part, I have been accopied by a broken clavicle, a new job, a divorce, I have moved to another city, and a new girldfriend. But that's merely relevant to our subject, so what's up with goia ?

Goia v2: the flaws

There were a few important flaws with my program as I left it, essentially due to my way of dealing with this project :
- The connection between my neural networks and the go engine (taken from gnugo) was badly written, and led to a difficult compile task, and even more difficult go game debugging.
- There were still crashes now and then, and I finally figured out why (iterators becoming invalid in loops due to memory reallocation) but fixing them would have been an horrible task, due to :
- The mess that my program was consisted of.
- With all that, the players that were evolving kept getting more complicated, and the tournaments were longer and longer, with obvious reason.

So, considering all this, I decided to redesign the whole project. I want to emphasize that this project was also the occasion for me to learn c++, and programming in general (I have also started to do real programming designs in my job).

Goia v3

This led to this third version of the project, with major changes :

- The source code can actually be read by another programmer.
- The go engine is fuego, programmed in c++ so it is smoothly integrated with my neural network structures.
- The new neural network structure is somewhat simpler, and far more robust.
- The program is multi-threaded.
- The way the neural network plays go has significantly changed : now, there are 81 inputs describing the board state (+1: own stone ; -1: opponent stone ; 0: empty opint), and only one output. The neural networks task is to score the board : it plays every relevant move (not in occupied territory, or in own eye) and assesses the subsequent board ; it then choses the best scoring move. This was suggested to me a couple of time, and it is indeed a better way of playing than statically chosing a move given a board state : the old way led to static patterns, which is far more prone to local minima.

So here I am, with this new program; you can already test it, it has been compiled for linux and windows. I will give news soon, now I have some real work to do.


Linux binaries.
Windows binaries.

Sunday, April 19, 2009

Goia v2.2 : modification of the tournament rules

As was suggested by Oliver Lewis, I changed the rule of the game to the following :
- The games are played until the end, with only superko forbiding infinite loop (I have implemented the eye rule but I chose not to use it for now, because I feel detecting eyes is a good starting point at training players, thus I'd rather have it not given a priori).
- The rule to score the game is the Tromp-Taylor rule : every stone present on the board at the end of the board are considered alive, and chinese scoring is used.

GnuGoia.2.2 9x9 for Windows
GnuGoia.2.2 9x9 for Linux

Sunday, April 12, 2009

Linux Release

I could finally figure out how to compile the program for Linux. I am releasing the Linux binaries as well as the source code, which should compile with the ./configure; make command.

The instructions for running the tournament and playing versus any goia player are in the README_GOIA file :
  • To play the tournament, run "/MyFolder/gnugo --goia-tournament --komi 6.5"
  • To play versus goia, run "./gnugo --goia-white PlayerFilePath.gop"
Since Gnugo supports GTP, you can also use it to play with advanced GUI, such as GoGui. The command line you have to provide to GoGui would be "./gnugo --mode gtp --goia-white myplayer.gop"

Goia v2.1 source code.

Friday, April 10, 2009

goia v2.1

Here is goia v2.1, with different information displayed that should make following the tournaments more enjoyable. 

I also added an argument when launching the tournament allowing to chose the numbers of players involved in your tournament.

This will permit to change the memory used by the program, which was starting to become quite huge, and could be a problem with 100-players tournaments. See Readme file for instructions.

Release of goia v2, progress of the players

I have finished moving goia to the gnugo engine. It is now working fine, and, although it is much slower than the old version, it seems to be also far more efficient : the bunch of players I evolved on my computer during the last week is already far better than the players that were evolved with the old version in the same period. The differenc lie in the way game is scored : GnuGo provides a far more reliable way to assess game situation, were OpenGo only counted stones and territory without trying to figure out living and dead stones (every stone being regarded as "living").

As an example, here is what happens when the last Goia-GnuGo (white) plays against the last Goia-OpenGo :


For what I could figure out seeing the two play against each other, it rather makes sense : Goia 1 as ended up trying mainly a simple strategy consisting in playing diagonals, which is the most efficient way to obtain territory easily. Now that big chunk of territory can be assigned to the players if they manage to get it (as it is the case in the game shown), Goia2 tries to do this also, mainly here by drawing a vertical line in the middle of the board to clain one half of the board.

This seems pretty encouraging to me, although of course there is much progress to be done. My first serious opponent I am using as a benchmark to test real go playing skills of my players is Joshua, my 5 years old son. He learned the rules of go 3 months ago, and doesn't play very often. No need to say he is objectively pretty bad at the game. Still, he beat Goia2 with ease (he was playing black here) : 



So, here is the new Goia v2 :

I will release very soon a slightly modified version that provides more relevant information in the console.

Also, I still have much difficulties to compile this for Linux, so I am begging for anyone who could use some time trying to help me figure out how I could achive this. I have submitted the whole source code here : http://code.google.com/p/goia/source/browse/#svn/trunk

Monday, March 30, 2009

version 1.17

While testing the future version using GnuGo as a base program to handle the game, I could unveil a major bug in the way games were handled up now. During the transcription of the board, the program would set the value of any given intersection to the same number regardless of the color played. This would lead to the same decision fo black and white players, which is obviously generally wrong. Here is the new version cerrecting this : 

Saturday, March 28, 2009

Goia for GnuGO

I have tweaked GnuGo to allow it to run goia players. It is only working on windows for the moment, I will first find a way to use it for the tournaments, and then adapt it to linux.

Here is the program, see attached readme for information about what has been added: 


For more informations about GnuGo, see the main website: GnuGo Documentation