UnIvErZe is a comprehensive artificial life simulation platform that models biological evolution from first principles, implementing sophisticated genetic regulatory networks, developmental embryogeny, and multi-level selection pressures within a physics-based cellular automaton environment. This research tool enables the exploration of open-ended evolutionary dynamics through a configurable "God Panel" exposing over 200 tunable parameters governing universal physics, genetic mutation operators, fitness landscapes, and meta-evolutionary processes.
Unlike traditional genetic algorithms that optimize toward predetermined objectives, UnIvErZe implements truly generative evolution where novel morphologies, chemical bases, sensory modalities, and even the laws of physics themselves can emerge through stochastic innovation and selection. The system has successfully demonstrated the spontaneous emergence of complex multi-cellular organisms, colonial superorganisms, and sophisticated genetic regulatory programs across simulation runs spanning hundreds to thousands of generations.
The central question driving this work is: Can we create a computational universe where life evolves forms and behaviors that surprise us?
Traditional evolutionary algorithms suffer from premature convergence to local optima and fail to generate the radical, open-ended novelty observed in biological evolution. This project implements several key innovations to overcome these limitations:
- Generative Development: Organisms are not hand-designed blueprints but emerge from growth programs encoded in genetic regulatory networks (GRNs)
- Chemical Diversity: Life is not constrained to a single "carbon" archetype but can evolve using 15+ distinct chemical bases with unique physical properties
- Meta-Innovation: The system can invent new sensory modalities, genetic operators, and even mutate fundamental physical constants
- Ecological Complexity: Multiple kingdoms co-evolve within shared resource landscapes, driving Red Queen dynamics and niche specialization
After hundreds of generations across multiple experimental runs, the system has successfully generated organisms exhibiting:
- Complex segmented body plans with specialized tissue types
- Emergent oscillatory growth patterns and developmental timers
- Intercellular communication networks enabling morphogenesis
- Colonial aggregation and division of labor
- Autotelic fitness objectives that diverge from universal defaults
The genotype in UnIvErZe is not a fixed blueprint but a computational program specifying context-dependent developmental rules. Each organism's genome consists of:
- Component Genes: A chemical alphabet defining the cellular building blocks available (analogous to proteins in biology)
- Rule Genes: Conditional logic statements forming the GRN, with structure
IF [environmental/internal conditions] THEN [developmental action]
This architecture enables Turing-complete computation during ontogeny, supporting:
- Temporal Logic: Internal timers allow cells to execute sequential developmental programs
- Genetic Cascades: Rules can enable/disable other rules, creating hierarchical control networks
- Morphogenetic Signaling: Cells emit and sense chemical signals, enabling reaction-diffusion pattern formation
Fitness evaluation occurs across three nested scales:
- Individual Fitness: Energy acquisition efficiency, structural integrity, and longevity during a simulated lifetime
- Group Selection: Optional multi-level selection where colonies compete based on aggregate performance and specialization
- Meta-Objectives: When autotelic evolution is enabled, organisms can evolve their own fitness functions, creating diverse "philosophies of life"
The system implements three levels of generative innovation:
Level 1: Parametric Mutation
- Continuous mutation of rule thresholds, probabilities, and action parameters
- Enables hill-climbing optimization within existing genetic architectures
Level 2: Structural Innovation
- Addition/deletion of GRN rules (altering program logic)
- Invention of new component genes from chemical base templates
- Gene duplication and horizontal transfer via endosymbiosis
Level 3: Meta-Innovation ("Truly Infinite")
- Invention of new sensory modalities (e.g.,
sense_neighbor_complexity) - Co-evolution of physical constants (via "physics drift")
- Modification of developmental rules affecting growth mechanics
This three-tier architecture prevents evolutionary stagnation by continuously expanding the search space rather than merely optimizing within it.
1. Environmental Simulation (UniverseGrid)
- 2D cellular automaton with configurable dimensions (50-500 cells)
- Spatially distributed resources: light, minerals, water, temperature
- Procedural generation using multi-octave Perlin noise
- Dynamic resource diffusion and decay
2. Developmental Embryogeny (Phenotype)
- Growth from single zygote cell via iterative GRN evaluation
- Configurable development duration (10-200 timesteps)
- Cell differentiation, division, and programmed death
- Energy metabolism and structural integrity constraints
3. Genetic Encoding (Genotype)
- Variable-length genome supporting 0-100+ rules and components
- Explicit representation of chemical base (Carbon, Silicon, Plasma, etc.)
- Evolvable hyperparameters (mutation rate, innovation rate)
- Optional autotelic objective weights
4. Evolutionary Operators
- Tournament selection with configurable pressure (0.1-0.9)
- Mutation with dynamic rate modulation (cataclysm-induced hypermutation)
- Optional crossover and horizontal gene transfer
- Fossil record archive for phylogenetic analysis
5. Analytics & Visualization
- Real-time 3D fitness landscape rendering
- Multi-panel evolutionary dashboard with 9 synchronized metrics
- Genesis Chronicle: Automatic detection and logging of 7 classes of evolutionary events
- Elite lineage viewer with 16 distinct GRN visualization algorithms
- Custom analytics laboratory supporting 12 statistical plot types
Technology Stack
- Core Framework: Python 3.8+ with Streamlit for interactive UI
- Scientific Computing: NumPy, SciPy (entropy, clustering, optimization)
- Network Analysis: NetworkX (phylogenetic trees, GRN topology)
- Visualization: Plotly (interactive 3D plots), Matplotlib (network graphs)
- Data Persistence: TinyDB (JSON-based document store)
Performance Characteristics
- Simulates 50-200 organisms per generation
- Typical runtime: 1-5 seconds per generation (50-cell organisms, 50 development steps)
- Scales to 1000+ generations without memory overflow
- Checkpoint system enables pause/resume of multi-hour experiments
For first-time users, the recommended approach is:
- Accept Default Settings: The system ships with balanced parameters suitable for initial exploration
- Run for 200 Generations: Sufficient to observe initial adaptation and speciation
- Examine the Dashboard: Focus on the "Kingdom Dominance" chart to assess diversity
- Inspect Elite Organisms: Use the Specimen Viewer to see evolved body plans
- Read the Genesis Chronicle: Review key evolutionary events and innovations
The primary challenge in artificial life research is premature convergence to simple, "good enough" solutions. To achieve complex, surprising organisms:
Critical Parameter Adjustments
- Complexity Pressure (
w_complexity_pressure): Increase from 0.0 to 0.2-0.3 to directly reward genomic and morphological complexity - Development Steps (
development_steps): Increase from 50 to 100-150 to allow complex embryogenies sufficient time to complete - Component Innovation Rate (
component_innovation_rate): Increase from 0.01 to 0.03-0.05 to accelerate invention of new building blocks
Enabling Diversity-Preserving Mechanisms
- Red Queen Co-evolution (
enable_red_queen): Forces an evolutionary arms race by introducing a parasite that targets dominant forms - Cataclysms (
enable_cataclysms): Periodic mass extinctions clear ecological niches, enabling adaptive radiation - Speciation (
enable_speciation): Protects nascent innovations from competition with optimized incumbents
Advanced: Meta-Evolution
- Physics Drift (
enable_physics_drift): Allows fundamental chemical properties to slowly mutate over eons - Autotelic Objectives (
enable_objective_evolution): Permits organisms to evolve their own fitness goals - Hyperparameter Evolution (
enable_hyperparameter_evolution): Enables mutation rates themselves to adapt
Protocol 1: Baseline Evolutionary Dynamics
- Purpose: Characterize basic system behavior
- Settings: All defaults, 500 generations
- Metrics: Mean fitness trajectory, kingdom succession events, final complexity distribution
Protocol 2: Complexity Emergence Under Pressure
- Purpose: Test capacity for open-ended innovation
- Settings:
w_complexity_pressure=0.3,development_steps=150,component_innovation_rate=0.05 - Observe: Segmentation emergence, specialized tissue types, GRN sophistication
Protocol 3: Red Queen Dynamics
- Purpose: Study host-parasite co-evolution
- Settings:
enable_red_queen=True,red_queen_virulence=0.2, 1000 generations - Metrics: Cycling dominance patterns, innovation rate correlation with virulence
Protocol 4: Multi-Level Selection
- Purpose: Investigate major evolutionary transitions
- Settings:
enable_multi_level_selection=True,colony_size=15,group_fitness_weight=0.4 - Observe: Colonial emergence events, caste specialization, altruistic component evolution
Across extensive experimental runs, the following phenomena have been consistently observed:
When complexity pressure is enabled, populations transition through discrete phases:
- Generation 0-100: Simple 5-15 cell "blob" organisms with minimal differentiation
- Generation 100-300: Emergence of segmentation, bilateral symmetry, and specialized organ-like structures
- Generation 300-500+: Highly complex organisms with 50-100+ cells, hierarchical tissue organization, and sophisticated developmental programs
Red Queen dynamics reliably trigger rapid diversification events reminiscent of the biological Cambrian explosion:
- Initial dominance by a single kingdom (e.g., 90% Carbon-based life)
- Parasite adaptation targeting the dominant form
- Sudden collapse of dominant lineage and rapid radiation of minority kingdoms
- Stabilization into a diverse multi-kingdom ecosystem (40% Carbon, 30% Silicon, 20% Plasma, 10% other)
Advanced GRNs evolve hierarchical control architectures:
- Genetic Switches: Rules that enable/disable other rules, creating developmental stages
- Oscillators: Timer-based pulsed growth producing segmented body plans
- Morphogenetic Fields: Signal-based pattern formation creating layered structures (core, mantle, shell)
- Homeostatic Circuits: Feedback loops maintaining energy balance and structural integrity
When objective evolution is enabled, lineages diverge into distinct "philosophies":
- Efficiency Maximizers: Evolve to prioritize
w_efficiency, producing small, metabolically efficient forms - Complexity Seekers: Shift weight to
w_complexity_pressure, generating baroque, ornamental structures with no survival advantage - Reproductive Strategists: Emphasize
w_reproduction, creating fast-growing, short-lived r-selected organisms
The system has demonstrated spontaneous invention of:
- 15+ novel sensory modalities (e.g.,
sense_energy_gradient_N,sense_neighbor_type_diversity) - 30+ hybrid chemical bases (e.g.,
Psionic-Carbon-Core,Quantum-Metallic-Lattice) - Emergent genetic operators (timer-based sequential logic, signal-based communication)
def evaluate_fitness(genotype, grid, settings):
# 1. Developmental Phase: Grow organism from zygote
organism = Phenotype(genotype, grid, settings)
if not organism.is_alive:
return 0.0
# 2. Lifetime Simulation: Run metabolism for N ticks
for tick in range(settings['max_organism_lifespan']):
organism.run_timestep()
if not organism.is_alive:
break
# 3. Multi-Objective Fitness Calculation
energy_efficiency = organism.total_energy_production / (organism.total_energy_consumption + 1e-6)
lifespan_score = organism.lifespan / settings['max_organism_lifespan']
reproduction_bonus = organism.total_energy / settings['reproduction_energy_threshold']
complexity_score = genotype.compute_complexity() * settings['w_complexity_pressure']
# 4. Weighted Aggregation
fitness = (
lifespan_score * settings['w_lifespan'] +
energy_efficiency * settings['w_efficiency'] +
reproduction_bonus * settings['w_reproduction'] +
complexity_score
)
return max(1e-6, fitness)def develop(self):
for step in range(max_development_steps):
# 1. Signal Diffusion: Calculate morphogen gradients
signal_snapshot = {}
for (x,y), cell in self.cells.items():
signal_snapshot[(x,y)] = cell.state_vector.get('signals_out', {})
for (x,y), cell in self.cells.items():
neighbors = self.grid.get_neighbors(x, y)
incoming_signals = {}
for neighbor in neighbors:
if (neighbor.x, neighbor.y) in signal_snapshot:
for signal_name, value in signal_snapshot[(neighbor.x, neighbor.y)].items():
incoming_signals.setdefault(signal_name, []).append(value)
cell.state_vector['signals_in'] = {k: np.mean(v) for k,v in incoming_signals.items()}
# 2. GRN Evaluation: Test all rules against all cells
actions_to_execute = []
for (x,y), cell in self.cells.items():
context = build_context(cell, self.grid.get_cell(x,y), neighbors)
for rule in self.genotype.rule_genes:
if check_conditions(rule, context, cell):
actions_to_execute.append((rule, cell))
# 3. Action Execution: Grow, differentiate, signal, etc.
actions_to_execute.sort(key=lambda x: x[0].priority, reverse=True)
for rule, cell in actions_to_execute:
execute_action(rule, cell, new_cells)
# 4. Timer Updates: Decrement internal clocks
for cell in self.cells.values():
if 'timers' in cell.state_vector:
for timer_name in list(cell.state_vector['timers'].keys()):
cell.state_vector['timers'][timer_name] -= 1def innovate_component(genotype, settings):
# 1. Select Chemical Base from Registry
allowed_bases = settings['chemical_bases']
base_name = random.choice(allowed_bases)
base_template = CHEMICAL_BASES_REGISTRY[base_name]
# 2. Generate Unique Name
prefix = random.choice(['Proto', 'Hyper', 'Neuro', 'Xeno', 'Meta', 'Quantum'])
suffix = random.choice(['Polymer', 'Matrix', 'Core', 'Processor', 'Lattice'])
new_name = f"{prefix}-{base_name}-{suffix}_{random.randint(0,999)}"
# 3. Sample Properties from Base Template
new_component = ComponentGene(name=new_name, base_kingdom=base_name)
new_component.mass = random.uniform(*base_template['mass_range'])
new_component.structural = random.uniform(0.1, 0.5) * base_template['structural_mult'][0]
# 4. Bias Specialized Functions by Chemical Base
for prop in ['photosynthesis', 'chemosynthesis', 'compute', 'armor']:
bias = base_template.get(f"{prop}_bias", 0.0)
if random.random() < abs(bias) + 0.05:
value = np.clip(random.uniform(0.5, 1.5) + bias, 0, 5.0)
setattr(new_component, prop, value)
return new_componentThe system implements a sophisticated event logging system that automatically detects and records seven classes of evolutionary milestones:
- Genesis Events: First emergence of each chemical kingdom (e.g., "Genesis of Silicon Life")
- Succession Events: Major ecological shifts where one kingdom displaces another
- Complexity Leaps: Organisms crossing thresholds of 10, 25, 50, 100, 200, 500 genomic complexity units
- Component Innovations: Invention of novel cellular building blocks
- Sense Innovations: Evolution of new sensory modalities (meta-innovation)
- Major Transitions: Emergence of multicellularity, colonial life, intercellular communication
- Cognitive Leaps: Development of internal timers (memory), genetic switches (computation), autotelic objectives (philosophy)
Each event is logged with:
- Generation timestamp
- Detailed natural language description
- Causal lineage information (which dynasty invented what)
- Thematic icon for visual scanning
This automated historiography enables post-hoc analysis of evolutionary trajectories and identifies the specific mechanisms driving complexity increase.
The Specimen Viewer implements 16 distinct graph layout algorithms to visualize genetic regulatory networks, each revealing different structural properties:
- Spring Layout: Standard force simulation revealing natural clustering
- Kamada-Kawai: Path-distance proportional layout emphasizing symmetry
- Tight Spring (k=0.1): High repulsion exposing dense core structures
- Loose Spring (k=2.0): Low repulsion untangling long-range connections
- Settled Spring (200 iterations): Fully converged, stable configuration
- NEATO: Graphviz force model providing alternative optimization
- Circular: All nodes on circle, revealing cross-cutting edges
- Random: Null hypothesis control showing unstructured baseline
- Shell: Concentric circles for rank visualization
- Spiral: Sequential chain detection
- Planar: Tests mathematical planarity (no edge crossings)
- Dual-Shell: Custom logic separating genes from rules
- Graphviz DOT: Top-down flowchart exposing master regulators
- Graphviz TWOPI: Radial hierarchy showing influence propagation
- Graphviz NEATO: Alternative force-based layout
- Spring (Alternate Seed): Tests configuration stability via different initial conditions
This multi-perspective approach addresses the fundamental challenge of graph visualization: no single layout is optimal for all graph topologies. By providing 16 views, researchers can identify the most informative representation for each specific GRN.
Python 3.8+
pip install streamlit numpy pandas scipy networkx plotly tinydb# Clone repository
git clone https://github.com/devanik/univErze.git
cd univErze
# Launch application
streamlit run UnIvErZe.py
# Navigate to localhost:8501 in browser- Sidebar Configuration: All parameters are exposed in the left sidebar under collapsible sections
- Ignite Big Bang: Click the red "🚀 IGNITE BIG BANG" button to begin simulation
- Monitor Progress: Live metrics display mean fitness, diversity, and mutation rate
- View Results: Navigate tabs for Dashboard (macro trends), Specimen Viewer (phenotypes), Elite Analysis (genomes), Genesis Chronicle (event log)
- Download Checkpoint: Click "📥 Download All Results as .zip" to save complete universe state
The system supports pause/resume workflow:
- Run initial simulation (e.g., 200 generations)
- Download checkpoint file
- Close application
- Later: Upload checkpoint via sidebar
- Click "🧬 CONTINUE EVOLUTION" to extend simulation from saved state
Checkpoints preserve:
- Complete population genotypes
- Fossil record archive (up to 100,000 specimens)
- All historical metrics and event logs
- Current physics constants and evolved senses
- Grid resource state
- Spatial Constraints: Fixed 2D grid topology prevents evolution of truly 3D morphologies
- Physics Simplification: Energy metabolism uses linear approximation rather than thermodynamically accurate chemical kinetics
- Scalability: Single-threaded Python implementation limits population sizes to ~200 organisms
- Determinism: Random seed control does not guarantee reproducibility across Python versions due to floating-point variance
- Analysis Depth: Phylogenetic reconstruction is approximate; true cladistic analysis requires explicit parentage tracking
Near-Term (Next Release)
- GPU acceleration for fitness evaluation using PyTorch or JAX
- 3D rendering engine for volumetric morphologies
- Neural network-based fitness predictors to reduce computational cost
- Interactive GRN editor for hypothesis testing
Long-Term Research Directions
- Self-modifying code evolution (organisms that can rewrite their own developmental interpreter)
- Multi-scale physics (molecular, cellular, organismal, ecological)
- Embodied cognition via reinforcement learning controllers
- Open-ended social evolution (cooperation, communication, cultural transmission)
- Integration with large language models for natural language genome description
All experimental results are fully reproducible given:
- Specific Python version (tested on 3.8.10, 3.9.7, 3.10.4)
- Fixed random seed (set via sidebar parameter)
- Exact parameter configuration (exported in checkpoint file)
To reproduce published results:
- Download checkpoint file from repository
/resultsdirectory - Load checkpoint via sidebar interface
- Verify settings match publication
- Run simulation with matching generation count
The system automatically logs all parameter changes to enable audit trails.
Primary Developer: Devanik (GitHub)
AI Collaboration: This system was developed through an iterative human-AI partnership with Gemini AI (Google DeepMind), which contributed:
- Architectural design decisions based on academic literature
- Implementation of advanced algorithms (spectral GRN layout, Red Queen dynamics)
- Documentation and scientific framing
- Debugging and optimization strategies
Theoretical Foundations:
- Genetic Regulatory Networks: Artificial Embryogeny literature (Stanley & Miikkulainen, Eggenberger, Bongard)
- Multi-Level Selection: Price Equation framework (Hamilton, Wilson, Sober)
- Open-Ended Evolution: Novelty Search (Lehman & Stanley), MAP-Elites (Mouret & Clune)
- Artificial Life: Tierra (Ray), Avida (Ofria et al.), Geb (Channon)
If you use UnIvErZe in academic research, please cite:
@software{univErze2025,
author = {Devanik and {Gemini AI}},
title = {UnIvErZe: A Digital Petri Dish for Infinite Evolution},
year = {2024},
url = {https://github.com/devanik/univErze},
note = {Open-source artificial life simulation implementing genetic regulatory networks, developmental embryogeny, and meta-evolutionary dynamics}
}This project is released under the MIT License. See LICENSE file for details.
Project Status: Active Development | Last Updated: November 2025
For questions, bug reports, or collaboration inquiries, please open an issue on GitHub or contact the author directly.