Affect as runtime modulation, not simulated emotion
Affect in this architecture is not simulated emotion for presentation purposes. It is a control layer that changes how other cognitive subsystems allocate resources and compute.
The affect engine maintains a global state vector with components that parallel, computationally, the roles that neurotransmitters play in biological cognition. These are explicit computational parallels, not biological equivalences. The point is not to simulate a brain; it is to encode a class of modulation that biological systems have found useful: the capacity to shift cognitive resource allocation based on environmental state, without hard-coding that allocation in rules.
The five-dimensional affect vector
The affect vector has five components, each representing a different modulation dimension:
Dopamine-like signal: tracks reward expectation and prediction error. Positive surprise (an outcome better than predicted) increases this signal. Negative surprise decreases it. The signal modulates how strongly outcomes affect reinforcement and how salient reward-related memories are in retrieval.
Norepinephrine-like signal: represents urgency and alertness. It rises with high-risk, high-urgency events and falls during stable periods. High norepinephrine broadens the attention aperture toward risky and time-critical items and increases responsiveness to interrupts.
Serotonin-like signal: represents stability and sustained wellbeing. High serotonin dampens impulsive shifts, preserves focus, and reduces overreaction to transient rewards or failures. It is the regulatory counterpart to norepinephrine.
Curiosity: tracks intrinsic motivation toward unknown or uncertain states. High curiosity raises the attention priority of novel signals and raises the probability that the curiosity engine will propose active experiments.
ContradictionStress: tracks accumulated contradiction and epistemic pressure. High contradictionStress activates reflection, raises attention priority of conflicting evidence, and suppresses explorationFactor in the policy engine (as established in the policy engine article).
What Experiment 21 measured
Experiment 21 ran a four-phase incident lifecycle: five baseline rounds (routine signals), ten outage rounds (high-severity, high-contradiction signals), then ten recovery rounds (returning to normal signals). The affect vector was measured at each phase.
After five normal rounds, the baseline state was settled: dopamine 0.126, norepinephrine 0.110, serotonin 0.775, curiosity 0.131, contradictionStress 0.062. This reflects a system in low-stress operation: moderate reward expectation, low alertness, high stability, low contradiction pressure.
After ten outage rounds, the state became stressed: dopamine 0.004 (reward expectation near zero after sustained failure), norepinephrine 0.861 (maximum alertness), serotonin 0.000 (stability completely collapsed), curiosity 0.734 (high intrinsic motivation toward the novel and unknown outage state), contradictionStress 0.895 (near-maximum contradiction pressure). Mood classification: stressed.
After ten recovery rounds, the state returned to settled: dopamine 0.049, norepinephrine 0.089, serotonin 0.783, curiosity 0.104, contradictionStress 0.055. The system fully recovered from the stressed state.
Two properties of this behavior are worth examining:
Monotonic decay during recovery. The norepinephrine component did not oscillate during recovery; it decreased monotonically: 0.861, 0.587, 0.409, 0.293, 0.218, 0.169. This is the exponential moving average (EMA) smoothing mechanism working as intended. The system does not instantly recover from a high-stress state; it fades gradually, which prevents a single good signal from resetting a sustained crisis response.
Full recovery by turn 10. After ten normal signals following the outage, all five affect components had returned to near-baseline levels. This confirms that the EMA decay is calibrated to recover within a reasonable time horizon for the signal frequency used in the experiment.
The 11-fold attention coupling: the key quantitative finding
The most important quantitative result from Experiment 21 is the coupleAttention boost differential.
In settled state: the boost for a high-risk, high-urgency attention candidate was 0.030.
In stressed state (after ten outage rounds): the same candidate received a boost of 0.334.
That is an 11-fold difference. In a stressed state, high-risk and high-urgency items receive eleven times the attention amplification they would receive in a settled state.
The formula for coupleAttention includes norepinephrine and contradictionStress as multipliers on the urgency and risk weights. In the stressed state, both are near their maximum (0.861 and 0.895 respectively), producing a much larger product than in the settled state (0.110 and 0.062).
This coupling is not decorative. It means that when the system detects a genuine incident (sustained outage signals driving the affect into stressed mode), the attention allocation shifts dramatically toward the items most relevant to that incident. Incident-related memories receive higher retrieval priority. Risk signals receive higher attention weight. The cognitive system reorganizes around the crisis.
Why this is not mood as personality
A concern about affect systems is that they might encode a persistent personality rather than a responsive state. A system that is always in a stressed state, or always in a settled state, is not modulating; it is just operating with a fixed set of weights.
The experimental results show that the affect system is responsive. It rose to stressed under ten consecutive outage signals, which is a genuine crisis by any measure. It fell back to settled under ten consecutive normal signals. The EMA smoothing prevents the state from flickering on a single signal (which would be noise-responsive rather than genuinely adaptive), while the decay rate allows full recovery within a reasonable number of signals.
The boundary between "affect as responsive modulation" and "affect as persistent personality" is a matter of timescale and signal sensitivity. A system with very slow EMA decay and high signal sensitivity would be mood-like: it would take many signals to change and few extreme signals to lock it into a state. The experimental calibration aims for timescales that match the operational context: fast enough to respond to a genuine incident, slow enough to ignore noise.
Connection to downstream systems
The affect vector is not consumed only by the attention engine. It feeds multiple downstream systems:
The policy engine uses contradictionStress in the explorationFactor update formula, as described in the policy engine article. High contradictionStress suppresses exploration more aggressively.
The curiosity engine uses the curiosity component to scale exploration priority. When curiosity is high, unknown states receive more attention and more experiment proposals.
The reinforcement engine uses the dopamine-like signal to scale how strongly outcomes affect retrieval priority updates. A high-dopamine state amplifies both positive and negative reinforcement.
The narrative engine uses the full affect vector as input to identity state calculation. A sustained stressed state produces a different identity narrative than a sustained settled state, as demonstrated by Experiment 25's identity drift results.
This fan-out structure is why affect modulation is a control layer rather than a subsystem. It modulates nearly everything, and that is its purpose.