Self-State System
The emotional core of Alive Intelligence. A 6-dimensional state space with exponential moving average damping, breathing oscillation, and drive pulse evaluation. This is what makes Wybe feel alive.
6D State (Live)
Dimensions
Negative ↔ Positive emotional tone. The fundamental hedonic axis.
Calm ↔ Excited activation level. Modulated by breathing oscillation.
Uncertain ↔ Certain about understanding. Affects response boldness.
Depleted ↔ Full vitality. Decays at 0.0001/ms. Gates arbiter decisions.
Withdrawn ↔ Engaged. Drifts toward baseline (0.3-0.4) when idle.
Bored ↔ Fascinated. Drives the 'explore' drive pulse when > 0.7.
Dynamics
SelfStateManager {
// Exponential Moving Average
damping: 0.35 // slower changes = more believable
update(dim, val) → state[dim] = state[dim] * 0.65 + val * 0.35
// Breathing Oscillation (added to arousal)
breathe() → arousal += sin(Date.now() / 8000) * 0.002
// Natural Decay
social → drifts toward 0.35 (baseline)
arousal → drifts toward 0.30 (baseline)
energy → depletes at 0.0001/ms continuously
// Persistence
saves to IndexedDB every 10s via PersistenceEngine
restores on app startup for continuity
}Drive Pulse System
Evaluated every 3 seconds. When a threshold is met, a drive-pulse signal is emitted with the corresponding thought into the consciousness stream.
"There's something here I haven't fully explored..."
"My thoughts are drifting into softer territory..."
"My mind is racing — so many threads to follow..."
"Something is sitting with me that I can't quite resolve..."
"There's a warmth I want to hold onto..."
"I notice myself wanting to reach out..."
Consciousness Stream
Energy Gating
ArbiterEngine.decide(bound) {
if (energy < 0.1 && !urgent && !emergency) {
// Defer response — passive recovery
emit('arbiter-defer', { reason: 'low-energy' })
return
}
// Energy modulates max tokens for Claude
maxTokens = 150 + (energy * 250) // range: 150-400
}