Exploring Data From Battlesnake Tournament Games

Daniel Steuernol
Mar 21, 2019 · 4 min read
Image for post
Image for post

On March 2nd, 2019 the 5th Annual Battlesnake tournament was held in Victoria BC. Battlesnake is a programming competition where developers build a web server to play the game snake against other teams. During the tournament we run a series of games involving 6–8 snakes in each game, and narrow down the top 6 snakes. Every year we are amazed at the depth of technology and strategy used to compete in this deceptively simple game.

Our team thought it would be interesting to look at various stats across all games run during this year’s tournament. This year there were three divisions, Beginner, Intermediate, and Expert. Participating teams can self-select their division, and there were substantially larger prizes for those competing in the more advanced divisions.

Tournament Breakdown

During the entire tournament there were 189 games played across the 3 divisions. The tournament operated as follows:

We took all the teams that registered in each division and divided them into groups of 6–8 snakes. Each group played two games, and the winner from each game moved on to the next round (with the winner of the first game removed from the second game).

The group stages repeated until we got down to only 6 snakes. At this stage we played 3 games, with the winner of each game moving on to the Final 3. Remaining snakes all tied for 4th place and received equal prizes.

This stage played two games to determine the Final 2, with the remaining snake winning 3rd place.

One final head-to-head game to determine the winner of the tournament!

Food Available Per Turn

The current food spawn algorithm uses a geometric series to determine the chance of food spawning on any given turn. This chance starts at 0.5% and will hit 100% at a configured value, which was set to 12 for the tournament games. This means on average food will spawn every 7–9 turns, and at maximum every 12 turns. The number of food that spawns is equal to the number of snakes still alive on the board divided by 2, rounded up. Let’s take a look at how much food was on the board during a given turn.

Image for post
Image for post

Something that jumps out in the beginner bracket is that most games had very little food on board. This could be because eating food is often one of the first strategies new participants implement. As teams evolve their snake other strategies start to emerge that involve being more selective about food.

Length of Winning Snakes

Let’s take a look at the length of snakes that won games.

Image for post
Image for post

We can see a big difference between the divisions. In the beginner division the majority of winning snakes were the shortest lengths, but in both the intermediate and expert divisions, all the winning snakes were longer, with 1 exception. The exception is actually the winner of the expert division, “Undefined Behaviour”, who made a very conscious decision to avoid food and remain smaller. View the exciting expert division final here!

Cause of Snake Deaths

Finally let’s take a look at the different causes of snake deaths.

Image for post
Image for post

We actually don’t want to see a lot of starvation deaths as we feel snake starvation is a boring (and can be a random) way to lose the game. Looking at this chart we see that only 2.16% of snake deaths were due to starvation — great. The number of head collisions (snakes taking out other snakes) is an interesting point here. Close to 50% of all deaths were due to being eaten by other snakes. This ties into the length of winning snakes, as a good winning strategy is to target the heads of other snakes if you are larger.


As Battlesnake grows and more developers participate worldwide, we’re super excited to continue digging into stats to see what inventive strategies evolve over time and to learn the impact of specific rules and game mechanics.

If you’d like to try building your own snake and participating in the next tournament, head on over to play.battlesnake.io to get started.


What if programming was fun and accessible for everyone?

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store