MIN‑CUT
MUNCHER
the ghosts solve max‑flow · the min cut is the cage
DINICwrites the max-flow
FORDaugments the paths
KARPkeeps them shortest
EVENholds the line
the intended duel
Every half-second the ghosts run Dinic's algorithm on the maze graph: you are the source, the open maze is the sink, and the minimum vertex cut is the cheapest set of tiles that separates you from everything. If they can win the race to those tiles, they take them, hold them, and re‑solve inward until there is nowhere left. Red gates are their cut. The green gate is the race you can still win. Run.
PAUSEDP to resume