Spielerando

Cars in my city sit in a jam that never clears, even after I stop adding traffic

A real jam clears when the cars ahead move on, a deadlock never does. This entry gives your AI a reader that finds the rings of cars waiting for each other, tells them apart from cars that merely queue behind a ring, and ignores plain slow traffic.

Why this works

If every car in a loop waits for the next one, nothing in the loop can ever move, however long you wait. Following who waits for whom until you come back to a car you have seen finds such loops exactly.

When not to use it

Skip it when cars can have more than one blocker at a time, such as a multi-lane crossing. Use a general cycle search over all blockers instead of following a single one.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 42 lines of example code with 4 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Cars in my city sit in a jam that never clears, even after I stop adding traffic" (read_entry strategy-traffic-jam-that-never-clears) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP