Emergent coherent integration in adaptive multi-agent systems
Zeta Life is a computational framework for studying phase transitions in adaptive integration systems. It models how independent processing units (kernels) can transition from fragmented computation to coherent, unified integration -- and how populations of such units exhibit emergent collective behavior.
The core equation predicts when integration emerges:
The cubic term
Each ConsciousKernel implements a full Active Inference cycle:
PERCEIVE -> PREDICT -> COMPARE -> UPDATE -> MEMORIZE -> ACT -> REFLECT -> DREAM
| Component | Role |
|---|---|
| WorldModel | GRU-based predictive model of the environment |
| SelfModel | Recursive self-modeling (Strange Loop) |
| PredictionErrorEngine | Multi-channel precision-weighted error signals |
| PrecisionController | Learned precision hyper-model (attention) |
| FastMemory / SlowMemory | Complementary Learning Systems (episodic + semantic) |
| DreamEngine | Zeta-driven offline consolidation |
| PersistenceLayer | Identity save/load across sessions |
The integration index
-
$\Phi$ (integrated information) from inverse free energy + memory depth -
$F_i$ (binding force) from learned precisions + self-reflection convergence -
$C$ (coherence cost) from recent prediction errors
from zeta_life.kernel import ConsciousKernel
kernel = ConsciousKernel(state_dim=32, alpha=1.0)
result = kernel.step(stimulus)
print(result.psi) # integration index [0, 1]
print(result.free_energy) # prediction error magnitudeMultiple kernels compete for a shared GlobalWorkspace via proposal strength. Energy-managed spawning, merging, and death create a Darwinian selection process at the kernel level.
from zeta_life.kernel import ConsciousOrganism
organism = ConsciousOrganism(n_kernels=5, state_dim=32)
result = organism.step(stimulus)
print(result.psi) # organism-level integration
print(result.active_kernels) # surviving kernel countA separate simulation layer models multi-level integration with bidirectional information flow:
Organism Level (global integration, top-down modulation)
^v
Cluster Level (local coherence, inter-cluster binding)
^v
Cell Level (individual micro-psyches with archetypes)
The formal equations predict corruption thresholds (how much damage before collapse) and critical mass (minimum units needed for integration to emerge).
The Riemann zeta function's non-trivial zeros provide the temporal structure:
where
git clone https://github.com/skyvanguard/zeta-life.git
cd zeta-life
pip install -e .
# With all extras (mpmath for exact zeta zeros, jupyter)
pip install -e ".[full]"- Python 3.9+
- PyTorch 2.0+
- NumPy, SciPy, Matplotlib
import torch
from zeta_life.kernel import ConsciousKernel
# Create a kernel and run it for 100 steps
kernel = ConsciousKernel(state_dim=32)
for i in range(100):
stimulus = torch.randn(32)
result = kernel.step(stimulus)
print(f"Psi: {result.psi:.4f}")
print(f"Free energy: {result.free_energy:.4f}")
print(f"Dreamed: {result.dreamed}")# Phase transition analysis with real datasets
python experiments/datasets/exp_phase_transitions.py
# Kernel validation (compositionality, grounding, emergence)
python experiments/kernel/exp_conscious_kernel_validation.py
# Multi-kernel organism dynamics
python experiments/kernel/exp_organism_emergence.pypytest tests/ -v # 766 testszeta-life/
|-- src/zeta_life/
| |-- kernel/ # Active Inference kernel + organism
| |-- integration/ # Hierarchical integration (formal equations)
| |-- core/ # Zeta constants, RNN, resonance, tetrahedral space
| |-- organism/ # Multi-agent emergent intelligence (Fi-Mi dynamics)
| |-- evolution/ # Evolutionary parameter optimization (IPUESA)
| |-- psyche/ # Legacy archetype system (experimental)
| |-- datasets/ # Real-world dataset adapters
| +-- utils/ # Shared utilities
|
|-- experiments/
| |-- kernel/ # Kernel validation experiments
| +-- datasets/ # Phase transition + real data experiments
|
|-- tests/ # 766 unit tests
+-- docs/ # Documentation and plans
| Equation | Formula | Meaning |
|---|---|---|
| Critical threshold | Minimum integration for phase transition | |
| Binding factor | Distance above threshold (normalized) | |
| Integration index | Nonlinear amplification of coherence | |
| Critical mass | Minimum units for integration to emerge | |
| Corruption threshold | Maximum damage ratio before collapse |
These are implemented as pure functions in integration/formal_equations.py and used by both the hierarchical simulation and the kernel's _compute_psi().
- Active Inference / Free Energy Principle (Friston) -- the kernel minimizes prediction error
- Complementary Learning Systems (McClelland et al.) -- fast episodic + slow semantic memory
- Darwinian Brain -- multi-kernel competition via Global Workspace
- Integrated Information Theory (Tononi) -- Phi as integration measure
- Riemann zeta zeros -- temporal binding frequencies for memory consolidation
@software{zeta_life_2026,
author = {Francisco Ruiz},
title = {Zeta Life: Emergent Coherent Integration in Adaptive Multi-Agent Systems},
year = {2026},
url = {https://github.com/skyvanguard/zeta-life}
}MIT License -- See LICENSE for details.