On Nokia phones and in every browser since, Snake has been the same tiny ritual: a line grows one square each time it eats, and the only way to lose is to crash into a wall or into yourself. Easy at first â but the longer you get, the less room there is to move.
The dream ending is a perfect game: keep eating until the snake's body fills every single square. To do that, the snake must trace a route that passes through each cell of the grid exactly once. That route has a name in mathematics â a Hamiltonian path â and it is far less innocent than it looks.
That gap between "just steer toward the food" and "thread a path through every cell without trapping yourself" is not a quirk of the game. It is the same line that separates the easy problems from the hardest ones in all of computer science.
Comments
Loading comments...