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,14 @@
|
||||
{{define "state_panel"}}{{$s := .State}}{{$m := .Mind}}
|
||||
<div class="card">
|
||||
<h2>Cognitive state <span class="muted small">scalars updated by rule; not a claim of feeling</span></h2>
|
||||
<div class="grid cols-2 tight">
|
||||
<div><h3>Affect</h3>
|
||||
{{range $k, $v := (affectMap $s.Affect)}}<div class="dim"><span class="dim-name">{{title $k}}</span><span class="dim-bar {{if eq $k "valence"}}bipolar{{end}}"><i style="{{if eq $k "valence"}}left:{{pct (valencePos $v)}};width:{{pct (valenceWidth $v)}}{{else}}width:{{pct $v}}{{end}}"></i></span><span class="dim-val">{{conf $v}}</span></div>{{end}}
|
||||
</div>
|
||||
<div><h3>Drives</h3>
|
||||
{{range $s.Drives}}<div class="dim"><span class="dim-name">{{title .Name}}</span><span class="dim-bar"><i style="width:{{pct .Value}}"></i></span><span class="dim-val">{{conf .Value}} <span class="muted">[{{conf .Min}}–{{conf .Max}}]</span></span></div>{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{if .CanOperate}}<form method="post" action="/minds/{{$m.Slug}}/state/reset" class="row"><input type="hidden" name="_csrf" value="{{.CSRF}}"><button class="btn small" data-confirm="Reset drives and affect to their baselines?">Reset transient state</button></form>{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user