data/awareness/
An awareness profile: how an agent’s awareness of each thing it perceives rises and falls, from Unaware to Engaged. Perception fills a meter; crossing a state’s threshold promotes after a reaction delay, and the meter decays when perception stops. A brain names its profile. The engine declares manifold:default_awareness. Loaded by the server only.
| Registry | manifold-ai:awareness-profile |
| Files | data/awareness/*.ron, *.update.ron, *.final.ron |
| Sides | server: only the server loads it |
| Reads | nothing |
| Contract | Brains, data stage |
Entry
A record, written AwarenessProfile(..); the name before the parentheses is optional.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | yes | The profile’s key, <mod-id>:<name>. | |
promote | map of AwarenessState to f32 | yes | The meter level, 0 to 1, that promotes to each state; thresholds increase with the state. A state without one is skipped. | |
demote_margin | f32 | no | 0.10 | How far below a threshold the meter falls before the state drops. |
reaction | map of AwarenessState to f32 | no | none | The reaction delay before each state takes effect, in seconds. |
reaction_jitter | f32 | no | 0.20 | The fraction the reaction delay varies by. |
hold | f32 | no | 4.0 | Seconds an entry holds its level after the last perception before it decays. |
decay_per_s | f32 | no | 0.08 | How much the meter falls per second while decaying. |
forget_after | f32 | no | 30.0 | Seconds after the last perception until confidence reaches 0. |
engage_requires | list of SenseName | no | [Sight, Touch, Damage] | The senses that may raise awareness to Engaged. |
give_up | f32 | no | 15.0 | Seconds an agent gives up on a target it cannot reach. |
Example
From tools/test-mods/guide-creature/data/awareness/razorback.ron:
AwarenessProfile(
id: "guide-creature:razorback",
promote: { Engaged: 0.75 },
reaction: { Engaged: 0.15 },
hold: 6.0,
decay_per_s: 0.05,
give_up: 10.0,
)
Types
AwarenessState
An awareness state.
| Variant | Written | Description |
|---|---|---|
Unaware | Unaware | Has not noticed. |
Suspicious | Suspicious | Noticed something. |
Alert | Alert | Looking for it. |
Engaged | Engaged | Acting on it. |
SenseName
A sense.
| Variant | Written | Description |
|---|---|---|
Sight | Sight | Seeing. |
Hearing | Hearing | Hearing. |
Damage | Damage | Being hit. |
Touch | Touch | Touching. |
Call | Call | A call from an ally. |