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 patchy discs and bead-spring polymers) 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 arrives at Step 1 of 2: lattice size and the site types. The defaults are fine for now.
- Press Next again for Step 2: the rules. Then press the green Initialize button at the bottom of the 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 either Resume Simulation to pick the held run back up or Re-Initialize to re-seed it from the refined design. 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, Particles, Observables, Ensemble, Graph, and Split, which shows two of them side by side). |
| 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 spawn/delete) and, in the Ensemble view, the Pan/Zoom tool. Same window behaviour: persistent, draggable, follows view switches. Greyed out (not hidden) when the active view has no tools. |
| 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 round Setup button in the top-left corner of the stage: a plain return to the Launcher. (From a Builder holding a paused run, it discards that run; Resume Simulation and Re-Initialize are the keep-it paths.) |
| Back to Builder | Only while a simulation runs. Pauses and holds the running system while you visit the Builder, landing on Step 2 (rules). Two buttons replace Initialize there: Resume Simulation (green) returns to the held run exactly as you left it, and Re-Initialize (red) acts like Reset Simulation: every system re-seeds from the current design (in ensembles the learning layer resets too) while your controls, views, and windows all stay put. Rules and dynamics edits made while the run is held ride along with Resume (they apply live); the species design itself can only change through Back, which discards the run. The Back button on the row below discards the held run entirely and re-opens Step 1 fresh; the amber note above it warns first. |
| 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 it does the same for every replica, and also clears the cluster graph — a re-seeded ensemble makes the learned graph describe systems that no longer exist. (To wipe only the learning and leave the ensemble running, use Reset learning in the Machine Learning tab.) |
| 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. |
