The Primordial Particle System is a zero-intelligence particle model originally designed by the Artificial Life Lab Graz. Each particle follows three local rules based on its immediate neighbours. Together they produce complex lifelike behaviour: swarming, clustering, rotating rings, and chain-like structures that emerge from chaos.
No global Update rules, Every particle acts independently based on local information.
| Reproduction | Survival | Death |
|---|---|---|
![]() |
![]() |
![]() |
| Self-Replicating | Self-Sustaining | 1M+ particles, real-time |
| moving as one body | with no central logic | running on a single machine |
- 1,000,000+ particles running in real-time (10,000,000 at 10fps)
- Multithreaded update loop with a custom thread pool
- Spatial hash grid for O(1) average-case neighbour lookup
- Live parameter tuning — adjust α, β, and speed mid-simulation
- Colourised by local density — sparse particles are dim, dense clusters glow
- SFML rendering with batched draw calls for minimal GPU overhead
- Configurable via TOML — no recompiling to tweak settings
Each particle has a position and a heading angle φ. Every tick:
N = number of neighbours within radius r
R = neighbours to the right
L = neighbours to the left
φ += α + β × N × sign(R - L)
α and β are the only two parameters. Everything you see in the simulation is a result of these four lines.
| Particle Count | Resolution | FPS (avg) | Hardware |
|---|---|---|---|
| 100,000 | 1920×1080 | ~60 | i5 / GTX 1060 |
| 500,000 | 1920×1080 | ~70 | i7 / RTX 4080 |
| 1,000,000+ | 1920×1080 | ~90 | i9 / RTX 5060 |
Key optimisations:
- Spatial hashing replaces O(n²) neighbour search with near-O(1) grid lookups
- Half-grid traversal eliminates redundant symmetric pair checks
- Thread pool distributes particle updates across all available cores
- Batched SFML rendering — all particles drawn in a single
VertexArraypass
git clone https://github.com/curtis-aln/Primordial-Particle-System.git
cd Primordial-Particle-System
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Releasesudo apt install libsfml-dev
git clone https://github.com/curtis-aln/Primordial-Particle-System.git
cd Primordial-Particle-System
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build buildNote: SFML must be installed and findable by CMake. On Windows, set
SFML_DIRin your CMake config to the SFML install path if it isn't auto-detected.
| Key / Input | Action |
|---|---|
Space |
Pause / Resume |
R |
Reset simulation |
Scroll |
Zoom in / out |
Middle Mouse |
Pan camera |
+ / - |
Increase / decrease particle count |
F |
Toggle FPS display |
Settings are loaded from settings.toml in the project root. Key parameters:
[simulation]
particle_count = 100000
radius = 5.0
alpha = 180.0 # degrees
beta = 17.0 # degrees
speed = 0.67
[rendering]
window_width = 1920
window_height = 1080
target_fps = 60- Primordial Particle System — original model by Artificial Life Lab Graz
- Paper: "How a life-like system emerges from a simple particle motion law" — Schmickl et al.
- Built with SFML and toml++
Distributed under the MIT License. See LICENSE for details.



