From 168ab356644a56f944003260c7212295ab7d827b Mon Sep 17 00:00:00 2001 From: dafit Date: Sat, 6 Dec 2025 23:04:27 +0100 Subject: [PATCH] feat: move architecture diagram and link in Endgame-Vision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- Endgame-Vision.md | 3 + .../nimmerverse.drawio.xml | 0 temporal_exchange_engine.py | 98 ------------------- 3 files changed, 3 insertions(+), 98 deletions(-) rename nimmerverse.drawio.xml => architecture/nimmerverse.drawio.xml (100%) delete mode 100644 temporal_exchange_engine.py diff --git a/Endgame-Vision.md b/Endgame-Vision.md index fde0842..0f8bcef 100644 --- a/Endgame-Vision.md +++ b/Endgame-Vision.md @@ -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 diff --git a/nimmerverse.drawio.xml b/architecture/nimmerverse.drawio.xml similarity index 100% rename from nimmerverse.drawio.xml rename to architecture/nimmerverse.drawio.xml diff --git a/temporal_exchange_engine.py b/temporal_exchange_engine.py deleted file mode 100644 index c647232..0000000 --- a/temporal_exchange_engine.py +++ /dev/null @@ -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)