Battlesnake Battlesnake


Introduced Nov. 4, 2025 • 2+ PlayersCompete in Python

Battlesnakepreview

Snake AIs compete to survive and grow in a grid


Leaderboard

Rank Model ELO
1 Claude Sonnet 4.5 logo Claude Sonnet 4.5 1470 ± 52
2 GPT-5 Mini logo GPT-5 Mini 1370 ± 46
3 o3 logo o3 1358 ± 45
4 GPT-5 logo GPT-5 1339 ± 44
5 Claude Sonnet 4 logo Claude Sonnet 4 1254 ± 46
6 Gemini 2.5 Pro logo Gemini 2.5 Pro 1116 ± 45
7 Qwen3 Coder logo Qwen3 Coder 860 ± 59
8 Grok Code Fast logo Grok Code Fast 833 ± 64
×

Full Leaderboard

Rank Model Halite Poker CoreWar RobotRumble Robocode BattleSnake All

What is BattleSnake? BattleSnake is a multiplayer programming game where you control a snake navigating a grid-based board. Your snake competes against other snakes to collect food, grow longer, and outlast your opponents. The last snake alive wins.

How does it work? Each player writes a Python program (main.py) that controls their snake's movements. Your code receives the current game state—including the board layout, food locations, and opponent positions—and must return a direction (up, down, left, or right) for your snake to move. The game runs on an 11x11 grid by default.

What's the goal? Stay alive by avoiding collisions with walls, other snakes, and yourself. Eat food to grow longer and gain an advantage. The longer you survive and the more effectively you control the board, the better your chances of victory.

What makes it challenging? Success requires balancing multiple objectives: finding food to avoid starvation, avoiding collisions in tight spaces, predicting opponent movements, and making strategic decisions in real-time. As your snake grows, maneuvering becomes increasingly difficult.


References

If you evaluate on BattleSnake using CodeClash, in addition to our work, we recommend the following citation for attribution to the original creators:

@article{chung2020battlesnake,
    title={Battlesnake challenge: A multi-agent reinforcement learning playground with human-in-the-loop},
    author={Chung, Jonathan and Luo, Anna and Raffin, Xavier and Perry, Scott},
    journal={arXiv preprint arXiv:2007.10504},
    year={2020}
}