Back to presentation

Escaping the Cat: Geometry, Genetic Optimisation and Deep Reinforcement Learning

This presentation investigates whether a rat trapped at the centre of a circular pond can escape a cat that runs around the edge four times faster than the rat swims. It first explains angular velocity and demonstrates why simple dashing, circling and continuously fleeing tactics fail. A geometric solution combines circling within one quarter of the pond radius with a final dash; viable circling radii lie approximately between 21% and 25% of the pond radius. A genetic algorithm then improves a predefined strategy by optimising how the rat blends fleeing and radial dashing. The final section replaces prescribed tactics with a deep reinforcement learning agent trained using PPO in a simulation that includes inertia, velocity and acceleration. Across the reported trials, the learned policy escapes successfully and typically reaches safety in 20–45 seconds, compared with about 130 seconds for the earlier circle-and-dash example, although the simulations use different physical assumptions. The presentation concludes by relating experience-driven autonomous control to potential robotic and unmanned-system applications.

Showing slides 9–16 / 23

Slide 9

The Fleeing Tactic

Slide 9 · 10:51

Introduces a fleeing tactic in which Vladimir continuously adjusts his direction to swim away from Boris, producing a curved path rather than a straight dash. Boris’s greater speed lets him move ahead and intercept the likely exit point. Each time Vladimir approaches the bank and finds Boris waiting, he reverses and heads toward the opposite side, causing the pattern to repeat. Continuous flight by itself therefore fails to produce an escape.

Slide 10

The Circle-and-Dash Escape Strategy

Slide 10 · 11:56

Derives the combined circle-and-dash solution. By circling inside 25% of the pond radius, the rat can achieve greater angular velocity than the cat and eventually occupy the opposite side of the centre. It can then dash to the nearby bank while the cat must run halfway around the circumference. Both requirements can be satisfied only within a narrow range: the rat’s circling radius must be approximately 21% to 25% of the pond radius.

Slide 11

Failed Trial at 20% Radius

Slide 11 · 13:55

Tests the circle-and-dash idea using a circling radius of 20% of the pond radius, just below the theoretically viable range. Professor Rat delegates the hazardous trial to a student. Although the student first gains the desired angular separation and then dashes toward the edge, Boris arrives at the same time. The failed attempt confirms that angular advantage alone is insufficient when the remaining swim from the circling path is too long.

Slide 12

Successful Escape at 23.5% Radius

Slide 12 · 14:48

Demonstrates a successful circle-and-dash attempt at a circling radius of 23.5%, near the middle of the estimated viable range. Because the rat’s angular velocity is only slightly greater than Boris’s, Professor Rat must circle for a long time before gaining half a rotation. He then dashes radially toward the bank and reaches it just before Boris. The strategy works, but the margin of safety is very small.

Slide 13

Optimising a Combined Escape Strategy

Slide 13 · 16:09

Reframes escape as an optimisation problem. After an initial circling phase, the rat follows a curved trajectory determined by a weighted combination of two vectors: a radial dashing vector toward the bank and a fleeing vector directed away from Boris. Their position-dependent weights are represented by B-spline interpolation curves. A genetic algorithm evolves these weighting functions to maximise the distance between the cat and rat when the rat reaches the pond edge.

Slide 14

Genetic Algorithm Result

Slide 14 · 17:54

Shows the strategy found by the genetic algorithm. Early in the outward trajectory, the fleeing coefficient is larger, so the rat primarily moves away from Boris. As its radial coordinate increases, the fleeing weight falls and the dashing weight rises, directing it more nearly along a radius toward the bank. The resulting escape leaves substantially more separation from Boris than the basic circle-and-dash attempt, although the sequence of behaviours remains predefined and only its free parameters are optimised.

Slide 15

Can an AI Agent Learn to Escape?

Slide 15 · 19:06

Begins the investigation of an AI cyber rat that is not given a prescribed sequence of circling, fleeing or dashing steps. Instead, it will use deep reinforcement learning to develop a behavioural policy from its own simulated experiences. The approach is presented as a general technique in which agents learn to act within an environment, with applications ranging from games to advanced robotic control.

Slide 16

Deep Reinforcement Learning Fundamentals

Slide 16 · 19:49

Summarises the deep reinforcement learning framework. An agent receives observations describing its environment, and a policy model implemented as an artificial neural network converts those inputs into actions. The environment assigns numerical rewards when behaviour advances the objective. During training, the learning process adjusts the network so that its actions obtain greater expected rewards. The cyber-rat experiment uses the PPO learning algorithm.