What this game is
Snake is one of the best-known computer games there is: a head leads a body around the field, every apple makes the tail longer, and you must not run into anything.
Usually there is one snake, and its opponent is its own tail. Here there are two on one field: your red one and the computer's blue one. The apples are shared, room is short, and each snake is a wall for the other. You can beat the other to an apple, or cut off its way and wait for it to run into a dead end.
A match is played to three rounds. A round goes to the snake that first grows to length 15 — or to the one still alive.
Rules
- Steer with the arrow keys or WASD; on a phone, swipe across the field. A snake cannot turn straight back on itself.
- There are always two apples on the field. An apple eaten makes the snake one square longer, and a new one appears at once.
- Run into a wall, into yourself or into the other snake's body, and the round is lost.
- If the two heads meet in one square, the shorter snake loses. At equal length it is a draw, and the round is replayed.
- Length 15 wins a round. Three rounds win the match, and only matches go into the tally below the board.
How to play better
- Do not chase every apple. An apple the other snake is closer to is often worth leaving for a position from which the next one is yours.
- Length is a weapon: the longer snake wins a head-on meeting and walls off more of the field.
- Pin the other snake against a wall: a snake running along the edge can turn only one way. Get in front of it, and there is no way out.
- Do not crawl into a pocket smaller than your own tail: it catches up before a way out opens.
- The expert moves faster and works out which apple it will reach before you. Against it, claiming ground pays better than racing.
A bit of history
Snake grew out of Blockade, an arcade game released by Gremlin in 1976: two players steered growing lines around the screen and tried not to crash. It is a close relative of Tron on this site — two opponents leaving a wall behind them.
The single snake that grows as it eats then lived on home computers, and became world-famous in 1997, when it was built into Nokia mobile phones: hundreds of millions of people who never owned a games console played it.
For a programmer, snake is a neat problem in pathfinding and judging space: it is not enough to find a way to the apple, you must not trap yourself where there is no way out. The same ideas — breadth-first search, flood fill, counting territory — run the bot tournaments where snakes play each other.
About the levels
Normal heads for the nearest apple in a straight line, seeing no obstacle beyond the next square, and makes one move in five at random. It is easy to trap.
Hard finds the real shortest path to an apple around both bodies, and never crawls into a pocket smaller than its own length.
Expert moves faster, keeps clear of your head while it is not the longer snake, goes for the apples it can reach before you, and when nothing else decides, picks the move that leaves it more of the field than you.