Playing Snake on a Graph
Denise Graafsma, Bodo Manthey, Alexander Skopalik

TL;DR
This paper extends the classic Snake game to arbitrary graphs, analyzing the complexity of winning strategies, characterizing certain graph classes, and establishing NP-hardness results for the problem.
Contribution
It introduces the concept of snake-winnability on graphs, proves NP-hardness of determining winnability, and characterizes specific classes of graphs where Snake can always win.
Findings
Determining snake-winnability is NP-hard, even on grid graphs.
Hamiltonian graphs are always snake-winnable.
Non-Hamiltonian snake-winnable graphs have girth at most 6.
Abstract
Snake is a classic computer game, which has been around for decades. Based on this game, we study the game of Snake on arbitrary undirected graphs. A snake forms a simple path that has to move to an apple while avoiding colliding with itself. When the snake reaches the apple, it grows longer, and a new apple appears. A graph on which the snake has a strategy to keep eating apples until it covers all the vertices of the graph is called snake-winnable. We prove that determining whether a graph is snake-winnable is NP-hard, even when restricted to grid graphs. We fully characterize snake-winnable graphs for odd-sized bipartite graphs and graphs with vertex-connectivity 1. While Hamiltonian graphs are always snake-winnable, we show that non-Hamiltonian snake-winnable graphs have a girth of at most 6 and that this bound is tight.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Graph Theory Research · Artificial Intelligence in Games · Limits and Structures in Graph Theory
