Battlecode 2020

MIT's Longest-Running Programming Competition

In Battlecode, two teams of virtual robots roam the screen, managing resources and executing different offensive strategies against each other. Plan, code, and compete throughout the month of January for a chance at $30,000 in prizes!

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.

Past Years


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 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!


Our sponsors help make Battlecode happen every year!

To find out more about sponsoring Battlecode, email us at Our sponsors have a unique opportunity to recruit from MIT's (and the world's) very brightest coders.

A big thank you goes to our 2020 sponsors:

Hudson River Trading
Blind Data