Getting started — what it’s all about — and your first sixty seconds
What is Stochasm?
Stochasm is an interactive statistical-physics laboratory that runs in your browser — an exploratory scientific tool and a platform for creating digital art, all at once. Design a system — a lattice of coloured sites with rules for how they transform and move, a ferromagnet, a particle in a potential, or self-assembling patchy discs — and watch it evolve live under a genuine Monte Carlo or molecular-dynamics simulation. The outcome is never fully predictable — that's the physics — yet it is always shaped by what you design. Randomness on a leash.
Under the hood, each model's physics is a research-grade kernel compiled from C to WebAssembly, so what you see is not a toy approximation: it is the real model, running at native speed on your own machine — including across all your CPU cores when you simulate thousands of systems at once.
- One system — paint, tune rules live, and watch a single lattice evolve.
- An ensemble — launch thousands of independent replicas and watch the whole population drift through phase space as a cloud of points.
- Machine learning — let the app cluster your ensemble by its measured observables and draw the community structure as a live graph.
For a sense of where this can go artistically, browse the Gallery — every piece there is a Stochasm simulation.
Quick start
Sixty seconds to your first simulation:
- Pick a model in the launcher — start with Multi-Component Lattice.
- Pick a mode — Single system to watch one lattice up close.
- Under Setup, leave Preset selected and choose one from the list — Fredrickson–Andersen (FA) is a classic. A live preview appears on the stage, and the Next bar slides up into the card.
- Press Next — the preview slides left and the Builder card arrives: lattice size, the site types, the rules. The defaults are fine for now.
- Press the green Initialize button at the bottom of the Builder card.
- Press Play (top right). The lattice comes alive.

Now explore: click and drag on the lattice to paint sites by hand (pick the type in the Interaction & Paint window — the brush icon next to the view selector). The Controls panel's Simulation tab tunes rates, temperature and fields live; to change the system's structure — types, rules, sizes — press Back to Builder in the header, refine, and Initialize again. When you want a different system entirely, Start Fresh returns you to the launcher.
The header bar
Everything global lives in the strip along the top — some controls are compact icons, so hover any you don’t recognise for its name:
| Control | What it does |
|---|---|
| Model name | What you're running, next to the logo. Before launch it reads START. |
| View selector | Switches between the views the current model + mode offers (e.g. Lattice, Observables, Ensemble, Graph). |
| View Settings (eye icon) | Opens the floating display window for the active view: colours, trails, glow, phase axes, and smart zoom. It stays open until you close it, follows view switches, and can be dragged anywhere by its title bar. |
| Interaction & Paint (brush icon) | Opens the floating tools window for the active view: the paint brushes (lattice sites, patchy stir/spawn) and, in the Ensemble view, the Pan/Zoom tool. Same window behaviour — persistent, draggable, follows view switches. |
| Full screen (expand icon) | Puts the render viewport into true full screen, centred on your display — painting and every floating window keep working (open the windows you want first; they ride along, while the header itself stays outside). The control panel hides itself: push your mouse to the right edge of the screen to slide it in, and it slides back out when you move away from it. In single-system lattice views the periodic images tile the whole screen — a live torus wallpaper — and painting on any copy wraps onto the lattice. The usual grey tips are hidden in full screen (warnings still show). Two bright cyan notes appear on entry: Esc exits, and the Space bar plays/pauses — the Space hint flashes again each time you pause, so you always know how to resume when the Play button is tucked away. |
| Statistics / Sampler (bars icon) | Opens the floating Statistics window (single mode) or the per-system Sampler (ensembles) — see Observables and the Sampler. |
| Controls | Slides the control panel in and out. Floating windows glide out of its way. |
| Start Fresh (home icon) | Ends the run and returns to the Launcher, preserving your launch configuration for editing. In the Builder the same retreat is a separate Back to setup pill in the top-left corner of the stage — a plain return to the Launcher, discarding nothing. |
| Back to Builder | Only while a simulation runs. Discards the running system and returns to the Builder to change its structure — types, rules, sizes — then Initialize again. Your design is kept; the running system is thrown away. |
| Reset Simulation | In single mode the button resets directly: the system re-seeds while keeping every control setting (for the lattice models this is a lattice re-seed only — your types, rules, and sliders stay put). The seed follows the Builder’s choice — if the run was launched from an imported snapshot (the use-snapshot checkbox in the Builder’s System section), Reset returns to that exact stored state; otherwise it seeds randomly following the default site-type percentages. In ensemble mode the button opens a small menu: an Ensemble section (re-seed every replica — back to the imported snapshot or to random initial states, mirroring how the ensemble was launched) and a Learning section (wipe the cluster graph — communities, reservoir, learned features — while the ensemble keeps running). |
| Play / Pause | Runs and pauses the simulation — the button, or the Space bar anywhere (except while typing in a field). Briefly disabled at ensemble launch while thousands of initial states are being computed. |
| User Guide / ? | Opens this guide. On the launcher it's a labelled User Guide button; once a simulation is running it shrinks to a compact ? to keep the header tidy. |
