Enter loads · ↓ lists the programs · space plays · ← → a clock, with shift a rewrite · R restarts · V view · G GPU · D details · F fit
Drag to pan, wheel to zoom. Click a site to see what is in it. shift+click an agent to read what it computes, as disp, in the details (hold shift to preview); Esc lets go.
Step. An agent moves to a neighbouring site. The strand it walks along is eaten; its other wires are dragged one strand longer. Wanted readers mostly step along their principal wire, toward what they need. After a clock stepped by hand, a faint arrow marks each agent that moved in it (the moves toggle).
Fold and flip. A wire that goes out and straight back snaps shut; a corner can flip to the other side of its square. Together they let wires straighten like strings under tension.
Exchange. In a full site, an agent may trade places with a resident, so walkers get through crowds.
Rewrite. When a wanted reader and the value it reads meet (same site, or one strand apart), the rule fires inside a 2×2 block: fresh agents take the free seats and are wired with fresh strands. A rewrite flashes a ring for about four clocks of the run as shown, at most 0.6 s, and the more fire at once the fainter each is.
Demand. Nothing reacts until wanted. A wanted reader sends a pulse (white dot) along its principal wire, one strand per clock; when it reaches another computation's output, that computation is wanted too, and when it reaches the value the reader needs, that value is called (orange ring): it counts as wanted, and walks along its wire toward its reader. A pulse whose strand gets moved is dropped, and the reader sends another.
Demand field. Every site, empty or not, keeps a number from 0 to 3 (amber tint): 3 where a wanted reader or a pulse is, falling by one a site and a clock. Idle matter pays to climb it, and so does wire it lays down, so it gets out of the way along the reader's wire and around both of its ends; a called value is drawn up it, toward its reader.
Fork. Demand alone runs one computation at a time, each waiting on the next like a call stack. The S rule is where a program forks: △(△s) b c becomes (s c)(b c), sharing c between two computations. Both halves start wanted, so (b c) runs alongside (s c) rather than after it, and several reactions run at once. When (s c) turns out to throw (b c) away, erasers collect it and what it did is lost.
Tension. At temperature 1.5 a loose wire gains more from wiggling than it loses to its tension, so over long runs it swells until no lane is free. A site whose switchboard holds p pairings costs p²/4, so wire stays loose in open space but cannot crowd every lane around a reaction.
Density. Wires pull matter together until, left alone, three quarters of occupied sites are full, and wanted readers and rewrites stall against full sites. Two idle agents (anything but a wanted reader) sharing a site cost energy, so idle matter spreads out to about one agent per site and keeps a seat free for traffic, while wanted readers pass through.
Garbage. Agents the answer no longer depends on are drawn dimmed. An eraser that touches a computation's output collects it: a duplicator becomes a plain wire from its input to its other output; a dead apply becomes erasers on its inputs; an unpair with both parts erased becomes one eraser on the pair. Once the answer is in, the machine keeps running until only the answer is left. Then it cools: the temperature drops to 0.05, every site takes a move that lowers the energy if it has one, idle agents trade places rather than crowd, and a corner turn that leaves a U-turn snaps it in the same move, so the wire straightens and the answer contracts as far as it will go.
Going back. Every move is a hash of its site and its clock, so a run repeats exactly from any state of it. The run is saved at some clocks, densely near the clock on show and more sparsely away from it, in at most 64 MB; going to a clock puts back the nearest saved state before it and runs on. The faint ticks on the time bar are the saved states.
Clocks. Every clock the lattice is cut into disjoint 2×2×2 blocks at a random offset, and in each block every site takes a turn, a site with a wanted reader or a called value spending half of its on it: what a synchronous chip does, with no move ever reaching outside its block.
Views. Layers stacked draws every layer of the 3D lattice offset over the others: compact, but layers overlap. Layers side by side gives each layer its own panel: exact, and every site is easy to click. 3D shows the lattice as it is, each layer over a faint labelled floor and each wire one path in the colour of its segment: drag to orbit, right-drag to pan, the wheel zooms toward the pointer, F fits the whole net; spread the layers apart (and further, every site too), show one layer at a time, or follow the action. Graph leaves the lattice out: each agent is a node and each wire a line, laid out by springs along wires, a push between nodes that crowd, and a pull that hangs what feeds an input below its reader, so the term reads as a tree from the root down. Nodes keep their places as the run plays, and a gold wire with a spark joins two agents about to rewrite. Since only rewrites change it, a step there is one rewrite.
Shapes. An agent's shape says what kind it is, so its colour is free to say where it is in the term. Values are triangles △, with a dark hole for each child (a stem one, a fork two); applications are disks, a suspended one hollow; choices are diamonds, triage whole and its second dispatch split in two; the arms of a choice travel as a pill, which an unpair splits in two; a duplicator is a Y, an eraser a ×, a normalizer a hexagon and the root a ring around a dot. The dot with a white rim is the principal port, where an agent interacts: on top in the lattice views, and in the graph view toward its wire, a value, pair, unpair or duplicator turning to point its tip there. In 3D the same families are solids: pyramids (a knob under one for each child), balls, a ring, octahedra, a capsule, a Y, a ×, a hexagonal nut. Small on screen, holes go first, then shapes become squares.
Segments. The term the root computes is a tree of applications. With segments on, an application's function and each of its arguments get colours of their own, and an application nested inside one of them splits that colour again, so each part of the term shows as a region of the net. Hues go to the parts by how many applications each holds, so nested parts take hues near the part around them; lightness alternates with how deep a part is nested. A value (code or data) is one segment, however big, and stays grey, only tinted toward its part's hue: the colour is on applications and the agents that carry them out. With something picked, the segments are the pick's, and its term in the details is tinted the same way.
Reduction state. Every output of the net means a term: a value is a tree, a suspension or an apply is an application f x, a triage on a with arms b, c is t a b c, and a duplicator's two copies are one value, shared. Shift+click an agent to pick the computation it heads, that is, it and every agent feeding its inputs. Its term is written as disp, with numbers, lists and strings as literals, code that is a known definition by its name, other code as ‹its size›, shared computations as x₁ in a where, and what is being computed underlined in blue. Picks follow their agents as they move and rewrite; one whose value is used up by a rewrite drops out.