Dijkstra map
A grid pathfinding technique that floods distances from the goal across the whole map, so any number of agents navigate by stepping downhill — with no per-agent search.
Rather than run A* once per monster, you do a single breadth-first / Dijkstra flood from the goal cell (or several goals) and label every cell with its distance to it. Each agent then only has to look at its neighbours and step to the lowest number. Negate the map and re-scan, and the agents flee toward the nearest exit instead.
Brian Walker popularised them in the roguelike Brogue, and they are in effect a precomputed flow field over a grid. Cheapest when many agents share one goal: a single scan serves the whole horde. A related neighbour is Jump Point Search, which instead speeds up individual searches.