And here comes another misguided effort
Hopeless. The Go bot living up to its name
http://www.koziol.home.pl/hopeless.zip (exe plus source code, version from 14.11.2010)
22.11.2010 : adding a couple of debugging functions: printing reasons for rejecting moves and result matrix. 18.11.2010 : after adding several conditions (mainly about rejecting moves on 1st and 2nd line if there are no white/no black/ not enough stones in a certain sector of the board) I begin to view the goal of "a game in 3 minutes" as rather ambitious. Surpisingly, the biggest gain comes from the algorithm detecting and rejecting useless auto-ataris (program kills a stone, runs a simulation and compares its score with the simulation value obtained in the root position). It does not gain speed, but makes the game shorter. I still wait for bigger speed gains before release, but this may take time.
15.11.2010 : excluding some corner moves on 1st and 2nd line if there aren't many stones in the corner.
14.11.2010 first goal (being able to win from time to time against Igowin at 1 handicap under 5 minutes) achieved, program released! 2nd goal: shorten the playing time to 3 minutes, preserving strength or possibly improving it due to exclusion of bad moves.
PREDECESSORS:
Hopeless is based on a simple random moving engine called Brown,
written by Gunnar Farnebäck and released March 28th 2004.
At the moment of Hopeless release, it is available at
http://www.lysator.liu.se/~gunnar/gtp/brown-1.0.tar.gz.
To contact the author of Brown, please mail gunnar@lysator.liu.se
The files gtp.c and gtp.h are taken from GNU Go and are copyright the Free Software Foundation.
MAIN FEATURES:
- Chinese rules
- Monte Carlo algorithm, default is 2000 playouts per move, which on my laptop allows to finish a 9x9 game in 5 minutes
- Score is computed from three components:
- percentage of wins, normalized so that 100% = 10.000 (we want to win) - fraction of a sum of scores (we want territory) - pattern score added at the root (to be developed)
- Playout is random, but avoids filling small eyes and some moves too far from stones already on the board.
ALGORITHM:
Program simulates random games for each acceptable move, and picks the move with the best simulation score.
During the simulation all empty intersections are considered, with three exceptions:
1) suicide moves and illegal ko captures (simple ko rule), 2) intersections which would be suicide for the opponent,
unless playing there captures at least one opponent stone.
3) moves that are not on the 3rd/4th line and at the same time
too far from the stones already placed on the board.
Simulation score is a weighted sum of percentage of wins, normalized so that 100% = 10.000, and a fraction of the sum of scores of all the simulations.
At the root values of some moves are modified, and cartain moves are excluded altogether. The main focus of the next release will be the exclusion algorithm.