Module: Legion::Extensions::Agentic::Affect::Mood::Helpers::Constants

Defined in:
lib/legion/extensions/agentic/affect/mood/helpers/constants.rb

Constant Summary collapse

MOOD_STATES =

Mood states (valence x arousal quadrants + neutral)

%i[
  serene
  content
  curious
  energized
  anxious
  frustrated
  melancholic
  flat
  neutral
].freeze
DIMENSIONS =

Mood dimensions

%i[valence arousal energy stability].freeze
MOOD_ALPHA =

EMA alpha for mood updates (slow — mood is resistant to change)

0.1
UPDATE_INTERVAL =

How many ticks before mood recalculates

5
MAX_MOOD_HISTORY =

Mood history capacity

200
MOOD_CLASSIFICATION =

Dimension ranges for mood classification

{
  serene:      { valence: (0.3..), arousal: (..0.3), energy: (0.3..) },
  content:     { valence: (0.3..), arousal: (0.3..0.6) },
  curious:     { valence: (0.1..), arousal: (0.4..0.7), energy: (0.4..) },
  energized:   { valence: (0.2..), arousal: (0.7..) },
  anxious:     { valence: (..0.3), arousal: (0.6..) },
  frustrated:  { valence: (..-0.1), arousal: (0.4..0.8) },
  melancholic: { valence: (..-0.1), arousal: (..0.4) },
  flat:        { valence: (-0.2..0.2), arousal: (..0.3), energy: (..0.3) }
}.freeze
MOOD_MODULATIONS =

Modulation effects: how each mood biases cognitive processing

{
  serene:      { attention_threshold: -0.1, risk_tolerance: 0.1, curiosity_boost: 0.0 },
  content:     { attention_threshold: 0.0, risk_tolerance: 0.05, curiosity_boost: 0.05 },
  curious:     { attention_threshold: -0.15, risk_tolerance: 0.1, curiosity_boost: 0.2 },
  energized:   { attention_threshold: -0.05, risk_tolerance: 0.15, curiosity_boost: 0.1 },
  anxious:     { attention_threshold: -0.2, risk_tolerance: -0.2, curiosity_boost: -0.1 },
  frustrated:  { attention_threshold: 0.1, risk_tolerance: -0.1, curiosity_boost: -0.15 },
  melancholic: { attention_threshold: 0.15, risk_tolerance: -0.15, curiosity_boost: -0.2 },
  flat:        { attention_threshold: 0.2, risk_tolerance: 0.0, curiosity_boost: -0.1 },
  neutral:     { attention_threshold: 0.0, risk_tolerance: 0.0, curiosity_boost: 0.0 }
}.freeze
MOOD_INERTIA =

Mood inertia — how resistant each mood is to change

{
  serene:      0.7,
  content:     0.6,
  curious:     0.4,
  energized:   0.3,
  anxious:     0.5,
  frustrated:  0.5,
  melancholic: 0.8,
  flat:        0.9,
  neutral:     0.2
}.freeze