3 <title>Trap the Cap
</title>
9 <table border=
1 align=right
>
10 <tr><td><a href=
"board.jpg"><img src=
"board-thumb.jpg"></a></td></tr>
11 <tr><td>The board
</a></td></tr>
15 <table cellpadding=
"3">
18 <td>23 February
2009</td>
19 <td>Added a new player robot and fixed the sample game file to a legal one.
</tr>
22 <td>22 April
2008</td>
24 href=
"robots/libttc.rb">library
</a> again: fixed bugs to detect a winner, and also eliminate players that have no uncaptured pieces.
</td>
28 <td>10 September
2007</td>
30 href=
"robots/libttc.rb">library
</a> again:
<code>Game#possible_moves
</code> now shows the legal moves as described below.
</td>
34 <td>7 September
2007</td>
36 href=
"robots/libttc.rb">library
</a>: now prevents moves via base without captured pieces and prevents more than three pieces on a safe position.
<br>
37 Changed format for moves that end on a base
</td>
41 <p><em>Trap The Cap
</em> is a simple board game of captuing (and
42 recapturing) pieces. You can
<a href=
"trap-the-cap.pdf">read the
43 rules
</a> and look at the board to see how the game is played (rules
44 and image both from
<a
45 href=
"http://www.boardgamegeek.com/game/1730#files">Board Game
48 <p>The challenge is to build a computer program that will play the
49 game well. The structure of the challenge is heavily based on the one
50 for
<a href=
"../pousse/index.html">Pousse
</a>. What needs to be fixed
51 for the game is
<a href=
"layout.html">how the various pieces and
52 places on the board are identified
</a> and
<a
53 href=
"interface.html">how your player will be called
</a> (updated
22 April
2008).
</p>
55 <p>There is a
<a href=
"simple.html">simple interface
</a> to a test for
56 your programs, with two simple robots to play against.
</p>
58 <p>'Always clockwise simple' [
<a href=
"robots/1/runme">source
59 code
</a>] always moves the lowest-valued piece clockwise around the
60 rim of the board. 'Clockwise cloud' [
<a href=
"robots/2/runme">source
61 code
</a>] always moves the least clockwise piece clockwise around the
62 rim. They should be pretty easy to beat. Both robots are witten in
63 <a href=
"http://www.ruby-lang.org/en/">Ruby
</a> and use the
<code><a
64 href=
"robots/libttc.rb">libttc.rb
</a></code> library (updated
10
65 September
2007). Feel free to base your own robots on this code. All
66 this code is released under the
<a href=
"">GNU General Public Licence