Recursive self-improving AI through symbiogenetic computation
"After a few million interactions something apparently magical happens... suddenly the entropy of the soup drops dramatically... programs emerge... they're reproducing." — Blaise Agüera y Arcas, Google DeepMind
PRIMORDIUM is the first open-source framework for recursive self-improving AI through embodied symbiogenetic computation. Based on the BFF experiment by Blaise Agüera y Arcas, PRIMORDIUM demonstrates that life and purpose can emerge from pure computation through symbiogenesis - without any mutation.
- Symbiogenesis > Mutation: Programs evolve through merger, not random mutation
- Phase Transitions: Detects emergence of life through entropy/compression metrics
- Neural Encoding: DEMIURGE layer transforms programs to neural networks
- Fully Configurable: Every parameter configurable via YAML
- Scientifically Rigorous: Operational definition of "life" with measurable criteria
Built on papers from paradigms-of-intelligence:
- DiffLogic DEMIURGE: Differentiable logic gates for gradient-based program optimization
- Mesa-Optimization Detection: Detects emergent internal optimization in programs
- State Soup: In-context learning through linear state interpolation
- Replication Tracking: Measures self-replication emergence
See primordium/FOUNDATION.md for detailed documentation.
# Install
pip install -e .
# Validate a config
primordium validate configs/template_quick.yaml
# Run a quick test (1000 interactions, ~1 minute)
primordium run configs/template_quick.yaml
# Run extended phase transition test (500K interactions)
primordium run configs/phase_transition.yamlPRIMORDIUM is based on a profound scientific discovery: life can emerge from pure computation through symbiogenesis (merger) without any mutation.
- Start with random BrainFuck programs (the "primordial soup")
- Randomly pair and merge programs (symbiogenesis)
- Run the combined program
- Split back into two programs
- Repeat millions of times
Something magical happens: Programs that can copy themselves emerge spontaneously.
PRIMORDIUM is fully configurable via YAML. See templates in configs/:
| Config | Purpose |
|---|---|
template_full.yaml |
All configuration options |
template_quick.yaml |
Quick test (~1 minute) |
phase_transition.yaml |
Extended run for emergence |
scaling_study.yaml |
Test different soup sizes |
with_layers.yaml |
Enable evolutionary layers |
experiment:
name: my_experiment
seed: 42
chaos:
size: 256
tape_length: 48
aether:
interactions_total: 100000
backend: c
metrics:
log_interval: 5000
life_criteria_thresholds:
instruction_density: 0.1
replicator_fraction: 0.05
compression_ratio: 0.8PRIMORDIUM tracks key metrics for detecting phase transitions:
| Metric | Description |
|---|---|
| Entropy | Shannon entropy (drops during emergence) |
| Instruction Density | Valid BrainFuck instructions |
| Compression Ratio | How compressible programs are |
| Life Criteria | Operational definition of life |
Based on the BFF experiment, "life" requires all three:
- Structure: Instruction density ≥ 10%
- Replication: ≥ 5% are identical copies
- Purpose: Compression ratio ≤ 80%
When running, watch for: *** LIFE EMERGED ***
primordium/
├── aether/ # BrainFuck interpreter (Python + C + CUDA)
├── chaos/ # Soup and scroll management
├── config/ # Pydantic configuration
├── metrics/ # Metrics tracking
├── layers/ # 7 evolutionary layers
│ ├── genesis/ # Phylogeny tracking
│ ├── gaia/ # Ecology & spatial
│ ├── hermes/ # Error correction
│ ├── mnemosyne/ # Memory
│ ├── prometheus/ # Tools
│ ├── nous/ # Meta-learning
│ └── demiurge/ # Neural encoding
├── scripts/ # Run scripts
├── configs/ # Configuration templates
└── FOUNDATION.md # Scientific & technical details
PRIMORDIUM uses a phased approach. All evolutionary layers are disabled by default - enable them incrementally based on what emerges:
| Phase | Components | Goal |
|---|---|---|
| Phase 1 | AETHER, CHAOS, METRICS | Demonstrate phase transition at scale |
| Phase 2 | + GAIA | Add spatial dynamics (based on arXiv:2406.19108 Figure 8) |
| Phase 3-6 | + HERMES, MNEMOSYNE, PROMETHEUS, NOUS | Add layers based on what emerged |
| Phase 7+ | + DEMIURGE | Neural encoding after sufficient complexity |
Key Principle: Science must go bottom-up from observation, not top-down from theory. Build Phase 1 first, study what emerges, then design subsequent layers.
See FOUNDATION.md for full details.
Traditional evolutionary algorithms use mutation + selection. But the BFF experiment showed:
- Mutation is NOT required: Life emerges even with mutation = 0
- Merger is powerful: Combining programs creates new complexity
- Phase transitions are real: Emergence happens suddenly
See FOUNDATION.md for:
- Complete scientific background
- Architecture details
- Technical implementation
- Layer descriptions
- Configuration reference
| Backend | Speed |
|---|---|
| Python | ~26K int/s |
| C | ~114K int/s |
| CUDA | ~100M+ int/s |
# Run all tests
pytest tests/
# Run specific test file
pytest tests/metrics/test_metrics.py -v
# Compile C backend (optional)
python -m primordium.aether.compiler
# Validate config
primordium validate configs/template_full.yamlPRIMORDIUM explores:
- Can symbiogenesis produce more complex organisms than mutation alone?
- What is the nature of the gelation transition in program space?
- Can BF programs evolve to write neural networks?
- Is life simply a thermodynamic inevitability?
- Agüera y Arcas, B. (2024). What is Intelligence? MIT Press
- Margulis, L. (1970). Origin of Eukaryotic Cells
- Goldstein, A. (1995). Dynamic Kinetic Stability
MIT
PRIMORDIUM - From chaos, order. From noise, life.