Tank AI


  • Windows
  • C++ template
  • Individual project
  • +- 5 workdays

About Tank AI

The tanks start with full health and are able to fire salvoes. The salvoes can also be timed to explode after a certain distance. The explosions hurt tanks (including friendly fire) and apply a force to them. Firing also causes knockback. If the tank leaves the arena, the tank dies. Tanks can stand on charging stations to regain health. If they stand on one too long, their health will overcharge and the tank will die.

To create the AI for the tanks I first made a distinction between three parts of the tank: the commander, the driver and the gunman. The commander makes decisions about the tactics of the tank and sets parameters for the other two. The driver can request paths to navigate, can follow a path and can try evasive manouvers. The gunman turns the turret and makes the decision to fire.

Some interesting tactical decisions a tank can make:
- Plot a path to the nearest vantage point, instead of straight to the target, if the target is out of sight.
- Keep distance to target when of equal health, flee to cover when health is low, move close to target if health is high.
- Allow friendly fire in close proximity to target if its own health is significantly higher than the target's.
- Use the knockback of firing to keep itself in the arena when it is flying out.
- Use the explosion of a short-fuse salvo to keep itself in the arena when it is flying out (only when in extreme danger).


Contact me

Please reach me at yanknoop@gmail.com if you want to get in touch.