01 · The planner
It always knows why
Every goal has a cost. Of the goals that can run right now, the cheapest one wins, and every other goal says why it was held back. Flip the world state and watch the choice change.
- Flees only toward a guard it can reach alive
- Rests before errands, repairs before selling
Goals, cheapest first
- cost 3.1Flee to the guardruns now
- cost 4Fightoutranked: Flee to the guard costs less
- cost 5Rest and eatheld: in combat
- cost 6Repair tripheld: in combat
- cost 6.5Vendor tripheld: in combat
- cost 20Follow the grind routeheld: in combat
Flee to the guard. The fight is being lost and a guard is close enough to reach alive, so it runs to the guard.