I built a wall but my units keep walking through it along their old route
Saved routes go stale the moment the map changes. This entry gives your AI a route cache that drops only the routes a change really affects, in both directions: new walls break some routes and new openings make others needlessly long.
Why this works
A cached route is a promise about the map as it was. A blocked tile on the route breaks the promise; an opened tile only makes the route possibly worse. Treating the two cases differently avoids both walking through walls and recomputing everything on every edit.
When not to use it
Skip the cache for small maps with few units. Computing the route each time is simpler and nobody will notice the cost.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 27 lines of example code with 3 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "I built a wall but my units keep walking through it along their old route" (read_entry strategy-units-walk-through-new-wall) 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