Abstract
We describe a single procedural-generation pattern — seeded determinism met by a model acting as its own oracle — and two instruments built on it. The first, biome/gacha, rolls a closed ecosystem from a deck of real organisms and lets a trophic + stability solver score its viability; rarity is the solver's verdict, not a random tier. The second, hoop/econ, transposes the pattern from ecology to society: a social genome breeds a town, a vitality oracle scores its fabric, and — run over the real 3-D chamber foam of an O'Neill cylinder — the town's streets are not drawn but grown. The growth law is the contribution we think travels furthest: the stationary flux of inhabitants' trips is the Laplace transform of their motion, and roads are its superlevel set. The same equation produces the street network, its hierarchy, every building's door, and the ambient foot-traffic — one solve, four artefacts. Because travel in spin gravity is anisotropic (level is cheap, climbing is dear), vertical circulation concentrates onto a few reinforced threads with no designer's hand: the ramp emerges, threading 98–99 % of the shell's depth from demand alone, with access indistinguishable from an engineered corkscrew.
This report is a description of a tool, not a finished system. It states what the hammer is, shows what it has struck so far, and charts where the next blows land. Everything here is live and re-derivable; the figures are screenshots of running code.
1The pattern: a model is a better oracle than a die
Most procedural generators roll content and then roll quality — a separate rarity table decides whether a thing is Common or Legendary. That second roll is a lie the designer tells: it asserts value the artefact has not earned. The pattern here removes the second die. A seed deterministically fixes the artefact; then the same model the artefact is made of is run forward and scores it. Rarity, viability, vitality — whatever the axis — is read off the simulation. A Legendary ecosystem is one that actually closes its loops and shrugs off shocks; a Thriving town is one whose social fabric actually holds when you pull a hub.
This is the lineage the repo already runs in its /fable and /mappa generators; biome/gacha was the first to make the oracle a physics solver rather than a heuristic. The discipline it imposes is total: you cannot fake a good roll, because the only judge is conservation of carbon and the eigenvalues of the community matrix.
2biome/gacha: viability as rarity
The deck is ~60 real organisms, each a stat block (guild, body mass, thermy, habitat, growth or per-guild biomass, flags). rollDesign(n) samples a community under guild quotas and a habitat theme, then wires who-eats-whom by ecological rules alone — no per-pair diet data: herbivores eat producers they share a habitat with; carnivores eat present animals inside a Brose-style predator-to-prey mass window; species spanning two habitats become cross-web couplers automatically. Starvers are pruned; degenerate rolls re-roll with a salt.
The oracle, evaluateRoll, runs the element-exact box model and the community-matrix stability solver, then folds seven viability signals — closes · persists · stable · fed · air · robust · buffered — into one 0–100 score with degeneracy penalties (collapse, monoculture, runaway atmosphere). Legendary (≥ 88) is a self-closing, stable, crew-carrying world. The crucial design choice: the axis is viability, not interestingness. A gorgeous but unstable web scores low on purpose, because the model knows it would die.
The lesson carried forward: if you want emergent rarity, make the cheapest-to-state property of the artefact — "does it work?" — expensive to satisfy, and let the simulation be the gatekeeper.
3hoop/econ: the social genome
The transposition is almost mechanical. A biome species is a guild + a diet; an econ place is a role (a verb — dwell, make, trade, heal, govern) × a domain (the matter) × flows (the resource tokens it takes in and puts out). The trophic web becomes a supply web: wire each input to its nearest producer and read it like a food web — does it close, where are the gaps, who is keystone.
FOOTPRINT (building size by function, in cells), household sizes, affiliation propensities, domain breadth.The oracle, scoreSociety, scores the fabric: supply closure · multiplex thickness · weave (social reach) · bridges (Granovetter weak-tie share) · third-places · employment · resilience (mean damage from removing the busiest hubs). One vitality 0–100 and a tier (Thriving → Failing). It ranks the archetypes exactly as intuition predicts: commons > balanced > company > dormitory.
4The foam: society on a real 3-D structure
A flat-rectangle town with crow-flight supply lines can make none of the predictions a cylinder city is for. The real substrate is the structure wing's annular chamber foam — the same ~34 k-chamber sector that the foamview renders and the frame solver stiffens. Gravity is radial, so travel is anisotropic: azimuthal and axial motion is level (constant radius, constant g), radial motion is climbing. Three inversions were forced, and they are the architecture:
- Infrastructure first / or grown. Roads come before buildings — either reserved from a certified ramp+road plan, or grown from demand (§5).
- Buildings are chamber clumps, keyed by the foamview's own chamber index. Painting the society is literally colouring chambers by their owner.
- Distance is road distance. Supplier choice and access are anisotropic Dijkstra over the chamber graph (climb costs ≈ 6×, decks discounted), never Euclid. Measured effect: ~50 % of supply edges choose a different supplier than crow-flight would. The geometry restructures the economy; it does not decorate it.
Because the output keeps econ's shape, the society, its metrics, and the shock-removal all run over the 3-D city unchanged. An access signal — median road-cost from a dwelling to its everyday basket — joins the oracle, so moving the streets moves the score.
5The hammer's edge: roads as the Laplace transform of motion
The corkscrew-plus-connectors of the first pass is a highway system with no streets, and it is imposed top-down — at odds with the generated ethos of everything else. The resolution reframes what a road is. In spin gravity there are two kinds, with opposite generation logic: level circulation is cheap, dense, and should emerge; radial circulation is expensive, sparse, and is really the vehicle elevator. The mental model becomes a stack of 2-D cities — each shell a flat town on the unrolled (azimuth × axial) plane, threaded by a few vertical cores.
The growth law
Place only the attractors — every inhabitant's recurring trips (home→work, home→parish, home→club) and every supply haul — and route them on the chamber graph. Accumulate flux per edge; let conductance follow flux and decay where unused, so cost = length / conductance; iterate to a fixed point. The stationary occupancy field this converges to is the time-integral of the trip ensemble's motion — the resolvent, the graph Green's function, the Laplace transform of the walk at s→0. Roads are its superlevel set: the chambers the most journeys cross become open concourse; everything below the waterline stays sequestered building, fronting the road at one door per floor.
One field, read four ways: the superlevel set is the street network; its level sets are the road hierarchy (footpath → street → arterial); its gradient at building boundaries picks the doors; the field itself is the ambient foot-traffic. This is why the user's instinct — "solve roads and NPC action in one fell swoop" — is literally true: they are the same object.
Why it looks like mycelium
The computation is the one Physarum polycephalum runs to forage between food sources, and the one ant colonies run with pheromone, and the one current-flow betweenness measures in a resistor network — adaptive, flux-reinforced transport. Tero et al. reproduced the Tokyo rail network this way; we reproduce a city's streets. The single dial is the feedback exponent μ: sublinear (μ<1) keeps redundant parallel streets — a grid; superlinear (μ>1) collapses everyone onto one arterial — a tree. μ is the answer to "do I have enough roads."
The result: the ramp emerges
Run grow-then-settle — a provisional roadless city sources the demand; the field grows; the final city reassembles fresh around the carved streets — over the full sector with no imposed route, and because climbing is dear, climb demand concentrates onto a few reinforced radial threads. The corkscrew is no longer designed; it is worn into existence.
| figure of merit | certified corkscrew | grown (emergent) |
|---|---|---|
| right-of-way origin | wayfind planRoute | society's own trips |
| radial depth threaded | full (by construction) | 98–99 % (from demand) |
| supply-web closure | 100 % | 100 % |
| dwelling access (0–1) | 0.79 | 0.79 |
| character | two clean spirals | a branching root system |
6What the hammer is, in one paragraph
A deterministic unfold from a small genome; a simulation that judges the unfold instead of a rarity die; a graph substrate carrying real anisotropic cost; and a flux-reinforcement law that lets the expensive infrastructure grow from the cheap behaviour rather than be drawn. Point it at calories and it generates viable ecologies. Point it at affiliations and it generates living towns. Point it at trips and it grows the streets those towns need — biomimetically, measurably, and for free alongside the foot-traffic. The artefacts are reproducible from two integers, which is what makes them shareable, persistable to ATProto, and walkable in a game.
7Pathways of advancement
Near term
- Commutes & desire-line luminance. The flux field already is the foot-traffic layer; route people door-to-door, accumulate per-chamber traffic, render as luminance — the city lights along its true streets and dead infrastructure goes dark. A
commutesignal joins the oracle besideaccess. - Junction towns. Score a building by the road-betweenness of its door; the prediction to falsify is that the oracle's bridges signal correlates with junction proximity — the weak-tie thesis acquiring a spatial cause, the first geographic prediction the society makes.
- Sectoral programme. With a million-person target the sample sector is ~200× under-packed: room to reserve whole sectors for reactors, water treatment, agriculture, each with its own road programme (dense pedestrian vs. sparse freight) and door rule.
Structural
- One identity space. Bind a building's key to the postal
(chunk, ordinal)of its door chamber — genome-stable across regenerations — so an econ place and a hoop forum place can be the same ATProto record. - Persist as
(genome, seed). Two integers reproduce the whole society; the permalink contract the gacha already proved. - Into the game. A solve of record for the visited region, plus rules to grow the network outward as the player wanders off-screen in any direction — local generation that stays globally consistent because it is deterministic in the chamber index.
Method
- Exact resolvent. The flux is computed by reinforcement (which gives the μ dial); for provable betweenness one can swap in the literal current-flow solve of the graph Laplacian — the same object, exactly.
- Calibration. Natural genome rolls cluster Healthy/Thriving because the generation is structurally robust; breeding Fragile/Failing archetypes and tuning the tier bands is the open calibration pass, exactly as the gacha tier bands are.
- Hierarchical routing to take the grown-street step from seconds to interactive at full scale — the cost is dominated by each hub's farthest member, so the win is coarse-graining the graph, not tuning the loop.
8Reproduce
node hoop/test/{econ,econ3d,econfoam,flux,econroads,foamroads}.selftest.mjs
→ the genome, the 3-D city, the worker contract, the desire-line kernel, the 2-D carve, and the climb emerging, all pinned.