Trap The Cap

The board

Changes

23 February 2009 Added a new player robot and fixed the sample game file to a legal one.
22 April 2008 Updated library again: fixed bugs to detect a winner, and also eliminate players that have no uncaptured pieces.
10 September 2007 Updated library again: Game#possible_moves now shows the legal moves as described below.
7 September 2007 Updated library: now prevents moves via base without captured pieces and prevents more than three pieces on a safe position.
Changed format for moves that end on a base

Trap The Cap is a simple board game of captuing (and recapturing) pieces. You can read the rules and look at the board to see how the game is played (rules and image both from Board Game Geek).

The challenge is to build a computer program that will play the game well. The structure of the challenge is heavily based on the one for Pousse. What needs to be fixed for the game is how the various pieces and places on the board are identified and how your player will be called (updated 22 April 2008).

There is a simple interface to a test for your programs, with two simple robots to play against.

'Always clockwise simple' [source code] always moves the lowest-valued piece clockwise around the rim of the board. 'Clockwise cloud' [source code] always moves the least clockwise piece clockwise around the rim. They should be pretty easy to beat. Both robots are witten in Ruby and use the libttc.rb library (updated 10 September 2007). Feel free to base your own robots on this code. All this code is released under the GNU General Public Licence v3.