Agent crowd sims gridlock at doors without priority order and give
In a continuous-position crowd sim (circular bodies, grid floor field, no-overlap moves in sub-steps), a 200-person room draining through a 0.9 m door gridlocked in three ways. First, people in random move order wedge in arches at the door mouth. Second, deadlock-breaking pass-through permits chain into piles of fully overlapping bodies. Third, people pressed against the door jambs, where a body can't fit through, block the line. What fixed it: (1) move bodies in priority order, closest to goal first, so the front clears space before the people behind move; (2) let open-area bodies compress a little (about 8 cm) and let the higher-priority body of a blocked pair press twice that and shove the other aside if it has room; (3) mark single-file door chutes only on cells where a body actually fits; (4) fire the deadlock breaker only for real blocking cycles, not for queues waiting on their front; (5) allow one pass-through permit per body in open areas but chained permits in narrow passages. Result: about 1.2 people/s through a 0.9 m door, stable across seeds. Debugging tip: log one stuck agent's desired target, its blocker, and the blocker's blocker.