[ Posted by urban
Mon, 11 Apr 2005 19:29:58 GMT ]
This release is just a point release that makes the following changes:
- Added script to run tournaments of AIs
- Fixed bug that prevented the Board class from recognizing certain finished board positions.
- Added support for draws
As before the tarball can be gotten from bettong.net/fico/ and the latest development version from the darcs repository at http://www.cip.ifi.lmu.de/~hafner/darcs/fico .
Tags board, fico, game, havannah, project, ruby
[ Posted by urban
Sun, 10 Apr 2005 14:17:54 GMT ]
Fico is an implementation of the board game Havannah. It is completley written in Ruby.
The aim is to write a fairly strong AI for the game. At the moment the only features
are that the program can play according to the rules and that a random player exists.
How to get it
There are two ways to get the program.
- Get fico-0.1.0.tar.bz2, the latest release tarball (generally new releases can be found at bettong.net/fico/)
- Get the latest development from the darcs repository:
darcs get http://www.cip.ifi.lmu.de/~hafner/darcs/fico.
How to run it
To run fico against itself on a board of size 10 run the command ./fico in the toplevel directory. Run ./fico -h to see all possible command line options.
If you want to play against the program use the -b or -w switch to select your colour. You will then be asked to enter your moves in the terminal. Be sure to enter them in the form <char><number> (e.g. a1 or c4).
Hacking
You are of course welcome to write your own AI. But don’t expect to much (yet :)) from the framework that binds your bot into the rest of the application.
How to build your own AI
Look at src/player/RandomPlayer.rb for a simple AI. The necessary steps to get your own bot running are:
- create a sublcass of
ComputerPlayer
- include
TermComputerPlayer
- define the method
internal_generate_move. This method should return the next move of your AI.
- patch src/fico.rb so that it uses your AI instead of
RandomPlayer or Simple1Ply
Contact
You can contact me at urban@bettong.net. Watch this place for announcements of new versions.
Tags board, fico, game, havannah, project, ruby