champo / Tanks-over-Turtles

Create simple AIs to compete in a tank battle in a world with rather strange physics.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

13/3/2011 version 1.0

Tanks over Turtles is a game in which you have a given number of tanks over a circular world held by giant turtles.
Each of your tanks runs the same strategy without knowledge of the other tanks.
The tanks can move, ask for information of the map or shoot a missile. When a tank is reached by a missile, it instantly disappears from the map. The last remaining team on the map is the winner.

The initial information you will get, is the following line:

TEAM_ID SHOOT_RANGE

  where TEAM_ID is a positive integer representing your team, and SHOOT_RANGE is the maximum distance the missiles can travel

After this, and for the rest of the game, the operations (in order of appliance) available are:

MOVE [UP|RIGHT|DOWN|LEFT]

  moves the tank one unit

SHOOT [UP|RIGHT|DOWN|LEFT]

  shoots a missile

LASER [UP|RIGHT|DOWN|LEFT]

  returns two integers separated by a space, the TEAM_ID of the closest tank in the specified direction, and the distance to it (remember the map is circular, so there always is a tank in front of you).

Every command should end with an end of line

Further clarifications:

 * After every tank has told its command, there's a moving phase, then a shooting phase, and finally a laser phase.

 * If a tank moves to an occupied position, both tanks are destroyed at the end of the moving phase (so tank castling is valid)

About

Create simple AIs to compete in a tank battle in a world with rather strange physics.


Languages

Language:C++ 60.9%Language:Python 36.0%Language:C 3.2%