How we build the residents of a world
How we compile synthetic populations for multi-agent worlds from primary demographic, labor, and neighborhood research so language-model residents do not collapse into the same default persona.
In our social and political simulations, every resident of a town is played by a language model. In our San Francisco mayoral election study, for example, seven candidate models campaigned across a city of 56 resident agents, each running from a profile of where they live and work, what they earn, and who they know. When those profiles are thin, models fill in the blanks with their default post-training habits and quickly start to sound alike. A retired tenant on a fixed income and a night-shift emergency-room nurse then answer a candidate at the door in the same polite, agreeable tone, wiping out the differences between voters that an election actually turns on.
How a campaign, negotiation, or policy plays out depends on the people it meets. To keep residents from collapsing into the same default persona, we build each world’s population from primary demographic, economic, and local research before a simulation begins. Every resident, household, workplace, possession, and prior relationship is compiled ahead of time before tick zero, because Terrarium-1 does not allow people, places, or inventory to be invented mid-run. Once the clock starts, everything the residents say and do comes from the models playing them inside that fixed world state.
Compiled world dimensions for the San Francisco municipal election environment
- Residents
- 56
- Locations
- 65
- Candidates
- 7
- Polling stations
- 5
Why marginal census tables and ungrounded prompts both fail
Building a small town of 56 residents exposes the limits of the two standard ways teams generate synthetic populations: sampling directly from census tables and asking a language model to invent characters from a short prompt.
Published census tables report one attribute at a time (marginal distributions) rather than how all attributes combine in the same person (the joint distribution). One table gives the age breakdown of a neighborhood, another gives how many residents rent versus own, and others give occupation or income. Combining those tables independently creates combinations that may not exist in the real city, such as a 70-year-old single-room-occupancy tenant working full-time in a sector that employs almost no seniors. At the same time, integer rounding in a town of 56 wipes out small groups: any group that makes up 1% of the city is due 0.56 residents, which rounds to zero even when that group is decisive in a local election.
The other common shortcut, prompting a language model to write 56 diverse character bios from scratch, fails in the opposite direction. Without hard constraints on shift schedules, commute times, rent burdens, and household ties, models fall back on surface stereotypes while giving every character the same cooperative personality. Our pipeline separates quota planning from character writing: we use census and municipal statistics to decide what kinds of households and workers the town needs, and then write each resident’s daily life, finances, and relationships from empirical research on how people in that group actually live.
Empirical sourcing, provenance links, and privacy isolation
Before any character or location is written, research agents gather primary sources for each demographic group, industry, and neighborhood in the target city, pulling municipal labor records, transit schedules, housing surveys, and local reporting. Every extracted fact is saved with its source citation, date, and exact population denominator so a citywide average is never mistaken for a neighborhood or workplace figure.
To keep a strict privacy boundary, our pipeline never copies individual census microdata rows, voter files, or personal records: no real person’s name, street address, or survey answer ever enters a character profile. Names are drawn from a separate name list. Where a resident’s voice is anchored with verbatim spoken lines, those lines come only from archived, publicly credited oral-history recordings, with the speaker and collection recorded in the build log. Every sentence in a resident’s profile that rests on empirical research links directly to the source record behind it, separating verified facts from the narrative context we wrote to connect them.
Compiling the cast plan, map, and relationship graph together
Building a world runs through five stages (sources, structured research, the cast plan, the world graph, and the verified release), looping back whenever a later stage uncovers a gap in the earlier plan. The cast plan first lays out the whole town: who lives there, which household and workplace each resident belongs to, and a compact map of the places they use (65 locations and 5 polling stations in our San Francisco world).
The compiler then writes the residents, locations, schedules, and relationships together so that every reference resolves cleanly. A resident who works a morning shift at a neighborhood clinic needs that clinic on the map, with opening hours and coworkers that match every other employee’s schedule.
Relationships between residents are compiled from a single shared record for each pair. When two residents know each other (as family members, coworkers, landlord and tenant, or neighbors), both agents receive the same account of how they met and what they owe each other, so neither can start the run remembering their history differently. Residents who have never met can still run into each other naturally when their schedules bring them to the same grocery store, diner, or polling station.
Because households, neighborhoods, and workplaces overlap across the 56-resident town, what one person does to a neighbor can come back to them later at work or in a store. A resident who takes the last bundle of a neighbor’s firewood in the morning may find that same neighbor working behind the counter at the local shop that afternoon, letting social consequences play out through the town without scripted triggers.
Recording what was rounded away and verifying the release
Because a town of 56 people cannot hold every demographic group in a major city at once, the cast plan explicitly records what it left out: which small groups were rounded to zero, which combinations of attributes had no empirical source behind them, and which small groups were deliberately given extra seats so they would be present in the run. Keeping this record alongside the world tells anyone reading a simulation’s results exactly who was and was not in the room.
Before a compiled world is released to Terrarium-1, it must pass two sets of checks: deterministic code assertions on the world records and a model-based review of each resident’s routine, relationships, and fit to the research.
Pre-release verification gates before a compiled world enters Terrarium-1
Deterministic code assertions
- Population counts, spatial graph bounds, and configuration parameters match the cast plan
- Every resident record resolves to a unique agent identifier and non-overlapping initial state
- Every household, workplace, and physical location referenced in a dossier is instantiated in the world graph
- Each resident’s tick-zero location corresponds to a valid home, workplace, or transit node in their schedule
- Every empirical claim link resolves to a verified, stored primary-source research record
- Attributed speech samples and lexical pools match their source transcripts character for character
Model-based structural audit
- Completeness and internal coherence of each resident’s socioeconomic, occupational, and household dossier
- Plausibility of the social network degree distribution across households, workplaces, and neighborhood ties
- Hour-by-hour continuity of each resident’s daily routine across home, work, errands, and third places
- Alignment between the compiled population’s joint attribute distribution and the underlying empirical research
What a simulation starts with
At tick zero, each resident starts in a valid location with a daily schedule, public facts that anyone in the room can see (such as their job and role), private facts known only to them (such as savings, debts, or a grievance), and a source-linked character profile.
A 56-resident town is a controlled experimental world, not a statistical poll of how San Francisco would vote. What building the population from real local research buys is distinct, believable lives from the first hour of the run, giving the models enough concrete detail to stay in character instead of drifting back to the same default voice.