Docs: layer 4 is the Brain; pull and latency follow the goal

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-20 01:43:13 +01:00
commit 29f7a158b6
2 changed files with 10 additions and 8 deletions

View file

@ -67,7 +67,7 @@ against Ymir's pinned Box3D, sphere r 0.1 m, density 1000, 1/120 s, 4 substeps,
strain, resolve, `WillBroken` (`DriveState.cs`); behaviour blends two poses by leak and shake
(`HoldAgainstReflex.cs:56-80`); the body takes 12 strengths and 12 joint-space targets
(`HumanoidRagdoll.cs:120-146`). No IK, no clips, no physiology, no grip, no part tree beyond the `Limb` and
`Muscle` enums. Rung 3 adds emitters and arousal; rung 4 the goal flip and `PoseCycle`.
`Muscle` enums. Rung 3 adds emitters and arousal; rung 4 the goal flip and `PoseBehaviour`.
9. **BDS today.** Headless and body pain box only (`src/BadDay.Ymir/BodyPainBox.cs`); the world is built per run
with capacity 15 (58); the puppet is welded to a stool because the PD ragdoll cannot balance for 15 s (59-62).
No session type survives beyond a run, no commands, no level content.
@ -218,7 +218,7 @@ follow-up `scenario-session-unify`).
standing, and its failure is the collapse People Playground shows.
6. `bds-mvp-clips`: which animations exist. Options: poses only (idle, guard, cower, protect-head, brace, reach,
aim); poses plus a few looping clips (idle sway, struggle, writhe); generated clips from Vili. Recommend poses
plus three loops, authored as pose keys (rung 4's `PoseCycle` generalised); Vili clips when its retarget to
plus three loops, authored as pose keys (rung 4's `PoseBehaviour` generalised); Vili clips when its retarget to
this ragdoll exists.
7. `bds-will-visible`: what failing will looks like. Options: tremor and sag (strain shake exists,
`HoldAgainstReflex.cs:62`), slower and shorter reaches, aim wander; plus an on-screen will bar; plus vocal or

View file

@ -44,14 +44,16 @@ Signal flows one way per tick, in this order; each layer has one owner. Layers 1
(figures `[M]` in the research doc; verify before they become constants).
3. **Drive** (`DriveState`, `DriveParameters`). Per-character state that evolves every tick: pain from
afferent input, strain from suppressed reflexes, arousal from sensory load; resolve drained by all three and
scaled by the objective's pull, recovering only when pain and arousal are both low;
scaled by the active goal's pull, recovering only when pain and arousal are both low;
later shock on a clock that blood loss speeds and adrenaline that spikes on threat. Resolve reaching zero
breaks the will, which releases every suppression. Static per-character values are this state with its
dynamics frozen. (`motion-pipeline:ruling:euphoria-drive-is-dynamic-state`.)
4. **Behaviour.** The drive selects and weights behaviours (hold against a reflex, withdraw, writhe, crawl to
the objective, pass out, get up) that emit targets and per-muscle strength into caller-owned arrays, and
nothing else. Today one stand-in: hold a pose against the withdrawal reflex, blended toward a withdraw pose
by the reflex leak, shaking with strain, and withdrawing once the will breaks.
4. **The Brain.** The consumer's authored goals (a behaviour, a priority, a pull, conditions over the drive
state), selected after a deliberate latency: the eligible goal of highest priority is wanted, and the
Actor commits it. Lodur has no flip rule of its own; every rule is Brain data
(`lodur:ruling:npc-brain-authors-goals`). One behaviour, `PoseBehaviour`: a pose held or a loop of pose keys,
blended toward a flinch pose by the reflex leak and shaking with strain, emitting targets and per-muscle
strength into caller-owned arrays and nothing else. Considerations and the will mix extend it.
5. **Body.** Follows targets with per-muscle strength in the game's physics world. v1 is GameCult's own
PD-tracking active ragdoll on **Ymir**, GameCult's boundary around a pinned Box3D, read and driven through
Ymir's structure-of-arrays world in place (`lodur:ruling:lodur-body-on-ymir`): `Lodur.Body.Ymir`. It owns
@ -60,7 +62,7 @@ Signal flows one way per tick, in this order; each layer has one owner. Layers 1
policy) behind the same interface. (`motion-pipeline:ruling:euphoria-body-layer-order`.)
`Actor` runs layers 1-4 for one character in that order once per physics step, from caller-owned inputs into
caller-owned outputs, and reports its events (flinch, will broke, withdrew) as flags.
caller-owned outputs, and reports its events (flinch, will broke, goal changed) as flags.
## Invariants