Battlecode (also known as 6.370, or in past years, Robocraft), is an annual AI programming competition that occurs every year during IAP (Independent Activities Period). It centers around writing a program that will control a variety of different robots to achieve a certain goal. In previous years it has ranged from kill the queen, to capture the flag, to king of the hill. There are a variety of different robots, which change every year. The robots this year are:
- Archons: The most important units, the only unit with positive energon production
- Soldiers: The basic ground unit. Attacks other ground units adjacent
- SAMs: The anti-air ground unit. Attacks only air units with a range
- Tanks: The ranged attack ground unit.
- Scouts: The basic air unit. Attacks other ground units adjacent
- EMPs: An evolved air unit. Has a suicide ability that reduces the energon production of Archons in a radius. Can also attack air units.
Each of the units that isn’t an Archon has an upkeep cost in energon. Energon is the energy of the game, and it allows your units to live. Attacks reduce energon, and EMPs reduce the energon production of Archons. The goal of this year is to kill the 4 enemy archons, or to satisfy one of the other victory conditions. The victory conditions are:
- Largest number of surviving Archons
- Largest total energon production among Archons
- Largest total energon among surviving units
- Lowest team number (so earliest registered)
There are, of course, a few complications to make writing the AI more complicated than simply that of programming a basic game AI. There is no overaching player. In Battlecode, each robot runs a copy of your code, and must work together with the limited information available to each unit. This includes their sensor information (which varies based on robot type). They also can message robots in a limited radius to share information. There is no overarching “super” player that can see the entire map. You have to determine what the map looks like, how to pathfind, and everything on the fly with limited information.
With the basics of Battlecode out of the way, you can expect another post tomorrow explaining a few ideas for strategies (some I might use, some I probably won’t), and any details that I realized that I missed. The full game is of course more complicated, but this should be a sufficient overview for what I explain tomorrow.