Spielerando

Rehouse citizens after a house is torn down with the fewest moves

When one house is demolished or made smaller, re-sorting the whole town sends every worker across the map and breaks their routes. This entry keeps everyone who can stay where they are, moves only those who have to, and says clearly who ends up without a roof.

Why this works

Every move costs the player something, such as a worker's route, a habit or a sense of home. Keeping everyone who can stay and moving only those who must gives the smallest change that still fits, and a fixed order makes the result repeatable.

When not to use it

Skip it when the player wants a fresh, balanced layout, such as after a big rebuild, or when closeness to work matters more than stability. Then rebalance everyone and accept the churn, ideally on the player's request.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 4 common mistakes and the fix
  • 37 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 "Rehouse citizens after a house is torn down with the fewest moves" (read_entry rehouse-citizens-fewest-moves) 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