Files
ailed-docs-rp/AILED_Organism_Specification.md
chrnx 5da4b8efa5 docs: design, plan, and the execution record
The thinking behind the organism, versioned alongside the three code repos rather than
living only on one machine.

- AILED_General_Specification.md, the authoritative design, and the implementation plan
  the code was built from
- AGENTS.md, the project-wide rules, including the two that were learned the hard way:
  this is not a performance benchmark, and a null recorded early beats a claim propped up
  later
- the nine superseded module specs, each carrying a banner naming what replaced it
- .sdd/, the execution ledger and every task brief and report: each ruling taken, what it
  would cost if wrong, every correction, and every number verified independently

The three code repos are siblings, each its own repository, and are git-ignored here so
nothing is nested.
2026-09-02 13:17:39 -05:00

5.2 KiB

AILED: Relational Psyche-Modulated Neuroevolution (RPN)

Technical Specification for a Human-Inspired Chess Organism

Status: Conceptual Architecture / Design Spec
Paradigm: Neuroevolutionary Cognitive Architecture
Core Concept: Moving from "statistical imitation" to "heuristic intuition" via intrinsic emotional modulation.


1. Executive Summary

Unlike traditional chess engines (Stockfish/NNUE) that rely on brute-force calculation or statistical pattern matching, AILED implements a Relational Psyche-Modulated Neuroevolution (RPN) architecture. The system treats chess not as a grid of values, but as a dynamic web of spatial relationships modulated by an internal emotional state (\psi).


2. The Core Pillars

2.1. Neuroevolution: HyperNEAT + RPN

Instead of evolving fixed weights, the system evolves a Compositional Pattern Producing Network (CPPN) that generates weights based on geometry and emotion.

  • HyperNEAT: Generates connectivity patterns using spatial coordinates.
  • Relational Perceptron (RP): The fundamental processing unit. It does not see "cells", it sees "interactions".

Mathematical Definition of the RP:

y = \sigma \left( \sum_{i=1}^{n} w_{ij}(\psi) \cdot (\mathbf{W}_{feat} \cdot \mathbf{p}_i) \right)

Where:

  • \mathbf{p}_i: Embedding of piece identity (type, color, value).
  • w_{ij}(\psi) = \text{CPPN}(\mathbf{r}_{ij}, \text{id}_{ij}, \psi): The geometric weight, modulated by the Psyche.
  • \mathbf{r}_{ij}: Relative spatial vector between entities.

2.2. The Psyche (\psi): Global Modulator

The Psyche is a continuous value \psi \in [-100, +100] representing the internal state (stress/calm). It acts as the control signal for the entire organism.

\psi Calculation:

\psi_t = \tanh\left( \sum_{i=1}^{n} w_i \cdot F_i(\text{board}) \right) \cdot \text{scale}

Factors (F_i): Material, King Safety, Pieces Attacked, Center Control, Mobility.


3. The Biological Modules (The Organism)

To complete the "organism", four vital subsystems are integrated to manage time, energy, and survival.

3.1. Memory (Temporal Trace)

Implements a "fading" memory of recent board states via Exponential Moving Average (EMA).

\mathbf{M}_t = (1 - \lambda) \mathbf{M}_{t-1} + \lambda \mathbf{x}_t

Inputs to RP: \mathbf{X}_{total} = \mathbf{x}_t \oplus \mathbf{M}_t

3.2. Metabolism (Complexity Penalty)

Regulates "energy consumption" by penalizing moves that require excessive neural activation.

Q_{\text{met}}(a) = \frac{Q(a)}{1 + \gamma(\psi) \cdot \mathcal{E}(a)}
  • \mathcal{E}(a): Metabolic cost (Activation Norm \times Entropy).
  • \gamma(\psi): Hunger coefficient (increases when \psi is low).

3.3. Reflexes (Dual-Process Theory)

Controls the transition between instinctive and deliberative decision-making.

\text{Trigger} = \begin{cases} \text{S2 (Verificación)} & \text{if } (\psi < \theta_{\text{panic}}) \lor (\Delta \text{Tension} > \theta_{\text{shock}}) \\ \text{S1 (Intuición)} & \text{otherwise} \end{cases}

3.4. Instinct (Homeostatic Drive)

The drive to maintain \psi (stability) vs. the drive to win (material/position).

U(a) = [1 - \alpha(\psi)] \cdot \text{Eval}(a) + \alpha(\psi) \cdot \text{Stability}(a, \psi)
  • \alpha(\psi): The Fear Factor (approaches 1 as \psi \to -100).

4. Mathematical Summary Table

Module Primary Formula Role
Psyche \psi = \tanh(\sum w_i F_i) Global state modulator
Connectivity w = \text{CPPN}(r, \text{id}, \psi) Structural generator
Perception y = \sigma(\sum w \cdot \text{feat}) Relational interaction processor
Memory \mathbf{M}_t = (1-\lambda)\mathbf{M}_{t-1} + \lambda\mathbf{x}_t Temporal context integration
Metabolism Q_{\text{met}} = Q / (1 + \gamma \mathcal{E}) Energy/Complexity regulation
Instinct U = (1-\alpha)\text{Eval} + \alpha\text{Stab} Survival vs. Ambition balance

5. Architectural Diagram

graph TD
    Board[<b>TABLERO</b>] --> PsycheCalc[<b>Psyche Calculator</b>]
    Board --> Memory[<b>Memoria EMA</b>]

    subgraph Control_Layer [Capa de Control: Sistema Nervioso]
        PsycheCalc --> |Modula Topología| HyperNEAT[<b>HyperNEAT (CPPN)</b>]
        PsycheCalc --> |Modula Alerta| Reflex[<b>Reflex Trigger (S1/S2)</b>]
        PsycheCalc --> |Modula Instinto| Instinct[<b>Instinct (Homeostasis)</b>]
    end

    subgraph Execution_Layer [Capa de Ejecución: El Cuerpo]
        HyperNEAT --> |Pesos w(ψ)| RP[<b>Relational Perceptron</b>]
        Memory --> |Contexto| RP
        RP --> |Logits Q| Reflex
        Reflex --> |Logits Validados| Metabolism[<b>Metabolism</b>]
        Metabolism --> Instinct
    end

    Instinct --> Move[<b>MOVIMIENTO FINAL</b>]

6. Research Novelty Statement

The novelty of AILED lies in its biomimetic approach to decision-making. While current SOTA engines focus on minimizing error in a static objective function, AILED evolves a dynamic topology where the very structure of the intelligence is a function of the environmental tension (\psi), allowing for a transition from "deliberative calculation" to "intuitive pattern recognition" mimicking human cognitive shifts under pressure.