DecisionSystem¶
DecisionSystem
| Phase · priority | Agency · 30 |
| Reads | ctx.Options; personality_caution, personality_curiosity, personality_sociability, personality_aggression |
| Writes | current_action, current_action_target, current_action_reason; a decision record in the trace |
| Settings | DilemmaThreshold 10 % (LLM escalation, Phase 5) |
| Status | designed · Phase 1 (#37) |
| PLAN | §7.4, §7.4.2, §7.6, §13.5 |
| Player | Villager ("doing X, and why") |
Arbitrates. Scores nothing. DecisionSystem does not know what douse_fire is; it collects the options published for each actor, weights them by personality, and picks one. Phase 0 hand-wrote every score in here, so every new action was a core edit; that is the thing the option bus removed.
Per actor, each tick:
- Collect that actor's options from
ctx.Options. - Multiply each score by the personality weight for its action family (PLAN §7.6): caution raises
move-away and lowersattack; curiosity raisesexploreandobserve; and so on. - Apply faction, ideology and group modifiers if those systems are active (later phases).
- Pick the maximum; ties break by
StableHash(tick, actor, action). - (Phase 5) Escalate to the LLM when the top two scores are within
DilemmaThreshold. - Write
current_action,current_action_target,current_action_reason(the winning option'sReason).
And record, in the trace: the winner, the top three runners-up, every option's Inputs, and the weights applied. That record is Explain(entity) and the card's "doing X — it beat Y and Z".
Invariant check: a scoring branch appearing in this system is a design violation; it belongs in a publisher (CLAUDE.md → CONSISTENCY). Hot-toggle: off, current_action freezes and ActionSystem keeps executing the last choice — villagers get stuck mid-habit, which is visible and harmless. Determinism: argmax over a deterministically ordered option list with a stable tiebreak.
History¶
| Phase | Change |
|---|---|
| 1 | Introduced as arbitration only; writes current_action_reason; decision records with runners-up and inputs. |
See also: Option bus · ActionSystem · Causal trace