Calibrating against a chaos brain
Before trusting a real model with the village, every notable is fed a random whim each time they are asked. If two villages cannot survive three years of that, a real model will kill them on a bad afternoon.
- Run it
- BRAIN=chaos bun scripts/village-dry-run.ts DAYS=36
- Bar
- three years of random whims, villages still growing
- A year headless
- under a second
A model is not adversarial, but it is unpredictable, and a simulation that only survives sensible decisions has never really been tested. The chaos brain answers every question at random and the economy has to hold.
What it found
- The essential-trade guard: the trades that feed the village cannot all wander off at once.
- Labour reallocation: hands move to the thinnest trade daily, and not when somebody decides to.
- The clerk's storehouse failsafe: the grain opens even if the reeve says no.
- The yard's hard priorities: doubled-up families and ruins before upgrades, or the yard builds sixty-six households a manor and no houses.
The ways a village has died
Eleven thousand grain in a market with no flour and no bread, because the model kept sending the millers to the inn. People eating only on arriving home. Grain gone by spring. Coin pooled in producer households until nobody could buy anything. Children's portions giving children's satiety. Seventy-four building sites and zero finished houses. The reeve moving the wheat farmers to the bakehouse until the harvest failed. The crowd's storms knocking a tenth off every roof.
Each of those is now a commented rule that says which run killed the village and how. The comment is the test's real output.
Calibrate by running it, not by reasoning about it
bun scripts/village-dry-run.ts plays a year in under a second and prints the day-by-day ledger, and DAYS=36 plays three. If you change a rate, play a year and look at deaths-by-cause before trusting it. Every rule in sim.ts that reads oddly is there because a run without it killed the village.
This is the same instinct as measuring a threshold instead of guessing it, applied to an economy instead of a probability.
Read next
A closed medieval economy, in real time
Two villages of about 220 people each run a complete production chain, field to mill to bakehouse and pasture to butcher, with floating market prices, daily wages, household purses, tax, tithe, and a winter every twelve days.
Playing a whole world in the terminal
A party plays in the terminal with no browser and no server, and a village year plays in under a second. Both run on the same primitives as the live simulation, so a rule that works headless works live.
Measuring a threshold instead of guessing it
To set a threshold on a model's answer, ask the same question across a ladder of hand-built situations, look at where the answers separate, and put the bar in the gap. A number picked by intuition usually sits where the model never goes.
Four hundred agents, a few dozen guts
The village asks the model about roughly thirty people on a cadence, plus anyone at all who is facing a real choice, capped at two calls a second across the whole valley.