Battle Snake

About the Project

Battlesnake is a competitive programming game where your code is the controller.

In this game, each Battlesnake is controlled in real-time by a live web server, responding to the Battlesnake API. It navigates the game board based on my algorithm, trying to find food, avoid other Battlesnakes, and survive as long as possible.

Many different strategies can be implemented for this game. Maybe you want to eat food as slowly as possible to make it easier for you to navigate the board. Or maybe you want to get as much food as possible, and then when you have more than your competitor you go on the attack!

For my script, I decided to prioritize food while taking into consideration myself and the other snake. Before making any moves I analyze two turns in advance. By looking ahead like this I am less likely to run myself into a corner that will result in a loss.

Skills Used
Video demonstration
Project Images

Get in Touch!