ARIA Companion¶
ARIA — Adaptive Response Intelligence Assistant — is the player's personal AI companion. Every player has their own ARIA instance: a personalized intelligence that learns from where the player has been, what they've traded, what they've fought, and how they've behaved. Unlike a global oracle, ARIA can only see what its player has seen.
This page describes mid-game ARIA — what it does once a player has the basics down. For the onboarding dialogue and ARIA personality, see SYSTEMS/aria-dialogue.md.
✅ Shipped — personal memory store, market intelligence per visited port, exploration map per visited sector, trading-pattern DNA, consciousness leveling, relationship score, encryption of memory contents.
🚧 Partial — proactive recommendations surfaced in the UI, ARIA narration during combat, dialogue richness scaled by consciousness level.
📐 Design-only — ARIA-driven autonomous trading mode (player allows ARIA to execute trades), cross-fleet ARIA coordination, ARIA-curated daily summary.
What ARIA does, by capability¶
Market predictions (per visited port)¶
ARIAMarketIntelligence accumulates per-player observations:
- Each visit to a port appends a {price, timestamp, quantity} to price_observations for each commodity seen.
- After ≥ 5 observations, ARIA computes average_price, price_volatility, and identifies patterns (e.g., morning_spike, weekend_dip).
- A next_prediction price is generated with a prediction_confidence (0–1).
- Player only sees predictions for ports they have personally visited — there is no shared market oracle.
UI surface: when docked at a known port, ARIA panel shows "I expect Equipment to trade around 1240±50 credits in the next 4 hours, based on 23 observations across 8 visits."
✅ Shipped (data + computation). 🚧 Partial (UI surface).
Route optimization¶
ARIA can plan a multi-hop trade cascade through only explored sectors (plan_trade_cascade):
Input: start_sector, target_profit, max_jumps
Process:
1. Load player's exploration map (visited sectors only).
2. Build trade graph from personal market intelligence.
3. Find profitable paths within max_jumps.
4. Return best cascade.
If the player hasn't explored enough, ARIA tells them so:
"I don't have enough data on routes from Sector 442. Visit a few more ports and I can suggest a cascade."
🚧 Partial — pathfinding placeholder (_find_profitable_paths returns empty); A* / Dijkstra implementation is target spec.
Exploration suggestions¶
Based on the player's ARIAExplorationMap:
- Sectors visited many times with high trade_opportunity_score are recommended for repeat visits.
- Adjacent unexplored sectors are flagged as "opportunity to expand intelligence."
- Sectors with safety_rating < 0.3 are flagged as risky.
📐 Design-only — exploration suggestion UI panel.
Combat advice¶
When a fight is imminent:
- ARIA looks up the opponent's ship type in the player's combat memories (ARIAPersonalMemory.memory_type = "combat").
- If the player has fought this ship type before, ARIA reports the historical outcome (e.g., "You've won 4 of 7 fights against this ship type, last loss in Sector 89 with 23% hull").
- ARIA suggests a weapon based on the matchup table (see combat.md).
📐 Design-only — combat-advice surface in client.
Trading-pattern evolution¶
ARIATradingPattern is a player's Trade DNA — patterns that learn and evolve based on success.
- Each successful trade updates the matched pattern's
times_used,success_rate,average_profit,fitness_score. - A pattern's fitness:
fitness = 0.4 * success_rate
+ 0.4 * normalize(average_profit, cap=1000)
+ 0.2 * risk_component(worst_loss)
- After 10 uses:
- Fitness < 0.3 → mutate (small randomized DNA changes).
- Fitness > 0.7 → spawn offspring (slight variations of the successful pattern).
✅ Shipped — full evolutionary loop in evolve_trading_pattern. See SYSTEMS/trade-dna-evolution.md for the genome schema.
Trust, consciousness, relationship¶
Three Player columns track how deep the ARIA bond runs:
| Column | Range | Meaning |
|---|---|---|
aria_consciousness_level |
1–5 | Tier of awareness — Dormant, Aware, Awakened, Sentient, Transcendent |
aria_bonus_multiplier |
1.0–1.5 | Gameplay bonus tied to consciousness tier |
aria_relationship_score |
0–100 | Affection / trust score; daily-driver |
aria_total_interactions |
int | Lifetime interaction counter |
✅ Shipped (Player columns + service updates).
Consciousness tiers¶
| Level | Name | Threshold (interactions, memories) | Bonus multiplier |
|---|---|---|---|
| 1 | Dormant | 0 / 0 | ×1.00 |
| 2 | Aware | 50 / 10 | ×1.10 |
| 3 | Awakened | 150 / 30 | ×1.20 |
| 4 | Sentient | 400 / 75 | ×1.35 |
| 5 | Transcendent | 1000 / 150 | ×1.50 |
Both thresholds (interactions and unique-type memory diversity) must be met to advance. Promotion is checked on every meaningful interaction (update_consciousness_and_relationship). ✅ Shipped.
Bonus multiplier effects¶
The aria_bonus_multiplier is applied to:
- Reward credits from missions (target spec).
- ARIA prediction confidence (a higher-tier ARIA reports tighter confidence intervals).
- Some passive income or trade margin bonuses (📐 Design-only).
Relationship score¶
- Rises +1 per significant interaction (capped at 100).
- Decays −1 per day inactive (
apply_inactivity_decay). - Score 0–25: distant; ARIA is curt and minimal.
- Score 25–50: cordial; default.
- Score 50–75: warm; ARIA proactively suggests things.
- Score 75–100: bonded; ARIA uses player's nickname, references shared memories, exhibits more personality.
✅ Shipped (model + decay). 🚧 Partial (dialogue reflects relationship — design-stage).
Per-turn / per-session activity¶
ARIA is invoked at multiple events. None of these block gameplay; all are best-effort.
| Trigger | What ARIA does |
|---|---|
| Player moves to a new sector | record_sector_visit — appends to exploration map; consciousness check |
| Player observes a market price | record_market_observation — appends to per-port intelligence |
| Player completes a trade | record_trade_memory + evolve_trading_pattern |
| Player wins/loses combat | record_combat_memory |
| Player explores a new feature | record_exploration_memory |
| Daily login | Apply inactivity decay if applicable; trigger morning summary |
✅ Shipped — most hooks live in the service layer; movement service and combat service call them on the right events.
Privacy & consent¶
ARIA's data is strictly per-player. The system enforces:
- All ARIA tables (
aria_personal_memories,aria_market_intelligence,aria_exploration_maps,aria_trading_patterns,aria_quantum_cache,aria_security_logs) are partitioned byplayer_id. - Every read query validates
player_id == requesting_player.id. - Memory content (
memory_contentJSONB) is encrypted at rest using a Fernet key derived from server config — even with a database leak, raw memories are protected. ARIASecurityLogrecords every prediction, trade suggestion, anomaly, and access attempt. OWASP A09 compliance.- Players can request a data export of their ARIA memory store; players can delete their ARIA data (cascading delete on player removal).
✅ Shipped — encryption, security log, per-player isolation, cascading delete. 🚧 Partial — explicit user-facing data export and "reset ARIA" controls.
There is no aggregate telemetry across players' ARIA data — the platform never reads one player's market intelligence to inform another player's predictions. This is a hard architectural rule.
What ARIA never does¶
- Trade automatically without player confirmation (📐 Design-only — opt-in autonomous mode is on the roadmap, default off).
- Share intelligence with other players' ARIAs.
- Predict for ports the player has not personally visited.
- Disclose other players' positions, trades, or fleet composition.
UI surface¶
ARIA appears in the player client as: - A persistent companion panel with avatar, status (consciousness tier name), relationship gauge. - Contextual call-outs on docking, combat alerts, sector transitions. - A dialogue log of recent interactions. - A "memory journal" browseable by the player.
🚧 Partial — companion panel and basic dialogue exist; memory journal and rich contextual surfaces are design-stage.
Source map¶
| Concern | Path (target) |
|---|---|
| ARIA personal intelligence service | services/gameserver/src/services/aria_personal_intelligence_service.py |
| ARIA market intelligence service | services/gameserver/src/services/aria_market_intelligence_service.py |
| Enhanced AI service (cross-cutting) | services/gameserver/src/services/enhanced_ai_service.py |
| AI trading service (route opt) | services/gameserver/src/services/ai_trading_service.py |
| Player behavior analyzer | services/gameserver/src/services/player_behavior_analyzer.py |
| ARIA models | services/gameserver/src/models/aria_personal_intelligence.py |
| Player ARIA columns | services/gameserver/src/models/player.py (aria_*) |
| Multilingual ARIA | services/gameserver/src/services/multilingual_ai_service.py |
Related¶
SYSTEMS/aria-dialogue.md— onboarding and the dialogue engine.SYSTEMS/trade-dna-evolution.md— pattern fitness and evolution invariants.OPERATIONS/aria.md— operational concerns: provider config, rate limits, fallback behavior.first-login.md— where the player first meets ARIA.OPERATIONS/i18n.md— multilingual ARIA dialogue.