# What is the math behind the zombie tiktok filter game

I was recently just scrolling my life away on this app called TikTok on this miniature computer called my phone, and recently came accross a trend of people playing a game on a filter. The game is quite simple, it's just a graph and two entities, a zombie and a guy. The goal is for the guy to get from one side to the other side of the graph without being touched by the zombie.

My questions are, what areas of math would this concern? Obviously graph theory but I don't really know what area of graph theory would work with the two players. Is there an optimal strategy? If there is, can this strategy be generalised to n higher dimensions? Maybe this has some overlap with random walks, just the walks not being random for an optimal strategy?

Here is a link to the game being played : https://www.tiktok.com/@shawndasheep96/video/7260503333100719402

I don't have access to the exact game, but by your description it looks like a variation of Cops and Robber game in graph theory. See for instance https://mathweb.ucsd.edu/~fan/152/arch/coprob/

The keyword Cop and Robber should help you find many resources. It is sometimes also called a "Pursuit Evasion" Game.

The initial Cop&Robber game is played on a undirected graph $$G$$. Player $$A$$ place a cop on one vertex of their choice, then player $$B$$ place a Robber on one vertex. They then move one step at a time, alternating turns. Cop wins if they can catch robber, Robber wins if they can avoid Cop forever.

There are lots of existing variants: You can have several cops, or one cop that is allowed $$k$$ steps at each round. The winning goal might also be different. In your case, Robber is forced on one side of the graph, then their goal is to reach the other side.