How it works
Inside the simulator
simhood is a small simulation kernel with the town built on top as plugins, made to scale to very large towns. It runs as its own program; the game you see is a client that watches it and sends it your decisions.
01 · Architecture
A kernel, plugins and a wire
The kernel knows nothing about towns. It keeps the clock, the world's state, random numbers, the ledger, markets, the map and the people, and it checks the rules every step. Everything that makes it a town comes from plugins.
Plugins never call each other. They meet through shared state, markets, the ledger and events, and declare what they provide and need as named capabilities. That is what lets one be swapped for another: the goods markets have two interchangeable providers today, and both pass the same conformance kit of small test markets.
Clients
- 3D game (Godot)
- Web dashboard
- Headless runs and research tools
The wire
One WebSocket: commands and control messages as Protocol Buffers, views of the town as Apache Arrow tables. Every player action is a logged command.
Plugins in the town
- town-genstreets, blocks, parcels and buildings
- terrain-genrelief, sea, rivers, biomes and woods
- populationhouseholds from Census templates
- mobilityday plans and trips by foot or car
- traffic-volume-delayroads slow as they fill
- market-clearingthe goods markets, cleared daily
- labourjob openings, matching and wages
- housingtenancies, landlords and rent
- commercefirms, stock and posted prices
- rest-of-worldimports, pensions and benefits
- city-budgetcouncil tax, sales tax, services
- environmentair pollution from roads and heating
- wellbeingmood, distress and the price index
- place-namesstreet, address and shop names
Kernel, bottom to top
- sim-contractthe wire's types, usable by a client alone
- sim-coreworld, clock, scheduler, random streams, snapshots
- sim-ledgerdouble-entry accounts with a reason on every transfer
- sim-marketmarkets with pluggable matching and price rules
- sim-spaceroads, parcels, footprints and grid fields
- sim-networkrouting and travel-time tables
- sim-agentspeople, households, firms and their needs
- sim-metricsmetrics recorded to Parquet
- sim-protocolcontrol messages and views
- sim-hostthe server and the command line
Each layer may only use the layers beneath it; a check fails the build otherwise.
02 · Scale
Built for very large towns
Every resident is simulated on their own: their home, their job, their day, their money. The goal is to do that for a metro of about a million people on an ordinary laptop, at a speed you can play at, and to go past a million by running several big cities side by side.
It isn't there yet. A city of 100,000 already runs a day in 20 seconds on one core and in under 5 GB of memory, well inside the fastest game speed on average, though the midnight planning step still pauses it for about 11 seconds. A million residents run too, but a day takes over two minutes on 16 cores and far too much memory. Making that fit a laptop is the biggest engineering job ahead.
Goal
A million on a laptop
A metro of about a million residents, every one simulated, in a laptop's memory alongside the game, keeping up with the fast speed (a day every 20 minutes) without the clock stalling.
Goal, to be designed
Many cities, one region
Run several large cities side by side. The city you're in simulates every resident; the ones you've left carry on as whole-town models, with their people, jobs, prices, budget and trade as totals, and wake back up in full detail when you return.
Planned
Past a million in one city
One city beyond a million keeps every firm and samples residents: each simulated person stands for a few real ones.
- 1,900 residents0.1 GB
- 19,700 residents1.5 GB
- 101,500 residents4.6 GB
- 995,000 residents51–63 GB
A 16 GB laptop (log scale)
- 6×
- faster at 100,000 residents than the first measurement, three weeks earlier
- 15 µs
- to find a resident's route across the 20,000-person town
- 1 core
- does nearly all of a day's work, so a laptop's memory matters more than its core count
Measured on 28 October 2026 on a 16-core Apple M4 Max, except the metro: its day is from 12 October on 16 threads under heavy load, its memory from earlier runs, and both need re-measuring. The routing speed-ups changed no result (every run's fingerprint stayed the same); today's figures also include other work on the game since.
03 · A simulated day
86,400 ticks, most of them skipped
One tick is one simulated second, so a day is 86,400 ticks. Nothing runs every second, though: each system says how often it runs, and the scheduler jumps straight to the next thing that is due, such as a resident arriving at work or the markets opening at midnight.
Inside a step the order is always the same: the player's queued commands apply, scheduled events are delivered, the systems run, reactions follow, and then read-only checks look for anything that breaks the rules. A breach is recorded, never ignored.
One step, in order
- 01Your commands
- 02Scheduled events
- 03Systems
- 04Reactions
- 05Rule checks
- As it happens
- Residents leave, travel and arrive; each trip's time is set by yesterday's traffic on every road it takes.
- Daily
- Markets clear, shops produce and reprice, jobseekers and openings are matched, moods update, plans for tomorrow are made.
- Weekly
- Pensions and jobseeker payments arrive from outside the town.
- Monthly
- Rent, wages, council tax, the services budget and shop dividends move through the ledger.
Time can be compressed: one simulated day can stand for one, seven or 28 calendar days, so a year of town life passes in an evening.
- 0–5 minutes64%
- 5–10 minutes33%
- 10–15 minutes4%
Every trip to work over a year of the test town, seed 1: 364,508 of them. It's a small town, so nobody's far from work yet.
04 · Same seed, same town
It replays to the bit
With the same seed, settings and decisions, a run is identical on any machine, with any number of threads, whatever the camera is looking at. That makes every change you make measurable: replay the town without it and compare.
Whole numbers
Money is counted in whole pennies, prices in ten-thousandths of a penny, and positions in whole centimetres. Rounding happens once per transaction, by one rule, and splits never create or lose a penny.
Named random streams
Every random draw comes from a stream named after the seed, the plugin, the system and the tick, so adding threads or reordering work can't change who gets which number.
Stable order
Anything whose order matters is sorted by a stable ID first. Hash maps are never iterated, and the engine's own iteration order is never trusted.
A fingerprint a day
The whole world is hashed into one 64-bit fingerprint. Two worlds with the same fingerprint save to byte-identical files.
As one of the project's checks, the test town runs a full simulated year three times, on one thread, three threads and every thread, each in its own process, and all 365 daily fingerprints must match. A save from day 196 is then loaded in a fresh process and run on to day 365, and it must land on the same final fingerprint.
05 · Money
Every penny goes somewhere
All money moves through one double-entry ledger, and every transfer carries its reason: a wage, a rent payment, a basket of groceries, a council tax bill. The books always balance, so the money in the town at the end of a year is exactly the money at the start plus what came in from outside, minus what left.
Numbers you see in the game, such as a price, a rent or a mood, are built up from labelled contributions: a base, then each plugin's offsets and factors. That record is what the why panel shows, so you can see that groceries went up 10% because you raised the sales tax, or that a flat is cheaper because the air outside it is bad.
- Sales in the markets£138.8M
- Wages£55.2M
- Firms' profits paid out£15.6M
- Pensions and benefits£11.2M
- Rent£4.7M
- Council tax£2.4M
- Council spending£2.4M
- Housing support£1.4M
Every transfer in the ledger over a year of seed 1, by reason, leaving out the one-off opening balances.
The town's ledger
Where money goes| From | To | For |
|---|---|---|
| Households | Shops | shopping |
| Shops | Households | wages |
| Households | Landlords | rent |
| Households | Council | council tax |
| Shops | Council | sales tax |
| Council | Households | public-service wages |
| Households | Outside world | household goods (imports) |
| Outside world | Offices | business services (exports) |
| Outside world | Households | pensions and benefits |
Unaccounted for£0.00
06 · Beyond the town
Neighbours, the nation and trade
A town doesn't live alone. Today everything outside it is one account, the rest of the world, standing for the whole country: it sells the town household goods, buys the business services its offices export, and steps in with produce only after a shortage has lasted three weeks, at a 25% markup. It also pays the national benefits: the state pension, jobseeker and income support and the child element, at the UK's 2025 to 2026 rates.
Money only enters or leaves the town through that account, so the books still close to the penny. No one crosses the boundary yet: every job is filled by a resident.
- Now
The rest of the world
One outside account trading at fixed prices, a shortage backstop, and national pensions and benefits.
- Next
A road out of town
A highway to the map edge. People commute both ways through it, and households move in when there are jobs and homes and leave when there aren't, so the town can grow and shrink.
- Designed
Neighbour, nation, world
Three outside regions, each a small set of totals rather than people: prices, wages and jobs, interest rates, pools of would-be migrants and visitors. People become individuals only when they cross into town.
- Designed
Trade through gateways
Export demand that rises and falls with the economy outside, imports split between local and foreign suppliers, and goods arriving through motorway junctions, rail yards and ports with their own capacity.
- Goal
Neighbours that react
Other cities that grow and shrink, compete for residents and firms and trade with yours, then agreements between them, up to running several cities of your own.
Imports and exports each month for a year of the test town, seed 1. Household goods come in; business services go out.
07 · Research tools
A game you can run experiments on
The same simulator runs without a screen, for anyone who wants to study a town rather than play it.
Runs
A headless run writes its settings, its command log, a fingerprint per checkpoint and every metric as a Parquet table.
Exports
A finished run replays itself to export daily panels of every person and household, plus every event, with versioned schemas. It refuses a run this build doesn't reproduce.
Seed ensembles
Run dozens of seeds at once and judge each against calibration bands, the ranges a healthy town should stay inside.
Sweeps
Try a grid of policies across seeds, such as four sales-tax rates raised on day 90, and get a ranked report.
08 · Sources
What it's built on
Designing simhood meant reading a lot: the reference library holds 546 papers, datasets and docs, each with a note on what the design takes from it and where it's cited. These are the ones the current build's rules and starting data come from, plus those behind the outside world now being designed.
Traffic and travel
Residents drive real routes, and roads slow down as they fill up with cars.
- A Fast Algorithm for Solving the Traffic Equilibrium Problem with the Conical Volume-Delay Function
Spiess, 1990
An alternative congestion curve for how fast a road gets slower as traffic builds.
- MacroSim: a macroscopic Mobsim for MATSim
Bösch & Ciari, 2017
Trip times on each road come from the previous day's traffic load on it.
- A validated multi-agent simulation test bed to evaluate congestion pricing policies on population segments by time-of-day in New York City
He et al., 2020
Road capacities are set conservatively, since nominal map capacities overstate real ones.
Work and wages
Jobseekers and employers are matched every day, so unemployment comes from real gaps in the town.
- College Admissions and the Stability of Marriage (Gale and Shapley, RAND P-2240)
Gale & Shapley, 1962
The stable matching method that pairs people with jobs without anyone wanting to swap.
- Looking into the black box: a survey of the matching function
Petrongolo & Pissarides, 2000
How the number of jobseekers and vacancies shapes how many hires happen.
Homes and rent
Households rent homes at rents that follow real English market levels and income.
- Private rental market summary statistics in England
Office for National Statistics
Default rents and home sizes by number of bedrooms. Licence: Open Government Licence v3.0.
- Tenure (Census 2021, TS054)
Office for National Statistics
The share of households that own or rent at the start of a game.
- Macroprudential policy in an agent-based model of the UK housing market
Baptista et al., 2016
Tenancies run 12 to 24 months, and renters spend a share of their income.
Shops and prices
Firms post prices, sell what they stock and nudge prices up or down as stock and demand shift.
- Tipping points in macroeconomic Agent-Based models
Gualdi, Tarzia, Zamponi & Bouchaud, 2015
How fast and how far a firm may change its price each quarter.
- Implications of behavioral rules in agent-based macroeconomics
Dawid, Delli Gatti, Fierro & Poledna, 2025
Prices move toward the market average when demand and supply are out of balance.
- Information on data: ESA supply, use and input-output tables (FIGARO)
Eurostat
The 64 industry sectors every good and firm is filed under. Licence: CC BY 4.0.
- Consumer price inflation tables
Office for National Statistics
Real shop prices for groceries and services set the starting prices. Licence: Open Government Licence v3.0.
Council budget
The council raises council tax by property band and spends on public services.
- Local Government Finance Act 1992, section 5
UK Parliament, 1992
Council tax bands A to H are fixed fractions of the middle band.
- Council Tax levels set by local authorities in England 2026 to 2027
Department for Levelling Up (MHCLG), 2026
Typical real bills a household pays, so the default tax feels right.
Air and wellbeing
Traffic and heating spread pollution over the town, and money, jobs and air shape how people feel.
- Development and validation of a rapid urban scale dispersion modelling platform
Hamilton, Masey & Beverland, 2017
Pollution spreads from busy roads over a grid, on top of background air.
- Factors associated with NO2 and NOX concentration gradients near a highway
Richmond-Bryant et al., 2017
How quickly road pollution fades with distance from the road.
- WHO global air quality guidelines
World Health Organization, 2021
The healthy nitrogen dioxide limit drawn as a line on the pollution map.
- SimPaths: an open-source microsimulation model for life course analysis
Bronka et al., 2025
Distress follows last year's distress and jumps with job loss or falling into poverty.
- Personal well-being in the UK
Office for National Statistics
The typical mood level residents start from. Licence: Open Government Licence v3.0.
People and households
Residents are born, age, form households and die at rates taken from English statistics.
- National life tables: England
Office for National Statistics
The chance of dying at each age, for women and men. Licence: Open Government Licence v3.0.
- Births in England and Wales: birth registrations
Office for National Statistics
How likely women of each age are to have a baby. Licence: Open Government Licence v3.0.
- Age by single year (Census 2021, TS007)
Office for National Statistics
The age mix of starting residents, including the oldest ages. Licence: Open Government Licence v3.0.
- Baby names in England and Wales: from 1996
Office for National Statistics
Real first names, weighted by how common they are. Licence: Open Government Licence v3.0.
Land and streets
Terrain, rivers and street layouts are generated from the seed, with streets bending to the land.
- Improving Noise
Perlin, 2002
The smooth noise that shapes hills and valleys.
- Priority-flood: An optimal depression-filling and watershed-labeling algorithm for digital elevation models
Barnes, Lehman & Mulla, 2014
Fills hollows so water always finds a way to the sea, making rivers.
- Communities and Ecosystems (2nd edition)
Whittaker, 1975
Sorts land into nine biomes by temperature and rainfall.
- Urban Spatial Order: Street Network Orientation, Configuration, and Entropy
Boeing, 2018
How curvy real city streets are, which keeps generated streets realistic.
Determinism and engine
The same seed and choices always give the same town, on any machine.
- Bevy 0.19
Bevy Contributors, 2026
The entity-component system the simulated world is stored in.
- bevy_ggrs pitfalls guide
bevy_ggrs developers
Why the sim sorts entities before using them, since query order is not stable.
- Rust RFC 3514: float semantics
Rust project, 2023
Why money, geometry and terrain use whole numbers, not floating-point.
Beyond the town
The outside world pays today's UK benefit rates; the neighbours, commuting and trade being designed rest on the rest.
- Benefit and pension rates 2025 to 2026
Department for Work and Pensions, 2025
The state pension, jobseeker and income support and child element the outside world pays.
- The small open economy in a generalized gravity model
Demidova, Kucheryavyy, Naito & Rodríguez-Clare, 2022
A town takes outside prices as given and faces export demand that falls as its prices rise.
- Trade: GCAM (IAMC documentation)
IAMC
Splitting what's bought between local and imported supply, then between outside regions.
- Systematic comparison of trip distribution laws and models
Lenormand, Bassolas & Ramasco, 2015
Which commuting model fits real flows best: a gravity model with distance decay.
- The effects of information on the formation of migration routes and the dynamics of migration
Hinsch & Bijak, 2023
Movers act on second-hand, out-of-date news about a place, not on the truth.
- DEPLOYERS: an agent-based modeling tool for multi-country real-world data
Jaraiz & Pinacho, 2024
A detailed economy beside coarser partner countries: the shape of town and outside regions.