Many routes are equally short, and the game picks the one with the most zigzags
On open ground there are hundreds of equally short ways to the same spot, and a plain search picks any of them, often a wobbly one. Here is how to make it prefer the neat, straight one without making the walk longer.
Why this works
Walking with few turns looks calm and purposeful, while a zigzag looks lost. Making each turn cost a little more than nothing, but far less than a step, picks the tidier route without ever making the walk longer.
When not to use it
Skip it when the route will be straightened afterwards or when units move freely in open space. Then the staircase never shows, and the extra bookkeeping only slows the search.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 51 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 "Many routes are equally short, and the game picks the one with the most zigzags" (read_entry path-fewer-turns-turn-cost) 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