Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Write AI for tanks and watch them battle it out!
branch: master

Merge pull request #8 from sherzberg/readme-changes-for-ubuntu

adding in running instructions and requirements for ubuntu
latest commit 3d70a6e586
@mathom mathom authored

Brain Tank


This is a little project to teach programming skills as well as basic AI. To run it just execute with python.

Simulation Rules

Every time a trank becomes "idle" it will run the think() function associated with that brain to queue up more commands. The tank then executes these, which can take a variable amount of time. Tanks can also fire shots in the direction they are facing. They must turn to aim. Turning one facing takes half a second, turning twice takes one second. The shots move at twice the speed of a tank.

Tile Rules

  • Crossing dirt will take twice as long as regular tiles.
  • The tank will abort a move if it runs into a blocking tile or other tank.
  • Shots can destroy blocking tiles such as trees or rocks.
  • Driving into water will destroy the tank.

Making a Brain

Copy brains/ to brains/ and add "yourname" it to For now it will only read the first two brains listed. There is a small guide that describes what this brain does and what is available for brains to use in


  1. Add explosions and other animations.
  2. Make sound effects for actions.
  3. Add GUI elements like victory screen, etc.



$ python brains/ brains/


The code is GPLv3, but the art/sound is not.


  • The Planet Cute sprites are from the venerable Danc. Check out his site.
  • The tank is by Saypen on Open Game Art.
  • The Main song is by Mister Electric Demon on Jamendo.
  • Everything else I've made and is in the public domain.
Something went wrong with that request. Please try again.