Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > by-pkgid > df29c83ca401d91ec9c00bfcf7fea4ea > files > 103

shedskin-0.8-2mdv2010.2.i586.rpm

Disco - A simple Python Go player
=================================
License GNU GPL version 3

INTRODUCTION

Disco is a simple Go player in only 400 lines of Python. It is based on the shiny new Monte Carlo + UCT algorithm. For a speedup of about 75 times (which it will need to play well), it can be compiled to C++ with Shedskin.

Disco was made as a test case for Shedskin, and may not evolve any further. I certainly do not want to get addicted to Go programming as well. But if it does evolve further, I will make sure it always stays in pure Python, stays under 1,000 lines of code, and compiles with Shedskin. 

CONFIGURATION

The number of playouts per turn can be configured in go.py, via the GAMES variable (default is 15000, which takes about 3 seconds per turn on my PC). 

INSTALLATION

1) Download the latest version of Shedskin (version 0.2.1 or later or SVN), and install it according to the Shedskin tutorial. Then compile go.py as an extension module:

shedskin -brew go.py 
make

2) Download and install Gogui, the only graphical go board Disco has been tested with. In the Program menu, connect it to engine.py. Set the board size to 9x9, and hand the first turn to the computer.