MIT's Longest-Running Programming Competition
Thanks to everyone who participated in Battlecode 2020.
We look forward to seeing you again in 2021!
What is Battlecode?
Battlecode is a real-time strategy game, for which you will write an AI player. Your AI player will need to strategically manage a robot army and control how your robots work together to defeat the enemy team. As a contestant, you will learn to use artificial intelligence, pathfinding, distributed algorithms, and communications to make your player as competitive as possible.
Teams are given the Battlecode software and a specification of the game rules in early January. Throughout the month, you will refine your player, and compete in scrimmages and tournaments against other teams. During these tournaments, the autonomous players are pitted against each other in a dramatic head-to-head fashion. At the end of the month, the Final Tournament is played out in front of a live audience at MIT, with the top teams receiving cash prizes. The total prize pool is over $30,000.
- Team size: 1-4 people.
- Schedule: The next iteration of Battlecode will begin on January 4, 2021, at 7 pm EST. Lectures will be held throughout the first two weeks at 7pm. The final tournament will be on January 30.
- Eligibility: Anyone is welcome to participate in Battlecode! However, we can only consider teams of all full-time students to be eligible for the final tournaments. Note that non-MIT students (and high school students) are eligible too.
- Location: For those present at MIT, lectures will be held in 32-155 (with free food!). Note that these will also be streamed on Twitch.
- Prizes: $30,000+ in cash.
Watch the 2020 Final Tournament!
As we all know, the world is changing. Water levels are rising, pollution is becoming a global problem, and we are rapidly depleting our most valuable natural resource: soup. Battlecode 2020 was as much about surviving the changing climate as defeating the enemy team.
Check out the Battlecode 2020 Competition Site, where you can read more about the game, and see the results of the tournaments.
Below are a couple of post-mortems providing a competitors' view of the game. Read them!
2020 Postmortem by "Java Best Waifu" (1st)
2020 Postmortem by "The High Ground" (4th)
2020 Postmortem by "Bowl of Chowder" (5th-6th)
2020 Postmortem by "confused" (HS 2nd)
Battlecode 2019 had a Sci-Fi theme in which players fought to destroy each other in a great galactic Crusade. The map landscape was scattered impassable terrain, meaning
units had to find their way around. However, all maps were symmetric for fairness.
Players won if they destroyed the opponents' Castles. In the case where both surived longer than a thousand rounds, the winner was decided by whoever had the most Castles, most unit value, or a random number generator (in order of precedence).
Available units included castles, chruches, pilgrims, prophets, and preachers, each of which had a difference purpose. Creating different units and taking different actions consumed one or both of the two resources available on each map: Karbonite and Fuel.
You can find the source code for Battlecode 2019 on GitHub.
Below are a couple of post-portems providing a competitors' view of the game:
2019 Postmortem by "NP-cgw" (Finalist), including a good intro to the game
2019 Postmortem by "smite" (1st)
2019 Postmortem by "Big Red Battlecode" (Finalist)
2019 Postmortem by "Oak's Last Disciple"
2019 Postmortem by "Double J" (17th-32nd)
2019 Postmortem by "CitricSky" (3rd)
2018 Battlecode: Escape to Mars
Battlecode 2018 had a Sci-Fi theme in which players controlled different factions of Earth-inhabiting robots in a fight for supremacy as they colonized Mars to escape a dying Earth. Players had to wage war in battlefields both on Mars and Earth. Similarly to many RTS games, players could mine a resource called Karbonite, with which they could build their army. An army could consist of workers, knights, rangers, healers, and mages, each which had different specialties.
The game specifications can be found here, with language-specific documentation in Python, Java and C. Check out the 2018 Github and scaffold. You may find Max Mann's videos useful as well, particularly his lecture series on how to code a bot for Battlecode 2018 in Python. He provides an installation guide for Battlecode 2018 here. You will also find some tutorials in the Battlecode Youtube channel.
2017 Final Tournament
The object of the game was to either donate to the reforestation fund or destroy the enemy.
2016 Final Tournament
The object of the game was destroy the enemy archons while surviving attacks from zombies.
2015 Final Tournament
The object of the game was destroy the enemy headquarters. Each team has up to six towers on the map, and destroying these towers weakens the enemy.
2014 Final Tournament
The object of the game was to gain milk either by herding cows into pastures or by destroying opponent pastures.
2013 Final Tournament
Compared to previous games, this year's game featured more of an emphasis on economy and macro strategy. The goal was to destroy the other team.
2012 Final Tournament
The object of the game was to build a chain of power nodes from your base to the enemy's base.
2011 Final Tournament
The 2011 game featured robots with modular components. The goal of the game was to destroy the other team. Unfortunately, we don't have a video of the 2011 final tournament.
2010 Final Tournament
The object of the game was to gather points by constructing contiguous blocks of buildings. The area contained within the convex hull formed by the buildings generated points each round. Of course, the other way of winning was to wipe out the other team.
2009 Final Tournament
The object of the game was to gather points by mining resource deposits or wipe out the other team.
2008 Final Tournament
The object of the game was to gain territory by capturing towers.
2007 Final Tournament
The object of the game was to destroy the enemy archons or have the most production at the end of the game.
2006 Final Tournament
Unfortunately, we don't have a video of the 2006 RoboCraft Final Tournament. The 2006 game was a "King of the Hill" game in which the object of the game was to spend more time than your opponents on the hill squares.
2005 Final Tournament
The object of the game was to capture the enemy flag or survive when the walls came pushing in as the game ended. Battlecode was still under the name "RoboCraft".
2003 Final Tournament
The object of the game was to destroy the enemy queen or have a closer unit to your enemy's queen.
What languages are supported?
Battlecode 2020 was built for Java. The plans for 2021 are yet to be announced.
What is the game like?
The game is a turn-based strategy game where robots need to demonstrate a mastery of both resource management (macro) and combat tactics (micro). The 2020 game involved surviving rising water levels in an increasingly polluted world, while Battlecode 2019 centered around a religiously motivated war. The game is different every year, and is released every year in the beginning of January!
Wait, AI as in machine learning?
Machine learning has not historically been used in Battlecode, since computing power is limited and the game is a highly complex environment. Rather, Battlecode is about pathfinding, resource management, communication and combat tactics, both on a local scale (e.g., choosing to attack the enemy robot with the least health first) and on a global scale (which units to send where and when). However, we'd be thrilled and excited to see a successful implementation of machine learning in Battlecode!
Do I need to be at MIT to participate?
No — in fact, you do not even need to be an MIT undergraduate! High schoolers and graduate students are welcome.
Do I have to be good at programming?
Actually, Battlecode makes a great first dive into programming! We'll be holding daily lectures throughout January to cover the basic skills needed to play the game. The lectures will be streamed and uploaded on Twitch, and we'll also have a Discord server to provide support, so fear not if you are participating remotely! We also run a separate Beginners' Tournament (with its own prize pool!) for first-time MIT competitors.
How do I get MIT course credit for Battlecode?
In addition to registering on our competition website once IAP (January) starts, you must also pre-register for 6.147 through MIT's system. In order to get credit, you must create a player that is able to defeat a dev-created reference player (we promise not to make it too hard to beat).
How do I register for Battlecode?
Register at 2021.battlecode.org once January 2021 rolls around. In the meantime, join our mailing list for updates!
What is the tournament format?
We hold several tournaments throughout the month of January. The penultimate tournament will determine the finalists, who will compete at MIT in the Final Tournament.
Where can I read more about Battlecode?
Battlecode has existed for twenty years, so the internet is full of Battlecode knowledge. Read two-time winner Greg McGlynn's list of Battlecode links, a Reddit AMA from 2017, and an old but good blog post by former competitor and dev Cory Li. It is a tradition for competitors to write post-mortems and open source their bots at the end of every competition cycle — find those in the Past Years section on this page.
Help! I have more questions.
Feel free to email us at firstname.lastname@example.org!
Our sponsors help make Battlecode happen every year!
To find out more about sponsoring Battlecode, email us at email@example.com. Our sponsors have a unique opportunity to recruit from MIT's (and the world's) very brightest coders.