A curated list of Battlesnake resources
Contributions welcome! Read the contribution guidelines first.
- Developer Stories
- Game Rules and Logic
- Live Streamers
- Machine Learning and Data Science
- Starter Projects
- Strategies and Algorithms
- Third-Party Tools
C++- "asdf123", winner of Battlesnake Victoria 2018 Intermediate Division
Python- A Python battlesnake featured as a strong opponent in the Brad and Joe Coding Badly live strea
Java- A hand-rolled Battlesnake-AI-Server written for the JVM
Python- cc snake on 2018 BattleSnake Competition
Rust- Cornelius, the Corn Snake who codes, is a Rusty Battlesnake Baby.
Ruby- An albino hognose battlesnake built using Ruby. Their arch-nemesis CorneliusCodes always takes valedictorian.
Rust- A collection of many of Coreyja's battlesnakes, written in Rust
Rust- A BattleSnake bot for 2020. Available to challenge in public snake search
Crystal- Battlesnake 2018 Crystal Implementation
C++- Team Graeme & Chris, winner of Battlesnake Victoria 2018 Expert Division, see post-mortem in Developer Stories
Python- A Python AI for competition in the BattleSnake 2017 competition
Smalltalk- Repository for the battlesnake.io competition code written in Cincom Smalltalk
Ruby- A battlesnake in Ruby, with C extensions
HTML/JS- Blockly Battlesnake; That's right, a battlesnake made using Blockly's visual programming framework. Legendary idea!
Python- Battlejake is an if-else snake
Python- Python, 2019
Python- 2017 Battlesnake Advanced Division Entry - Aggressive A-Star based implementation
Rust/Python- Fast battlesnake agents written in rust.
C#- 2nd Intermediate Division @ Battlesnake 2019, Victoria by Team "Niedersächsische Kreuzotter"
Rust- A battleSnake written in rust
Python- Reinforcement Learning Battlesnake
Python- One Of Four Sendwithus Bounty Snakes
Crystal- A bounty battlesnake written in Crystal
Ruby- Ruby Battle Snake, 2017
Julia- Battlesnake written in julia
Java- Source code of Nessegrev snakes.
Python- TR-8R SnEk, winner of Battlesnake Victoria 2016 Advanced Division
Python- My Battlesnake AI programmed in Python3
Kotlin- Battlesnake Quickstart Snake Examples
Python- Better than Aleksiy's Snake, winner of Battlesnake Victoria 2017 Advanced Division
Lua- Redbrick's bounty snake in 2017, went 42-3, see post-mortems in Developer Stories
Lua- Redbrick's bounty snake in 2018, went 71-3, see see post-mortems in Developer Stories and design talk
Lua- A port of Redbrick's Robosnake to the 2019 API with some minor enhancements
Python- Vulture Snake, created for BattleSnake 2017
Python- A competition AI for the BattleSnake 2019 programming competition
Go- A Battlesnake made in Go - The main goal of Esproso is to survive
C++- A simple hungry battlesnake that is able to reach Gold medal in Global Arena with detailed documentation and turorial
Python- This is battle snake bot in Flask, PostgreSql
Python- Reinforcement Learning, "In which we try to crack a walnut with a jackhammer"
Python- A BattleSnake AI Written in Python
Python- BattleSnake AI server written in Python
Java- Battlesnakes for 2018, 2019 and 2020
Nim- .i le mi nundambysince (Editor's translation to English: "My battlesnake")
Elixir- Battlesnake AI written in Elixir, 2019
Go- Scape goat is a battle snake written in Go, and planned to be deployed on heroku when in battle.
Java- Java BattleSnake
- Backstory of the Caterpillar BattleSnakes family - Journey and future plans of the developer of Hungry Caterpillar, Smart Caterpillar and test/educational The Very Hungry Caterpillar
- Battlesnake: The Rusty Tapeworm Chronicles - Background on The Rusty Tapeworm's experience in the 2020 Battlesnake Saskatchewan Tournament
- Battling the Snake: A Tournament Retrospective - Journey, Lessons Learned, and Future Plans from a Developer following a Battlesnake Tournament Experience
- Building an AI for Battlesnake - A post-mortem from the winner of the Battlesnake Victoria 2018 Expert Division
- Building the Bounty Snake - A post-mortem from 2017 describing techniques and challenges in creating Redbrick Robosnake, including creating their own arena!
- Can’t stop the snake in Port Townsend, Washington USA - Port Townsend Leader showcases a local program teaching kids how to create their own Battlesnakes
- Entering the Battlesnake Arena - An introduction to Battlesnake using Rust for examples, by Thomas Weitzel
- Live-Streaming Battlesnake on a Budget - Awesome insights into the Twitch live-streaming setup for the 2019 Battlesnake Victoria Tournament
- Nettogrof BattleSnake Blog - Blog posts about Battlesnake
- Son of Robosnake: an Aggressive Bounty Snake - A post-mortem for the 2018 bounty snake called Son of Robosnake, from Redbrick
Game Rules and Logic
Go- Battlesnake Game Rules and Logic
C++- Unofficial C++ implementation of BattleSnake rules and snake server
C++- The aim of libsnake is to provide an intuitive and fast library for simulating snake games. C++
Go- Experimental WebAssembly port of the Battlesnake rules
Elixir- Battlesnake-compatible rulesets and board positions in Elixir
These people live stream their Battlesnake adventures, let's show our support!. This is definitely not an exhaustive list, just a few that I have noticed are more active. Be sure to search for the "battlesnake" keyword on Twitch, and check the #livestreams announcement channel in Battlensake's Discord to find new streamers.
- ChaelCodes - ChaelCodes is a professional developer who likes "to live-code and play programming-adjacent games" - notably having streamed development on the snakes HettieCodes and CorneliusCodes, but has a variety of other projects.
- coreyja - Rust, Ruby, Battlesnake!
- defiines - Sometimes streams Battlesnake, Codewars, and more! Creator of the NES gamepad-controlled Battlesnake.
- geehlive - Developer advocate at Twilio and passionate about open source software.
- penelope_zone - Penelope (She/Her or They/Them pronouns) has been known to stream development of Rust battlesnakes, and has been very open about discussing interesting algorithms such as MCTS in the community
Machine Learning and Data Science
C++- Multi-agent reinforcement learning environment
- Battlesnake Post Mortem by Asymptotic Labs - Using a desktop GPU to top the global arena in under a week
- Exploring Data From Battlesnake Tournament Games - Article exploring various stats across all games run during the 2019 Battlesnake Victoria Tournament
Python- "Efficiently Updatable Neural Network" explained in the context of chess
Python- Simple environment for machine learning training, and A* for food finding
- Scaling your AI-powered Battlesnake with distributed reinforcement learning in Amazon SageMaker
Battlesnake has an official list of starter projects, including those from the community. This section is reserved for any notable project templates that haven't made that list.
Strategies and Algorithms
This is not exhaustive--these topics are ones that members of the Battlesnake community have decided to share that they use for their snakes. Juicy secrets!
See also Useful Algorithms from the official documentation, where folks are beginning to contribute more details on how these algorithms apply to Battlesnake specifically.
- A* (A-star) - A graph traversal and path search algorithm
- Flood Fill - An algorithm that helps determine areas that are open/connected
- Minimax - A tree search algorithm popular among battlesnakes, often paired with Alpha-beta pruning
- Monte Carlo tree search (MCTS) - A tree search algorithm with many variants, sometimes using random rollouts and Upper Confidence Trees
- NNUE - A neural network-based evaluation function that runs efficiently on CPUs
- Voronoi - Useful for estimating board area control
- BattlesnakeArena by joshhartmann11 - A modified, terminal based, battle snake arena to bypass servers and have complete access to data
- BattlesnakeTester by jfgodoy - An app to create tests for your battlesnakes using imported games from the arena
- BattlesnakeTester by niecore - Smoke tests for Battlesnake behaviour
- Board Generator by lworkman, Nettogrof, EnderInvader - A react-typescript app for Battlesnake board visualization, now with Arcade Maze support!
- Game Download CLI - CLI tool to download battlesnake games in json format that can be sent directly to your battlesnake
- Game Download Extension for Chrome - Chrome extension to download battlesnake games
- Game Download Extension for Firefox - Firefox extension to download battlesnake games
- Game Simulator by penelopezone - A Rust crate to represent game types in the game of battlesnake
- Instant Observability Dashboard by New Relic - A tool you can use to monitor your Battlesnake server, including ensuring your server is compliant with the game's server requirements and that your Battlesnake is set up for success!
- Logging Proxy by penelopezone - A proxy server that sits between your Battlesnake and the Battlesnake Servers to save all request data to a local DB. Was built on this episode of Battlesnake's Deep Learning
- Mojave by smallsco - A Battlesnake app for Windows/Mac/Linux supporting simultaneous play of snakes from 2017 and up, human players, built-in opponents, and more!
- Snek-Spec by mike-anderson - Generates boards from ASCII plain text mockups, designed to be used in typescript spec testing or as a standalone command line tool
- Stats Tracker - Dashboard to follow your snake rating throughout time. Username/password: tester
- Code a BattleSnake and compete with your friends - Eddie Jaoude - A video on getting started with Battlesnake, the TypeScript starter snake, and Codespaces
- How to Monitor your Battlesnake with New Relic - This Quick Start Guide and accompanying video tutorial will help you begin instrumenting and monitoring your Battlesnake with New Relic platform
- Learn to Battlesnake - Fork by Nettogrof - A fork of Learn to Battlesnake bringing it up to date with Battlesnake API v1
- Learn to Battlesnake - Original by Colin Walker - An interactive tutorial with live Battlesnake coding goodness!
- Learning Python by Battling Bots - Full setup and strategies by ClarityCoders, featuring Python and Replit. Great for beginners!
- Learning to build an Express API for Battlesnake - How to build a basic Battlesnake HTTP server using NodeJS and Express
- Minimax in Battlesnake - An excellent explaination by Coreyja of Minimax, MaxN, and related algorithms, with neat visualizations for both Tic Tac Toe and Battlesnake
- Preparing to Compete in a Battlesnake Tournament - Primer on programming a snake that can at least sort of stand on its own two, metaphorical, legs
- Text Your Battlesnake's Progress with Twilio - This project allows developers to see their snake's progress in a league at regular interval using Twilio - because it's super easy to get messages sent to your phone)
- The Very Hungry Caterpillar - Turotial on building a simple hungry snake that can reach Gold medal in Global Arena
- Using Dijkstra's Algorithm for Battlesnake - By the end of this tutorial you will have a simple Battlesnake who will use Dijkstra's Algorithm to find the shortest path to food. Intended to be a second-step for a dev beginning to create their snake, after they have followed Battlesnake's initial tutorials
- Challenges - Tips & tricks - Tips & tricks for Battlesnake challenges
- ChatSnek - Chat plays Battlesnake on Twitch
- Hosting Credit from Digital Ocean - $100 in credits from 2022 Competitive Season Partner Digital Ocean for hosting a Battlesnake Server
- Musical Battlesnake Ballad by Luke Mitchell (aka exzizt) - Canadian Artist Luke Mitchell composed this epic ballad for the 2019 Battlesnake Victoria, British Columbia competition
- SnakeLED - A Raspberry Pi Powered Battlesnake Viewer
- Sorting Hat by Nicholas Carrigan - Sorting Hat for BattleSnake 2021 Summer League, where participants chose their favorite "caster houses" to support