Battlesnake Programming Competition in Victoria, BC Overview

Technology Used

  • Hosting - Heroku
  • Data - GitHub
  • Dev Env - Docker
  • Language - Python


The Battlesnake competition / event in Victoria BC was created by SendWithUs. Its main goal was to reach out to student developers and give them a chance to put their skills to the test and learn along the way. A huge benefit to up and coming developers is the amazing networking opportunity with local companies that sponsor the event. Due to the growing popularity, three brackets have been created. (beginner, intermediate, and advanced) The event is not only drawing in students and beginner programmers but,also veteran / seasoned developers

Charlie snake going for food


The goal is to develop an AI controlled snake that avoids all obstacles, eat food when hungry, and is the last snake standing. To allow movement the snake must respond to POST requests, start, move, and end. Any language can be used for implementation with two major rules. They are it must respond within the set timeout and deal with each of the three requests.

Decision / Implementation

Python was my language of choice however, I have also created snakes in javascript, and java. I competed for my first time 2 years ago and what appears as though it may be a simple challenge in not. The first edition of charlie snake made it to the semi-finals. Charlie-v2 was much smarter but due to the increase in popularity bring more developers in Charlie did not do so well last year.

Battlesnake Divisions

Looking Back

The amount of logic that I put into Charlie-v2 was actually a draw back last year and caused some timeouts due to the raw calculations being done. I didn't practice DRY at all which lead to excessive calculations of the same things each turn. Less is more!

Final Thoughts

Battlesnake is for all levels and an extremely fun event to attend. This year when I go back Ill be ready. I have been heavily refactoring Charlie in hopes to be a solid contender in the intermediate bracket.