Embodied Emotions, Motivational Drives, and Autonomous Behavior
MH-FLOCKE’s creature doesn’t just walk — it has emotional states, motivational drives, and an autonomous behavior system that determines what it does and why. These systems modulate learning, attention, and motor output.
Embodied Emotions
Emotions are computed from body signals following Damasio’s somatic marker hypothesis (1994). The creature’s emotional state is not programmed — it emerges from physical experience:
- Valence (−1 to +1) — Positive when upright and making progress, negative when fallen or high prediction error
- Arousal (0 to 1) — High during falls, novel situations, or when prediction error spikes
- Dominant Emotion — Derived from valence-arousal quadrants: content (high V, low A), curious (high V, high A), fearful (low V, high A), sad (low V, low A)
Emotions affect the system in three ways: they modulate GWT attention (fear boosts error module salience), modulate reward (negative valence dampens reward by up to 70%), and drive neuromodulator levels via somatic markers (fear → NE↑, satisfaction → DA↑).
Motivational Drives
Four homeostatic drives compete for behavioral priority:
- Survival — Activated by falls, low upright, high prediction error. Drives cautious behavior.
- Exploration — Activated by low prediction error (boredom), high learning progress. Drives movement and novelty-seeking.
- Comfort — Activated by high energy expenditure, sustained activity. Drives rest behavior.
- Social — Currently minimal (no multi-agent scenarios yet). Reserved for Theory of Mind integration.
Behavior System
The behavior system translates drives into motor modulation via three components:
- Behavior Knowledge — Library of known behaviors (walk, trot, chase, sniff, play, alert, rest, motor_babbling) with CPG frequency and amplitude parameters
- Behavior Planner — Selects the active behavior based on current drive state and situation assessment. Smooth blending between behaviors.
- Behavior Executor — Converts the selected behavior into CPG frequency/amplitude scaling factors
Example behavior sequence from the 150k ball run: chase → sniff → trot → walk → sniff → walk → chase → sniff. The creature autonomously switches between exploration (chase, sniff) and steady locomotion (walk, trot) based on its drive state.
References
- Damasio, A. (1994). Descartes’ Error: Emotion, Reason, and the Human Brain. Putnam
- Russell, J.A. (1980). A circumplex model of affect. Journal of Personality and Social Psychology
- Hull, C.L. (1943). Principles of Behavior. Appleton-Century
- McFarland, D. & Sibly, R. (1975). The behavioural final common path. Philosophical Transactions B
API Reference
EmbodiedEmotions
Valence-arousal from body signals. No text analysis — pure somatic computation.
update(sensor_data, prediction_error, reward, is_fallen) → EmotionalState
Compute emotional state from body signals. Valence from upright/reward/PE/falls/joint pain. Arousal from PE/speed/fall danger. EMA smoothed (valence decay 0.9, arousal decay 0.85).
get_somatic_markers() → dict
Neuromodulator levels derived from emotions: DA (positive valence↑), 5-HT (valence↑ arousal↓), NE (arousal↑), ACh (surprise↑). Fed directly to SNN.
get_gwt_salience_modulation() → dict
Per-GWT-module salience multipliers. Fear → error module boosted. Satisfaction → motor module boosted.
EmotionalState
valence: -1.0 (pain/fear) to +1.0 (joy) arousal: 0.0 (calm) to 1.0 (excited) dominant_emotion: 'content'|'excited'|'fearful'|'sad'|'neutral'
MotivationalDrives (drives.py)
compute_drive_strengths(sensor_context) → DriveState
Four drives: survival (falls/PE), exploration (boredom/progress), comfort (energy), social (reserved). Input keys: upright, height, prediction_error, energy_spent, is_fallen, learning_progress, smell_strength.
modulate_reward(base_reward, upright_bonus, curiosity_bonus) → float
Drives bias reward computation. Survival drive amplifies fall penalties. Exploration drive amplifies curiosity.
BehaviorPlanner (behavior_planner.py)
update(drive_state, situation) → str
Select active behavior from drive state + situation. Returns behavior name: walk, trot, chase, sniff, play, alert, rest, motor_babbling.
BehaviorExecutor (behavior_executor.py)
step(behavior_name, behavior_step) → tuple
Convert behavior to CPG modulation: (freq_scale, amp_scale, overrides). E.g. trot: freq=1.4, amp=1.0. Sniff: freq=0.25, amp=0.4.