An AI Rat Learns How To Escape From A Cat

An AI Rat Learns How To Escape From A Cat

A rat is stuck in the center of a pond, while a cat waits at the edge to catch it.
The situation looks impossible - Can an AI rat find an escape strategy?

Watch

The Cat and Rat Escape Puzzle

This talk is about a mathematical puzzle in which a rat is stuck at the center of a circular pond while a cat waits at the edge to catch it. I will show several escape tactics based on geometrical reasoning, and then show how an AI rat can learn to escape from the cat using deep reinforcement learning.

To watch the computer simulations properly, this video should be viewed on a large screen such as a laptop or tablet.


Different Language Versions

The text of this presentation is currently in English, but the narration is produced by an AI that I have trained to use my voice and to translate my speech into other languages. Different narration languages can be selected using the dropdown language selector.

This AI produces a very good likeness of my voice in English, although I am told that it is less accurate in some other languages.


Contents

  1. The Original Puzzle – Numberphile's Game of Cat and Mouse
  2. Vlad's Predicament: the Dashing, Circling and Fleeing tactics
  3. Professor Rat's Circle and Dash escape strategy
  4. An Improved Escape Strategy
  5. AI Rat – What is Deep Reinforcement Learning?
  6. Can an AI Rat Learn How to Escape from the Cat?
  7. Summary and Conclusions

Numberphile's Game of Cat and Mouse

This puzzle is based on one shown in a video from the maths popularisation series Numberphile, presented by Ben Sparks in 2019:

Numberphile: Game of Cat and Mouse

In their video they show the dashing and circling tactics, and then demonstrate how these can be combined to find a solution using geometrical reasoning. I will show these tactics and explain how their solution works. I will also introduce a new approach that I call the fleeing tactic. Finally, I will show how a simple variation of this solution can be optimised using a genetic algorithm.

Boris, Vlad and Professor Rat

The Numberphile puzzle involved a cat and a mouse, but my principal characters are a cat and a rat. For the initial escape attempts involving the dashing and circling tactics, I have named the two protagonists Boris the Cat and Vladimir the Rat.

Little Vladimir has no understanding of strategy, tactics or geometry, so he is doomed. Following his demise he is replaced by Professor Rat for the more advanced escape attempts.

Can an AI Rat Escape from the Cat?

I will show how an AI rat can learn to escape from the cat using deep reinforcement learning. We will see that the AI rat quickly develops a strategy that involves complex escape manoeuvres which are consistently successful.

A type of AI that can solve a problem like this has direct relevance to military robotic systems.


The War in Ukraine

The current war in Ukraine, following Russia's full-scale invasion in 2022, has seen widespread and increasing use of autonomous and semi-autonomous systems by both sides. There has also been increased use of AI in these systems.

It is likely that such autonomous systems will soon engage each other directly in combat.

The type of AI shown in this talk is able to learn how to engage an adversary on its own by exploiting knowledge of its opponent's behaviour. In this puzzle the goal of the AI was to escape from its adversary, but it could equally have been to destroy it.

Given a realistic training environment, the types of AI and learning algorithms described here are certainly capable of developing this kind of capability. The relevance of this technology in the current situation is therefore clear.