
Building GOAP AI for a Living World
How goal-oriented action planning helps villagers choose useful work without turning the project into a fragile behavior tree maze.
Simulation games become more convincing when characters appear to care about their own situation. In Exiles of Lowlands, the goal is not to make villagers look busy. The goal is to let them make reasonable choices under pressure.
GOAP is useful because it describes behavior as a search problem. A villager has a current world state, a desired goal, and a list of actions that can change the state. The planner finds a sequence that moves the villager from here to there.
Why not only behavior trees?
Behavior trees are excellent for tightly-authored behaviors. They are also easy to inspect, which matters during production. But settlement life quickly creates many combinations: gather wood, eat, sleep, warm up, haul goods, work a field, respond to weather, find tools.
GOAP gives those combinations a common language:
- Preconditions describe when an action is possible.
- Effects describe what changes after the action.
- Costs describe what is cheap, risky or inconvenient.
Practical constraints
The implementation has to stay cheap enough for multiple villagers. Planning can be throttled, cached and interrupted. A villager does not need to reconsider every possible future every frame.
Good AI in this kind of game is less about intelligence as spectacle and more about dependable routines that break in believable ways.
What this enables
Once the planner is stable, new systems can plug in without rewriting every villager. Farming can add field work. Weather can add shelter needs. Storage can add hauling pressure. The settlement starts to feel connected because every subsystem speaks to the same decision layer.

