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.
Game of a Cat and a Rat
Introduces a pursuit-evasion problem in which a rat starts at the centre of a circular pond while a cat waits at the edge. The presentation asks whether an AI-controlled cyber rat can discover an escape strategy. It will compare the established geometric circle-and-dash solution, a numerically improved variation produced with a genetic algorithm, and a strategy learned independently through deep reinforcement learning.
The Original Cat-and-Mouse Puzzle
Establishes the original Numberphile “Game of Cat and Mouse” puzzle and its key physical assumption. The rat is in a circular pond, the cat remains on the bank, and the cat can run four times faster than the rat can swim. Although direct dashing and simple circling appear unsuccessful, the original solution combines these tactics. This presentation uses a rat rather than a mouse.
Presentation Roadmap
Outlines five stages of the investigation: unsuccessful dashing, circling and fleeing tactics; the geometric circle-and-dash solution; genetic-algorithm optimisation of an improved strategy; development of an escape policy through deep reinforcement learning; and final conclusions. Throughout the simulations, the cat is represented by a red dot and the rat by a smaller blue-green dot.
Boris and Vladimir: The Rat’s Predicament
Introduces the first simulated opponents, Boris the cat and Vladimir the rat. After fleeing from Boris and falling into the pond, Vladimir is stranded at its centre while Boris patrols the edge. Lacking the geometric insight needed for a successful escape, Vladimir will test three intuitive approaches—dashing, circling and fleeing—which provide the groundwork for understanding the later combined strategy.
Angular Velocity and Critical Radii
Explains the relation between velocity and angular velocity, expressed as ω = v/r. At four times the rat’s speed, the cat on the pond edge has the same angular velocity as a rat circling at 25% of the pond radius. If the rat circles at a smaller radius, such as 21%, its angular velocity is greater and it completes a rotation more quickly. At radii above 25%, its angular velocity is lower than the cat’s.
Why the Dashing Tactic Fails
Tests the direct dashing tactic: Vladimir swims in a straight line from the centre toward the point opposite Boris. The rat must cover one pond radius, while the cat runs half the circumference at four times the rat’s swimming speed. Because half the circumference is approximately π times the radius, Boris reaches the destination in roughly three-quarters of Vladimir’s travel time. The cat is therefore waiting when the rat reaches the edge.
Circling at 25% Radius
Examines circling at 25% of the pond radius. Boris runs around the bank at four times Vladimir’s speed, but his circular path is also four times as long. Consequently, the cat and rat have equal angular velocity and remain angularly aligned throughout the simulation. Circling at this radius does not allow Vladimir to move around to Boris’s opposite side and therefore creates no escape opportunity.
Gaining Angular Advantage at 20% Radius
Reduces Vladimir’s circling radius to 20% of the pond radius. His circular path is now less than one quarter of the length of Boris’s path around the bank, so Vladimir has greater angular velocity despite swimming more slowly. His angular position gradually advances relative to Boris until the two are on opposite sides of the pond’s centre. Circling alone, however, still does not take Vladimir to safety.