feat: move architecture diagram and link in Endgame-Vision

- Move nimmerverse.drawio.xml to architecture/
- Add visual diagram link in Endgame-Vision.md Architecture Overview
- temporal_exchange_engine.py moved to nyx-orchestrator

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-06 23:04:27 +01:00
parent cac4dec411
commit 168ab35664
3 changed files with 3 additions and 98 deletions

View File

@@ -45,6 +45,8 @@ This is a **RESEARCH VISION** - a platform for studying how intelligence emerges
## Architecture Overview
**Visual diagram:** → [`architecture/nimmerverse.drawio.xml`](architecture/nimmerverse.drawio.xml) (open in draw.io)
```
┌──────────────────────────────────────────────────────────────────┐
│ NIMMERVERSE ARCHITECTURE │
@@ -351,6 +353,7 @@ Sentinel architecture monitors training to protect conceptual topology.
## Links to Detail Docs
### Architecture
- [`architecture/nimmerverse.drawio.xml`](architecture/nimmerverse.drawio.xml) - **Visual overview diagram** (open in draw.io)
- [`architecture/Cellular-Architecture.md`](architecture/Cellular-Architecture.md) - Organisms, primitives, life force economy
- [`architecture/Dual-Garden-Architecture.md`](architecture/Dual-Garden-Architecture.md) - Virtual/real feedback loop
- [`architecture/Data-Architecture.md`](architecture/Data-Architecture.md) - phoebe 15-table schema

View File

@@ -1,98 +0,0 @@
"""
Temporal Exchange Engine
========================
ADR-003 Implementation: The economics calculator for sim2real decisions.
This module implements the core decision-making primitive for Nyx's
uncertainty resolution. Given a target confidence level, it determines
whether simulation is worth the lifeforce cost, or if reality is the
only remaining teacher.
Reference: ADR-002-temporal-ternary-gradient.md
"""
import math
from dataclasses import dataclass
from typing import Literal
@dataclass
class TemporalState:
"""Represents the current state of a pattern or nerve's confidence."""
confidence: float
source: Literal['virtual', 'real']
cost_incurred: float
class TemporalExchangeEngine:
"""
The Exchange Rate Calculator.
Determines optimal strategy for resolving uncertainty:
- When to invest lifeforce in simulation
- When simulation is futile and reality must teach
"""
def __init__(self, sim_fidelity: float = 0.75):
"""
Args:
sim_fidelity (0.0-1.0): The 'Truth Ceiling' of the Virtual Garden.
Even perfect simulation is only this % real.
"""
self.fidelity_cap = sim_fidelity
# Calibration: How much Lifeforce buys 1 unit of raw confidence?
self.learning_rate = 0.1
def calculate_virtual_confidence(self, lifeforce_spent: float) -> float:
"""
Calculate grounded confidence from lifeforce investment.
Diminishing returns: The first 10 LF buys a lot of confidence.
The next 10 buys less. It never exceeds the fidelity_cap.
Formula: Cap * (1 - e^(-k * LF))
"""
raw_knowledge = 1.0 - math.exp(-self.learning_rate * lifeforce_spent)
grounded_confidence = raw_knowledge * self.fidelity_cap
return grounded_confidence
def get_optimal_strategy(self, target_confidence: float) -> dict:
"""
Ask Nyx: 'Is it worth simulating this?'
Returns:
dict with keys:
- action: 'SIMULATE' or 'DEPLOY_TO_REALITY'
- reason: Human-readable explanation
- lifeforce_budget: Required LF (0 if reality is needed)
"""
# 1. Check if the target is even possible in Virtual
if target_confidence > self.fidelity_cap:
return {
"action": "DEPLOY_TO_REALITY",
"reason": f"Target {target_confidence} exceeds Sim Fidelity ({self.fidelity_cap}). Simulation is futile.",
"lifeforce_budget": 0
}
# 2. Calculate required Lifeforce to reach possible target
# Inverse of the exponential decay formula
required_lf = -math.log(1 - (target_confidence / self.fidelity_cap)) / self.learning_rate
return {
"action": "SIMULATE",
"reason": f"Spend {required_lf:.2f} LF to reach {target_confidence} confidence.",
"lifeforce_budget": round(required_lf, 2)
}
# --- Usage Example ---
if __name__ == "__main__":
engine = TemporalExchangeEngine(sim_fidelity=0.8)
# Scenario A: Nyx wants 99% certainty (Impossible in Sim)
print(engine.get_optimal_strategy(0.99))
# Output: DEPLOY_TO_REALITY (Simulation is futile)
# Scenario B: Nyx wants 70% certainty (Possible)
print(engine.get_optimal_strategy(0.70))
# Output: SIMULATE (Spend ~20 LF)