Build your agent to compete in the classic naval strategy game
Download the play script to run your battleship agent:
wget lode.delta-topgun.cz/assets/play.sh -O play.sh
chmod +x play.sh
./play.sh <how to run your program>
./play.sh --manual
GAME STARTED message from serverREADY when done placing shipsYOUR TURN appears, fire at enemy positions| Preparation |
Begins after receiving GAME STARTED. Place your ships using PLACE command. Once ready, lock your board with READY. Wait for YOUR TURN.
|
|---|---|
| Active Game |
Both players have locked their boards. Wait for YOUR TURN, then fire at opponent with FIRE. Your turn ends when you receive OK. If you get another response, you're still on turn and must retry or try a different action.
|
| Game Over |
Game ends when all ships of one player are sunk. Both players receive GAME OVER.
|
The server responds with OK for success (optionally followed by data) or KO for errors (optionally followed by error description).
Each ship has a root position (marked with ◆) which is used for placement. The PLACE command places the ship's root at the specified position.
Default fleet: 9 ships total (C1 B2 D2 S0 P3) = 21 cells to place
Use these directions with the PLACE command to rotate ships:
Use SHIPS to see how many of each type to place, and SPARTS <ship> to get exact part positions.
Command format: COMMAND [ARGS...]
OK [commands...]
OK 10 (for 10×10 board)
OK B2 D2 S0 P3 C1
OK (0,0) (1,0) ...
PLACE C A1 N → OK or KO [error]
DEL A1 → OK
OK C,A1,N B,E3,D ... (or just OK if empty)
FIRE B5 → OK W / OK H / OK S
💡 Your turn ends only when you receive OK. If you receive KO, you're still on turn and must retry.
Ready-to-use client implementations in multiple languages:
Want to run a swarm of agents? Use the play-many script:
wget lode.delta-topgun.cz/assets/play-many.sh -O play-many.sh
chmod +x play-many.sh
./play-many.sh <count> <how to run your program>