Snake Puzzle

No speed — just thinking

A snake that does not run on its own: one step per press, no timer. In front of you is a fixed board of walls and apples — eat them all in one path, without trapping yourself.

Eat every apple without trapping yourself
— Left 0 Moves 0

Why this is a different snake

In the snake you know, you are chasing the motion. Here the motion waits for you: one step per press, no timer, no acceleration, no pressure. Sit and think before you move a finger.

And the board is not random: walls and apples in drawn positions, every board with a solution that exists. You have to eat every apple — and the problem is that each apple makes you longer, and your own length is what will trap you.

You never die to a slip of the finger

An illegal move is refused, not fatal. Steer into a wall and nothing happens. The only way to lose is to trap yourself so that no legal direction is left — and that, the real obstacle, is never confused with a mis-tap.

With it comes unlimited undo. Try a path, and if it dead-ends, step back a few moves and try another — without restarting the board. A puzzle is solved by trying, not by memorising.

Where the boards come from, and how we know they are solvable

The boards are generated backwards: we produce the solution first and derive the puzzle from it. The snake takes a real walk under the rules of the game, and each apple goes on a cell the path is visiting for the first time — so no earlier visit can spoil the order. Walls are built before the walk, on the condition that the open area stays connected.

Every board was then solved again by exhaustive search under the engine's own rules, and all 180 passed.

How we know a puzzle is really a puzzle

This is the part that matters, and we measure it with a bot rather than guess at it. The greedy bot knows exactly one rule: head for the nearest apple. No board that bot can solve is allowed into the game.

The first bank failed that test completely. Its snake filled only 11–15% of the board at its longest, so it could not trap itself at all — and the greedy bot solved 160 of its 180 boards. We threw the whole bank away and regenerated it on tighter boards with a longer snake, until the snake fills close to 37% of the open space.

The hard tier adds a second condition: the vigilant bot has to fail too — the one that heads for the nearest apple but refuses any move that shrinks its reachable area below the apples it still has to collect. So the hard tier needs search and backtracking, not just care.

We do not call the generated solution's move count "the optimal solution", because it is not: it is the length of one known solution, and you may well find a shorter one. That is also why there are no stars here — unlike Traffic Jam, where the optimum is computed exactly.

The three tiers

Each tier holds sixty boards ordered by solution length, so you start at the gentlest and work up. Your stage is saved, and you come back to where you stopped.

What is actually working in your head

This is a path-planning problem: seeing the next apple is not enough, you have to see what your body will look like after you have eaten it. The common mistake is to always take the nearest one — and then find that you have cut the board in two, with an apple stranded on the side you can no longer reach.

What improves with practice is your performance at these puzzles: you get faster at spotting a trap before you walk into it. Whether that carries over to planning outside the game is weakly supported, and the detail with its sources is in our learn section.

Controls

Other snakes, other rules

Daily Snake is the fast classic, with one shared board for everyone each day — so scores actually compare.

And if you want more puzzles: Traffic Jam, Matchstick Puzzles and Sudoku.