English
Just Play Snake.net

Snake Strategy, Tested

Most Snake tips are guesses, so we tested them. We wrote bots that follow each approach and ran them through the same rules code that powers this game: 1,000 games each for the first three tests, and 50 for the last.

Bots never panic or miss a turn, so these are not scores to expect from your own hands. They do show which habits are worth building.

The results

ApproachModeAverageBest
Straight to the appleClassic260610
Straight to the appleY2K309930
Check for space firstClassic6261,110
Fixed loopClassic2,5302,530

1. Check for space before you turn

This was the biggest gain short of a full loop. The first bot goes straight for each apple and only avoids crashing on the very next step, so it only dies once it has trapped itself with no safe move left. The second bot heads for the apple too, but when it has a choice, it will not enter a space too small to hold its whole length. That one rule took the average from 260 to 626.

Before you turn, look at where that turn leaves you. If the apple sits in a tight gap, leave it for a moment and come back when your body has moved away.

2. A tidy snake beats a fast one

The third bot ignores the apple completely. It follows one fixed path that covers every square on the board, and picks up each apple when the path gets there. It finished all 50 of its games with a perfect 2,530, because a snake on that path can never trap itself.

It is also slow: about 16,400 steps, or some 22 minutes on Mid. You do not need to play that strictly, but the idea carries over. As you get longer, sweep across the board in neat rows instead of chasing apples through the middle, so your body stays together and the open space stays in one piece.

3. Do not count on open walls to save you

Y2K helped the simple bot by about 19 percent, from 260 to 309. That is a real gain, but far smaller than the one from checking for space. Removing the walls does not stop you from boxing yourself in. Your body becomes the wall instead.

Smaller habits that help

Play Snake