petri-labs

Interactive research platform for emergent systems. Each playground lets you explore a different domain of emergence through real-time simulation and statistically-tested hypothesis labs.

origin

live

Artificial life. Neural-network organisms evolve vision, movement, predation, and speciation from random brains.

evolution neural networks speciation rust/wasm

swarm

live

Collective intelligence from local rules. Flocking, splitting, and predator evasion emerge from three weighted forces.

flocking boids webgl

morph

live

Reaction-diffusion and pattern formation. Spots, stripes, and spirals emerge from uniform conditions.

turing patterns reaction-diffusion webgl

market

live

Emergent economics from trading agents. Price, bubbles, and crashes from the order book up.

trading agents order book volatility

social

live

Opinion dynamics on networks. Polarization, echo chambers, and consensus emerge from local interactions.

networks polarization information cascades

What is petri-labs?

petri-labs is a collection of interactive simulations of emergent systems — worlds where complex, lifelike behavior arises from simple local rules rather than being programmed in. Each playground takes a different domain: artificial life and evolution in origin, collective motion in swarm, reaction-diffusion pattern formation in morph, price dynamics in market, and opinion dynamics in social.

Every simulation is real-time and runs entirely in your browser — no server, no install, no account. You can perturb parameters live, inspect individual agents, and watch how small changes cascade into different outcomes. origin runs a Rust core compiled to WebAssembly for near-native speed; the others use WebGL where the rendering demands it.

The Hypothesis Lab

The differentiator. Every playground supports statistically-tested experiments: state a hypothesis in plain language, and the lab designs a control/treatment comparison, runs replicate trials headless at max speed, and reports Wilcoxon signed-rank tests, Holm-Bonferroni correction, and Cliff's delta effect sizes. Results are measured, not anecdotal — petri-labs is meant to be an instrument, not a toy.

For agents (MCP)

The same experiment engine, exposed to AI agents over the Model Context Protocol. An agent connects, calls describe_model, then runs run_experiment on a control-vs-treatment contrast and gets back the same statistical report the in-browser Lab produces — replicated, with effect sizes and p-values, deterministically. No account, no browser.

Add it to any MCP client (Claude Desktop / Code, Cursor, and others):

{
  "mcpServers": {
    "petri-labs": { "command": "npx", "args": ["-y", "petri-labs-mcp"] }
  }
}

Published as petri-labs-mcp on npm; source.