Cops and Robbers

Applet demo

This applet is an example of a simple cops and robbers game on a graph.  To begin, click the mouse anywhere in the applet window to give it focus.  You are the cop (cyan) chasing the robber (red).  Use the keys I-J-K-M to move up, left, right, or down, respectively, or O or N to move along the diagonal edge in the center.

This applet requires a Java-enabled browser.

For a more detailed discussion, see my related blog post.

Spikey Created with Wolfram Mathematica 7.0