Primordial is a continuous-space ecosystem simulator running on WebGL with an integrated AI research partner. Every colored dot on screen is a living organism with position, velocity, energy, age, a species identity, and four genetic traits that mutate across generations. No behavior is scripted. Territories, migration patterns, population cycles, predator-prey dynamics, and evolutionary adaptation all emerge naturally from five simple behavioral drives and the physics of survival.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jkh2/Primordial-Sim/llms.txt
Use this file to discover all available pages before exploring further.
Quick Start
Launch Primordial and explore your first ecosystem in minutes
Controls
Master keyboard shortcuts, mouse interactions, and the UI panels
Ecosystem Mechanics
Understand how organisms eat, hunt, flock, and survive
Genetic Evolution
Learn how heritable traits mutate and drive natural selection
AI Lab Partner
Connect an AI to observe, experiment, and write research reports
Scenario Presets
Six tuned scenarios from peaceful aquarium to extinction event
What Primordial simulates
Organisms consume food pellets scattered across the map. Energy drives growth — size equals the square root of energy, so bigger organisms need proportionally more food to sustain themselves. When an organism of one species is sufficiently larger than another, it eats the smaller one. Every organism carries four heritable genes:| Gene | Effect |
|---|---|
| Speed | Movement multiplier |
| Aggression | Hunt drive intensity |
| Efficiency | Metabolic cost reduction |
| Perception | Sight range for food and threats |
Architecture highlights
Primordial is a single self-contained HTML file with no dependencies, no build step, and no backend.- WebGL rendering — organisms and food drawn as point sprites with per-particle hue, alpha, and size pushed to the GPU every frame
- Structure of Arrays (SoA) — parallel typed arrays for position, velocity, size, energy, species, age, genes, and alive-state supporting up to 60,000 entities
- Spatial hash grid — 40px cells with 64 entities per cell turns O(n²) neighbor scanning into O(1) per organism
- Multi-provider AI — unified adapter for OpenAI, Anthropic, xAI, and any OpenAI-compatible local endpoint