feat: add goals, drives, affect state, predictions and curiosity
Phase 9. Goals form a mind-scoped tree with kind, priority, progress and blockers; their deterministic relevance to a candidate feeds the goal_relevance attention feature and a goal monitor raises stalled goals and observations that touch one. Drives are a closed set of eight scalars with operator-configured ranges and personality-derived baselines; there is no self-preservation, replication or acquisition drive and no way to add one at runtime. Affect is ten scalars moved by an explicit rule table over events and decaying towards baseline; both modulate attention weights each cycle and the effective weights are recorded with every cycle and shown beside the configured ones. Predictions carry a window and machine-checkable criteria (event terms occurring or staying absent, a belief reaching a confidence, or operator judgement). A resolver job judges them deterministically, keeps an append-only outcome history for calibration (accuracy, Brier score, confidence buckets, overconfidence flag), emits prediction_error events scaled by how confident the miss was, and feeds the outcome back into the linked belief as evidence. Causal hypotheses derive predictions automatically. Curiosity turns misses, contradictions and unexplained observations into questions that compete for attention and become investigation goals when admitted. Brain gains after-cycle hooks and goal/motivation state. API, UI (goals, prediction dashboard, cognitive state panel, effective weights) and CLI (goal, prediction, state). Demo scenario 4 verified end to end.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# Goals, drives and cognitive state
|
||||
|
||||
## Goals
|
||||
|
||||
Goals form a tree (`goals`) with kind (task, investigation, question, maintenance), status, priority, progress, blockers, owner and origin event. Operators create task goals; curiosity creates investigation goals from unexplained observations, prediction errors and contradictions; reflection (phase 10) adds maintenance goals.
|
||||
|
||||
Goals influence cognition through the `goal_relevance` attention feature: each candidate's text is compared with active goals (token overlap weighted by priority). The goal monitor process raises stalled goals and new observations that touch a goal. Goals never grant capabilities; acting still goes through the policy layer.
|
||||
|
||||
## Drives
|
||||
|
||||
Eight drives with operator-configured ranges: curiosity, uncertainty reduction, task completion, consistency, novelty, social coherence, exploration, rest. Baselines derive from personality traits and values. The set is closed in code; there is no self-preservation, replication or acquisition drive and no runtime way to add one (threat T25).
|
||||
|
||||
Drives modulate attention weights each cycle (`motivation.Modulate`): curiosity scales novelty, task completion scales goal relevance, uncertainty reduction scales contradiction, exploration lowers the pull of current context. The workspace page shows the effective weights next to the configured ones.
|
||||
|
||||
## Affect-like state
|
||||
|
||||
Ten scalars: valence, arousal, curiosity, concern, frustration, confidence, uncertainty, engagement, task pressure, load. They are updated by an explicit rule table (`motivation.Rules`) from events — contradictions raise concern and uncertainty, prediction errors raise arousal and lower confidence, completed goals raise valence and relieve pressure, and so on — then decay towards personality baselines (half-life one hour; six hours for drives). Changes above 0.1 emit `emotion_changed` / `drive_changed` events with the reasons.
|
||||
|
||||
This is a functional model, not a claim of feeling (docs/interpretation.md). Everything is visible on the mind overview and via `noemactl state show`, and operators can reset it to baseline or adjust drive ranges; both are recorded as operator actions.
|
||||
Reference in New Issue
Block a user