bismuth · packages/bismuth/phase.mjs · seed 48112 · deterministic
Masons and Worms
What one producer and one consumer do to a crystal, measured. The masons carry bricks from the melt to the crystal; the worms carry them out, or, with recycling, back. A budget, a lay rate, a bite rate: three numbers, and the fates they buy.
The masons are a rate, not a front. One mason or sixteen lay the same crystal with the same terraces; sixteen lay it seventeen times faster. Fronts are the terrace rule's; masons are flux.
Without recycling every worm wins eventually. The budget is a finite potential and the worms are a constant drain; the crystal's life is budget ÷ pressure. With recycling the melt is a closed pool and the crystal becomes a living steady state: a thousand bricks standing while twenty-five thousand pass through.
The crystal heals, but only at its edges. A worm's bite leaves a kink, and kinks fill first; up to half the wounds close. Bites in the middle of a face starve like everything else in the middle of a face: the Berg effect is the immune system's blind spot.
Across tilings the sink is a sink, and the diet is not. Every substrate reaches its budget, loses it without recycling, holds it with recycling, and heals a fifth to a third of its wounds. But "exposed" cuts a different slice of each crystal: a fifth of the bricks on cubes and hexagons, half on rhombs and kagome, so the same grazers bloom on the skeletal tilings, bloom slowly on the lattice, and churn on hexagons.
Worms that breed have two fates, and neither is a cycle. Below a threshold appetite they starve out; above it they bloom and eat the crystal to nothing, however slowly they start (a run that looked steady at 300k ticks hit a thousand worms by 700k). No cycles anywhere, because a worm inside a crystal always has a brick under it: its intake does not fall with the crystal's density until the crystal is nearly gone. Restricting worms to exposed bricks, so the surface bounds intake, buys long coexistence, 480k ticks on a capped crystal, that ends in the grazers' own extinction: eating edges smooths the crystal and removes their food.
What the two agents are
A mason moves one brick from the melt into the crystal, at a site the three laws allow: bonds set the rate (Kossel), the rim feeds and the face centre starves (Berg), the anisotropy weights the faces. A worm moves through bricks along the bond graph and, on leaving one, takes it with probability bite. Neither eats the other. The worm eats the product, the standing structure, not the producer, so it is not a predator of masons. It is a decomposer: a fungus in a log, a termite in a beam. With recycling on, the bricks it takes return to the melt as budget, and the pair is a nutrient cycle: producer, structure, decomposer, pool.
That is also why "first derivative" is right for the masons and wrong for the worms. The masons are d(crystal)/dt; the worms are a second flux on the same quantity, of opposite sign, with a different dependence on the crystal: masons lay where the terrace rule feeds (rims: roughly the crystal's edge length), worms bite wherever they stand (anywhere the crystal is). The potential is the budget, and it is exactly the terminal mass in the absence of worms: budget × (1 + coolExtra). The natural size scale you sense is that number; the shape at that size is the terrace rule's.
D · One mason or sixteen
The observation that thinning the colony to one mason did not change the number of growth fronts is correct, and it is the cleanest fact in the system. A mason lays a brick, returns to the melt, and arrives again along a straight ray from outside, striking a random corner or edge. One mason therefore samples every front in turn; sixteen sample them sixteen times as often. The set of fronts is the terrace rule's verdict on the shape, which does not know how many masons there are.
Fed sites: empty sites next to a brick that the terrace rule would feed, counted at 2,000 bricks. The count and the terrace count do not move with the colony; the time does, almost exactly in inverse proportion.
A · The sink
Three worms at speed 0.04 and a bite between 0 and 1: a drain of P = 3 × 0.04 × bite bricks a tick at most. Against one to sixteen masons, whose free-running lay rates measure 0.006, 0.018, 0.028, 0.061 and 0.103 bricks a tick. Budget 4,000, worms released once the crystal has 600 bricks.
A · the sink, recycling off — budget 4,000; worms released at 600 bricks; the number is the crystal's mass after 300k ticksA · the sink, recycling on — budget 4,000; worms released at 600 bricks; the number is the crystal's mass after 300k ticks
reached its budgetstill growing at 300ksteadyeroding, or grew then eatencollapsed
Two regimes, and the switch is recycling. Without it, every cell with any worms at all is on its way to zero: the masons stop when the budget is spent, and the drain does not. What looks like survival on the right of the top panel is a clock that has not run out (a budget of 4,000 against a drain of 0.012 needs 330k ticks). With recycling the same drain feeds the same masons, and the crystal settles at a mass where laying matches biting: 16 masons against P 0.12 hold about 900 bricks while 25,000 bricks pass through them in 300k ticks. That is the ouroboros, and it is a steady state, not perpetual motion: the engine still stops a colony after its cool-down, and the refund only reaches a colony that is still live.
The collapse boundary sits close to P ≈ lay rate, as it should, but the masons under attack lay well below their free rate. Eight masons free-running lay 0.06 a tick; the same eight against P 0.012 lay 0.018. The rest of their effort is the next section.
The crystal heals at its edges
A bite leaves a hole with four or five bonds around it, which is exactly the site the Kossel rule fills first. So the masons repair. The experiment counts a brick laid into a site a worm had emptied as a repair:
Between a tenth and a half of the wounds close, and repairs are a growing share of everything the masons lay as pressure rises. The half that never closes is the half the terrace rule will not feed: a hole in the middle of a face, or deep inside, where no arrival ray lands and no walk reaches. The Berg effect starves face centres of growth, and it starves them of repair too. A worm that grazes (depth −1) is healed; a worm that mines (depth +1) is not.
B · Released at mass M₀
Is there an Allee threshold: a mass below which a crystal cannot outgrow a given drain? With a constant drain and a lay rate that scales with the crystal's edge length, mean-field says yes, at M* ≈ (P/a)3/2. Eight masons, budget 20,000 so the cap is out of reach in the window, worms released at 100 to 1,600 bricks.
B · released at mass M₀ — 8 masons (capacity ≈ 0.06 a tick), budget 20,000, no recycling, 150k ticks
The threshold is there in the columns (the crystal survives P 0.006 and 0.012 at every M₀, and dies at 0.096 at most), but it is not monotone in M₀. A crystal released at 800 bricks outlived one released at 1,600 under the heaviest drain, because the 800-brick crystal healed at 0.07 a tick and the 1,600-brick one at 0.019. The difference is geometry: a bigger hopper has a bigger pit, more face, and more of its wounds where the terrace rule does not feed. So the potential is not a scalar. The crystal's shape, not just its mass, decides whether it can defend itself, and the hopper habit, which spends its mass on faces, is a bad shape to defend.
C · Worms that breed
Give the worms the two things a predator has, reproduction from eating (spawnAfter: split after that many bricks) and death from not eating (starve: fade after that many unfed moves), and ask the classical question: do the populations cycle?
The first attempt (four worms at speed 0.08, bite 0.2, splitting after 2 to 8 bricks) blooms in every cell: 400 worms in a few thousand ticks and a crystal eaten to nothing. Per-capita appetite 0.016 a tick against eight masons laying 0.06 means eight worms already exceed the producer. So the second grid uses small appetites (speed 0.04, bite 0.01 or 0.03) against producers with real capacity (16 or 32 masons), a closed melt (recycling on), and a budget of 30,000.
C2 · the chemostat — worms — appetite 0.0004 a tick each (speed 0.04 × bite 0.01), split after 15 bricks, fade after 400 unfed moves, recycling onC2 · the chemostat — crystal — the same two runs: the crystal's mass, bricksC2 · a bloom — appetite 0.0012 a tick each: the worms outrun the producer- 32 masons · bite 0.03 · fade after 150
- 16 masons · bite 0.03 · fade after 400
C2 · a bloom — crystal — the same runs: the crystal's mass- 32 masons · bite 0.03 · fade after 150
- 16 masons · bite 0.03 · fade after 400
C2 · the same worms, run on — worms — the chemostat cells run to the end: the population grows without a ceiling until the crystal is gone- 16 masons · fade after 400 (uncapped)
- 32 masons · fade after 400
- 16 masons · fade after 150
C2 · the same worms, run on — crystal — the same runs: the crystal's mass- 16 masons · fade after 400 (uncapped)
- 32 masons · fade after 400
- 16 masons · fade after 150
Two fates. Extinction when a worm cannot eat its split quota before it fades (bite 0.01, fade after 150: the four founders die having eaten 33 bricks between them, and the crystal grows on as if nothing happened). A bloom otherwise, fast or slow. The two cells the 300k-tick grid labelled "steady" (59 worms on 16 masons, 110 on 32) were slow blooms caught early: run on, the population keeps doubling every 60k ticks or so and the crystal turns over; the 16-mason run reaches a thousand worms at 700k ticks with the crystal eaten to nothing, no remnant, no second act. The producer's capacity sets how big the crystal gets before the bloom catches it, not whether it does.
C2 · the same worms, run on — worms — the chemostat cells run to the end: the population grows without a ceiling until the crystal is gone- 16 masons · fade after 400 (uncapped)
- 32 masons · fade after 400
- 16 masons · fade after 150
C2 · the same worms, run on — crystal — the same runs: the crystal's mass- 16 masons · fade after 400 (uncapped)
- 32 masons · fade after 400
- 16 masons · fade after 150
No cycles, in any cell, and no interior equilibrium, and the mechanism is plain once seen. A worm tunnelling inside a crystal has a brick under it at every step, so its intake per move is the bite probability, full stop, whatever the crystal's mass. Its numbers grow on a stock, not a flux, and nothing tells it to slow down until the stock is gone and it finds itself drifting on skin. That is overshoot, the Easter Island shape, not Lotka–Volterra. Lotka–Volterra needs the prey to reproduce in proportion to its own numbers and the predator's intake to fall with prey density; the crystal does neither. It is laid at a rate the masons set, and eaten at a rate the worms set.
C3 · Grazers: intake bounded by the surface
So give the worm a functional response: let it eat only exposed bricks, those with three bonds or fewer (exposed 3), and keep it near the surface (depth −1). Now its food is the crystal's surface, which grows more slowly than its mass and, on a capped crystal, stops growing.
C3 · grazers — worms — grazers: only bricks with three bonds or fewer are edible (exposed 3, depth −1); 16 masons, split after 15, fade after 400, recycling on- uncapped crystal · bite 0.05
- capped at 6,000 · bite 0.05
- capped at 3,000 · bite 0.05
- capped at 6,000 · bite 0.1
C3 · grazers — crystal — the same runs: the crystal's mass- uncapped crystal · bite 0.05
- capped at 6,000 · bite 0.05
- capped at 3,000 · bite 0.05
- capped at 6,000 · bite 0.1
On an uncapped crystal the grazers hold at six to sixteen for 700k ticks while the crystal grows to 13,000 bricks, then bloom and eat it, because the surface grew with the crystal until it could feed a bloom: the crystal grows itself into its own consumer. On a crystal capped at 6,000 the same grazers hold at four to twelve for 480k ticks, 35 born and 39 faded, and then die out with the crystal intact at 5,980 bricks. They ate the corners and edges, the masons healed what they could while the colony was live, and when it cooled the grazers were left smoothing a crystal that had fewer and fewer edges to give. A grazer erodes its own niche. On a crystal capped at 3,000 the surface-to-mass ratio is high enough that the same grazers win and the crystal collapses; at twice the bite, so does the 6,000 one.
That is the phase space of the breeding worm, then: extinction, bloom, and, for a consumer that can only eat what the geometry exposes, a long coexistence that ends one way or the other. Long relative to everything else in the system (the crystal's whole growth takes 60k ticks), but not a fixed point. Cycles would need one more thing this system lacks: a prey that breeds. The colony's birthEvery can give the masons that; nothing yet lets a worm eat a mason.
T · Across tilings
The lattice is the substrate, not the brain, and the substrate is a bond graph. On the cubic lattice a brick has six face-neighbours; on a prism over a tiling it has its tile's edge-neighbours plus the layer above and below: eight on hexagons, six on Penrose or Ammann rhombs, five on kagome's triangles and eight on its hexagons. That changes the mason's walk, the Kossel rates (a kink on hexagons is a deeper hole), what a worm can reach, what heals, and what "exposed" means. So the same experiments, per substrate: the free lay rate, the fronts for one mason and eight, the sink at two pressures with and without recycling, and grazers on a capped crystal.
Edible surface: the fraction of bricks with three bonds or fewer at 1,500 bricks, which is what a grazer with exposed 3 can eat. The bond count is the substrate's, so the same threshold cuts a different slice of each crystal.
T · the sink across tilings — 8 masons, budget 3,000, worms released at 500 bricks, 200k ticks; the number is the crystal's mass at the end
T · grazers across tilings — worms — 8 masons, budget 3,000, released at 800; only bricks with three bonds or fewer are edible; split after 15, fade after 400, recycling on- square grid
- hexagons
- Penrose P3
- kagome
- Ammann–Beenker
T · grazers across tilings — crystal — the same runs: the crystal's mass- square grid
- hexagons
- Penrose P3
- kagome
- Ammann–Beenker
Three things move with the substrate and one does not. The lay rate halves off the lattice (0.022 a tick on cubes against 0.011 to 0.019 on prisms at the same budget and colony): a prism brick has more neighbours to satisfy before the terrace rule feeds it. The single mason's handicap grows with coordination: one mason is eight times slower than eight on the lattice and thirteen times slower on hexagons, because on an eight-bond substrate nucleation is the whole bottleneck and one mason waits at every front in turn. The healing fraction is highest on hexagons (30% of wounds closed, against 20% on the lattice): a bite in an eight-bond wall leaves a deeper kink, which fills faster. The sink does not move. At the same pressures every substrate reaches its budget and then loses two thirds of it without recycling, collapses at three times the pressure, and holds with recycling. The drain is a drain whatever the geometry.
The grazers are where the substrate speaks. "Three bonds or fewer" is 20% of the bricks on the lattice and on hexagons, and half of them on Penrose, Ammann–Beenker and kagome, whose crystals are skeletal, all rhomb tips and triangle corners. Where half the crystal is edible the grazers are not surface-limited at all, and they bloom and eat it inside 400k ticks with nobody fading. On the lattice they bloom too, slower. On hexagons, the one substrate where the edible tips are scarce and the walls heal fast, the population churns instead, 858 born and 757 faded, holding near a hundred while the crystal holds near two thousand. A functional response is a property of the diet and the geometry together, and hexagons are the only tiling here on which "exposed" means what it meant on cubes.
Where this sits
The nearest relatives are not Life-like automata but the growth models: the Eden model and diffusion-limited aggregation for the masons (an Eden cluster with a Berg rule is close to what a hopper is), and etching or corrosion models for the worms. Growth plus a constant sink is harvested logistic growth, which has the Allee-like collapse seen in A and B. Growth plus a consumer that breeds on a stock is overshoot; a consumer whose intake is bounded by the surface is a consumer–resource system with a functional response, which here gives long transients rather than a fixed point; a consumer that breeds and a producer that breeds is where the oscillations live. In the language of the lab: the masons' colony has birthEvery and retireAfter, so the producer can be made to breed today; the missing law is worms that eat masons.
Next experiments, if these were the first
- Shape as potential. Repeat B across habits (hopper, plate, tower, staircase) at equal mass. The prediction from the healing result is that towers defend themselves and plates do not.
- Miners. The same drain with
depth +1: they should hollow the crystal into a shell that fails all at once, a different collapse from the grazers' smoothing.
- The grazers' fixed point. A budget the masons never finish (a colony that never cools) with
exposed 3: healing then never stops, and the grazers might hold. The engine can do this today with a budget beyond the window.
- The producer breeds.
birthEvery on the masons with recycling and breeding worms: the first place cycles could appear without a new agent.
- Tilings. The bond graph differs: kagome triangles have three edge-neighbours, Penrose rhombs four, hexagons six. The worm's random walk and the healing rule both change with coordination number; the chemostat ratio should not.
Everything here is node packages/bismuth/phase.mjs against the engine at the commit that shipped it, seed 48112. The runs are deterministic; the tables and figures regenerate from the JSON with phase-report.mjs. Ticks are engine ticks; a tick is every mason and every worm moving once.