Each event in Behavioral Pathways is defined as an EventSpec with three parts: impact values, chronic flags, and permanence values. The spec lives in Rust as a single file under src/event/types. Below is a simplified walkthrough of experience_strain_financial.rs to show how the numbers are structured and interpreted.
1. Impact Values
Impact values express the immediate psychological push of the event. They are normalized to a -1.0 to 1.0 range and applied as deltas to state dimensions.
pub const SPEC: EventSpec = EventSpec {
impact: EventImpact {
valence: -0.55,
arousal: 0.55,
dominance: -0.55,
stress: 0.55,
perceived_liability: 0.42,
hopelessness: 0.42,
trust_propensity: -0.25,
// ... other dimensions
},
// ...
};
These numbers are hand-calibrated based on psychological literature and domain intuition. The comments in the source file list citations and rationale for each dimension. For example, financial strain reliably increases stress and perceived burden while reducing control and trust.
2. Chronic Flags
Some events are not just acute spikes; they persist. Chronic flags tell the system to store a persistent delta rather than a fast-decaying one.
chronic: ChronicFlags {
valence: true,
arousal: true,
dominance: true,
stress: true,
perceived_liability: true,
trust_propensity: true,
// ...
},
For financial strain, the effects linger. The system treats those dimensions as ongoing pressure until new events or time-based recovery pull them down.
3. Permanence Values
Permanence values determine how much of the initial impact becomes long-term shift when the event is sustained or repeated. Think of it as the fraction that “sticks.”
permanence: PermanenceValues {
valence: 0.12,
arousal: 0.12,
dominance: 0.12,
stress: 0.12,
trust_propensity: 0.08,
// ...
},
A higher permanence value means the event can nudge baseline more when it becomes formative. Most dimensions stay low to avoid permanent shifts from single events.
Where the Numbers Come From
- Empirical grounding: Each field includes a comment referencing research (e.g., stress studies, ITS factors, hedonic adaptation).
- Relative scaling: Values are tuned to be proportional across dimensions, so “stress” and “hopelessness” move together in realistic ways.
- Interpretive filter: The final effect is moderated by personality and developmental stage at runtime.
Source File
See src/event/types/experience_strain_financial.rs in the core repository for the full spec with citations and rationale.