# Parlour — full text > Live social simulations you can watch: a language model is every character's gut, and the rules in code are the physics. Source: https://jev-playgrounds.drummerduck.com/ · 47 pages · map at https://jev-playgrounds.drummerduck.com/llms.txt # The model What an evaluation model is, why a simulation wants one instead of a chat model, and what a night costs. ## What an evaluation model is https://jev-playgrounds.drummerduck.com/how-it-works/evaluation-model An evaluation model takes one shared state and a set of typed questions, and answers all of them in a single request. Each answer comes back as a full probability distribution instead of a sentence. - **Shape:** state in, N typed answers out, one request - **Answer types:** choice, score, boolean - **What you get back:** a distribution per question, not a token stream - **Model here:** typesafe-ai/jev, via the Vercel AI Gateway A chat model is asked to continue text. An evaluation model is asked to *judge*: you give it a situation once, hand it a list of questions with declared answer shapes, and it returns a scored answer to every one of them together. What matters is not the API ergonomics. It is that the output is a measurement. A choice question comes back as mass spread over the options, so you can see that a character chose to approach the host at 0.71 with 0.25 still sitting on holding court. That is an almost-did you can put on screen, and a number you can put a threshold on. ### The three question types Every question in Parlour is one of those three. Nothing in the system asks for free text, which is why nothing in the system has to parse any. | Type | You declare | You get back | | --- | --- | --- | | choice | a set of labelled options | a probability for each option | | score | ordered levels, lowest to highest | a level, with the mass around it | | boolean | a proposition | P(true) | ### Why that shape suits a simulation A simulated person is not writing an inner monologue. They are making a handful of gut-checks about a room: what do I do, who is it about, how badly do I want it, how dangerous is that one, am I better off without this alliance. Those are questions with answer sets, asked of the same state, and asking them together is both cheaper and more coherent than nine separate calls that cannot see each other. The engine then uses the whole distribution instead of flattening it (see [distributions, not picks](/how-it-works/probability-distributions)), and every threshold in the rules is [measured against what the model actually returns](/how-it-works/calibration). ## typesafe-ai/jev, and what Parlour uses it for https://jev-playgrounds.drummerduck.com/how-it-works/jev Jev is the evaluation model Parlour runs on. It answers nine typed questions per character per beat in one call, is billed on input tokens only, and costs roughly three cents for a five-minute party. - **Model id:** typesafe-ai/jev (override with PARLOUR_MODEL) - **Called through:** experimental_evaluate from the ai package - **Per call:** nine questions, ~3,000 input tokens - **Billing:** input only - **A party:** ~250–300 calls, about 3–4¢ Jev is reached through the Vercel AI Gateway with the AI SDK's `experimental_evaluate`. One call hands it a JSON state object describing what a single character can see right now, plus the nine questions, and gets nine scored answers back. ### What it is asked, and what it is never asked It is asked what a person does. It is never asked what happened. It does not narrate, does not move anyone, never sees the resolution rules, and has no memory between calls beyond what the state object puts in front of it. The whole of what happens is `lib/sim/engine.ts`. That division is why the simulation can be honest about itself. Because the model only ever supplies judgement, the screen can show you the judgement and the rule separately, and can say in amber when a rule [overrules the judgement](/how-it-works/coercion). ### Swapping it out is not a config change A chat model cannot stand in. It would not answer this shape: nine simultaneous typed questions with calibrated mass on every option. You could fake the answers with structured output, but then you get a self-report of confidence where you needed a measurement, and every threshold in the engine sits on that measurement. With no key at all the rooms still run, on the [house brain](/how-it-works/house-brain): a deterministic heuristic that answers the same nine questions and synthesises its own distributions. ## Evaluation model vs chat model https://jev-playgrounds.drummerduck.com/how-it-works/evaluation-model-vs-chat-model A chat model returns text you have to trust and parse. An evaluation model returns a probability per option, which is what lets a simulation put a real threshold on a decision instead of a vibe. ### Side by side | | Chat model | Evaluation model | | --- | --- | --- | | Output | tokens | a distribution per question | | Nine questions | nine calls, or one call and a parse | one call | | Confidence | self-reported, if asked | the mass on the chosen answer | | Refusals / drift | a real failure mode | no free text to drift | | Bills on | input and output | input only, here | ### The confidence difference is the whole thing Ask a chat model how sure it is and you get a number it wrote about itself, which is a different object from the probability it assigned. Ask an evaluation model the same question and the answer is already a probability: a character's confidence is the mass on the move they picked. That makes a rule like *Nyx ignores her own reads below 0.72* a real bar. Against a measured distribution (median P(top choice) ≈ 0.57, p75 ≈ 0.77) 0.72 is roughly her top quartile, so she overrides herself often enough to be a character and rarely enough to still act. ### Where chat models are still the right call Anything whose output is text a human reads: dialogue, summary, narration. Parlour has none of that on purpose. The ticker lines are templates filled by the engine, so the room is never describing itself in a voice it might lose. ## Typed questions: choice, score, boolean https://jev-playgrounds.drummerduck.com/how-it-works/typed-questions Parlour asks three shapes of question: a choice over options, a score on ordered levels, and a boolean. The option sets are built per character per beat from the rules, so the model can only pick something legal. The question pack is built fresh for every character on every beat, in `buildQuestions`. That is not cosmetic: the option set *is* the rule surface the model is allowed to reach. ### Choice The action question offers only the actions `legalActions` returns for that person in that state, each labelled with its blurb and its energy price: `hold court (costs 9 energy)`. The target question offers only people they can reach, labelled by class and by whether they are standing here or across the room. A mask question offers the room's masks. Illegal moves are absent instead of forbidden in prose, so there is no prompt to obey and nothing to police afterwards. ### Score Score questions declare their levels in order, worst to best, and the labels are written in plain speech instead of numbers. Hunger runs `chill about it · mildly interested · focused on it · hungry · desperate`; threat runs from `an ally, no threat at all` up to `can knock you out tonight`; energy-after runs from `nothing left` to `fresh`. Ordered natural-language levels are easier to answer consistently than a 0–10 scale, and the engine gets an index it can do arithmetic on. ### Boolean One question per beat is a proposition and comes back as P(true): the betrayal question. Its wording is generated per character and per room, because [a different question is a different scale](/how-it-works/betrayal-threshold) and the bar it is compared against was measured against that exact wording. ## Using distributions instead of picks https://jev-playgrounds.drummerduck.com/how-it-works/probability-distributions Because every answer is a distribution, the engine can scale an outcome by how sure a character was. A 0.95 read of an open host earns a bigger opening than a 0.55 one, so not every decision is equally committed. Flattening a distribution to its argmax throws away the most useful thing in it. Parlour keeps the mass and uses it in three places. ### Three continuous uses - Effort scales with belief. A character who is 95% sure the host is open gets a bigger opening than one at 55%. Same action, different commitment. - Risk is the complement. The odds of a rumour being traced back to you are `1 - P(safe)`, taken straight off the answer instead of a fixed leak chance. - Confidence is the mass on the chosen move. That single number drives the per-class confidence floors, which is how a character can be written as *doubts herself* without a personality paragraph. ### It is also the most watchable thing on screen In full detail the brain board prints the runners-up: `approach_host 0.71 · hold_court 0.25 · withdraw 0.02`. A near-miss you can see is what makes the room read as somebody deciding instead of a token being moved. It is also the only honest way to show an almost, since a chat model asked what it nearly did would make something up. ## The nine-question pack https://jev-playgrounds.drummerduck.com/how-it-works/nine-questions Every character answers the same nine questions every beat, in one evaluation call: action, target, mask, hunger, threat, betrayal, two questions the room cares about, and what they have left afterwards. - **Questions:** 9, fixed, per character per beat - **Calls:** 1 per character per beat - **Of the nine:** seven are shared, two belong to the room ### The pack | # | Question | Type | | --- | --- | --- | | 1 | What does this person actually do this beat? | choice | | 2 | Who is it about? | choice | | 3 | What face do they wear while doing it? | choice | | 4 | How badly do they want the prize right now? | score | | 5 | How dangerous is that person to them? | score | | 6 | Would they be better off without the people they are with? | boolean | | 7–8 | Two the room cares about (declared in the RoomSpec) | varies | | 9 | What are they left with afterwards? | score | ### Why it never varies Repetition is the point. One personality run through a fixed decision head, beat after beat, is a character. A bespoke prompt per situation is a short story written by committee. It also keeps the scales stable. The moment you reword a question you have changed what its numbers mean, so every bar sitting on it has to be [re-measured](/how-it-works/calibration). Holding the pack still is what makes a threshold like 0.42 mean the same thing on beat 3 and beat 19. ### Eight guests, seventy-two gut-checks a beat Nine questions for each of eight people is about seventy-two judgements a beat, which is why the [running cost goes on the screen](/how-it-works/cost-of-a-simulation) instead of being hidden. The two room questions are the only variable part, and they are how one engine runs [a rooftop and a back room](/how-it-works/rooms-are-data) without a branch. ## The state object: what one character can see https://jev-playgrounds.drummerduck.com/how-it-works/prompt-state Each call carries a JSON state built for one character: their own condition, the people in reach, what they can remember of the last few beats, and the arithmetic of the prize. Never the whole world, and never the rules. `buildState` in `lib/sim/prompt.ts` is the only thing the model ever reads. It is written from one person's side of the room, which makes partial observability a property of the data instead of an instruction to be obeyed. ### What goes in - Them: energy, heat, standing, what they are carrying, what their class allows. - Who is reachable: name, class, where they are standing, and whether that is here or across the room. - What they have seen: the last few public events *visible to them*, via `visibleEvents` rather than the log. - The arithmetic: in a crew room, what the next count is worth, your share of it, how big the biggest rival crew is, and what walking out would take. Without that block the betrayal question [cannot tell a winning table from a losing one](/how-it-works/betrayal-threshold). ### What stays out Trust values other people hold, anything said where they were not standing, every threshold and constant in the engine, and the resolution rules themselves. A character who knew the betrayal bar would be playing the simulation instead of living in it. The state is also the entire memory. There is no conversation history: each call is a fresh look at a room, which is what a gut-check is. ## Measuring a threshold instead of guessing it https://jev-playgrounds.drummerduck.com/how-it-works/calibration 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. - **Method:** a ladder of situations, same wording, read the spread - **Observed P(top choice):** median ≈ 0.57, p75 ≈ 0.77 - **Bars in use:** 0.42 general, 0.45 in the crew room - **A bar that never fired:** 0.72, on a question that tops out at 0.18 ### The procedure - Write the question exactly as the live system will send it. - Build six to eight states that ought to answer differently: healthy and early, healthy and late, cooling, strained, wrecked, wrecked-and-it-does-not-matter. - Ask each one and write down the number. - If the answers do not separate, the question is wrong. Fix the question, not the bar. - Put the bar in the widest gap, and re-run the ladder whenever the wording moves. ### What a badly scaled question looks like The first betrayal draft asked whether a character would break their alliance *this beat*, and set the bar at 0.72. Breaking an alliance on any particular beat is genuinely rare, so the answer tops out around 0.18 whatever the state. The bar could never be cleared and no alliance ever died. The crew room walked into the same wall from the other side. "Would you walk out now, with a cut off the people you leave" answered 0.20–0.25 in every situation on the ladder, healthy or wrecked. Asking about the *table* instead of the moment, with the arithmetic in front of them, separates 0.30 for a crew that is winning from 0.52 for one that has been overtaken. ### Two rules that fall out of this A different question is a different scale. Bars belong to wordings, not to concepts, which is why the betrayal bar is a function of the room, `betrayBar(spec)`, and not a constant. Absolute values mean nothing on their own. 0.42 is not "fairly likely"; it is a point in one measured distribution. The same figure against a different question is noise. ## Running it through the Vercel AI Gateway https://jev-playgrounds.drummerduck.com/how-it-works/ai-gateway Parlour reaches Jev through the Vercel AI Gateway with one server-side key, and reads live per-token prices from the Gateway's model catalogue, so the cost counter on screen is a real number and not a constant. - **Secrets:** one: AI_GATEWAY_API_KEY, server-side only - **Model:** PARLOUR_MODEL, default typesafe-ai/jev - **Price source:** the Gateway model catalogue, cached one hour - **No key:** the house brain, and the UI says so ### One key, no client surface There is exactly one secret and it never reaches the browser. Every call is made on the server inside the simulation loop, so there is no `NEXT_PUBLIC_*` anything and nothing to inline into a bundle. A watcher's browser talks to a stream of simulation frames and to nothing else. ### Live prices, not a hardcoded rate `lib/sim/pricing.ts` pulls per-token prices from the Gateway catalogue, caches them for an hour, and falls back to a deliberately conservative constant if the catalogue is unreachable. An over-stated meter beats a crashed room. The counter on the party UI then reads like a buy-in that ticks up while you watch. Because model ids and prices come from the Gateway and not from the code, changing model is `PARLOUR_MODEL` and nothing else. Anything that is not an evaluation model will simply not answer the [question pack](/how-it-works/nine-questions). ### Failure modes No key, a failed call, and an exhausted [hourly budget](/how-it-works/spend-cap) all land in the same place: the room drops to the house brain, keeps playing, and says which brain it is on. There is no state in which this site shows you an error instead of a party. ## The house brain: running with no model at all https://jev-playgrounds.drummerduck.com/how-it-works/house-brain The house brain is a deterministic personality heuristic that answers the same nine questions and synthesises its own distributions, so the simulation stays watchable, and tunable, with no API key and no network. `house()` in `lib/sim/brain.ts` implements the same interface as the model: same nine questions, same answer types, distributions included. The engine cannot tell which one it is talking to. ### What it buys - A site that always works. Clone it, run it, watch a party, with no account, no key and no spend. - Free tuning. Every rule in the engine can be exercised and watched without paying for a single call. - Deterministic tests. Seeded, the house brain plays the same party every time, which is what makes [headless dry-runs](/how-it-works/headless-dry-run) a regression net and not a demo. - Somewhere to fall back to. Out of budget or out of key, the room degrades instead of stopping. ### What it is not It is not the product. A heuristic that reads its own state cannot surprise you: it has no sense of a room being tense, only of numbers being high. The difference shows up immediately in [how flat its distributions are](/how-it-works/probability-distributions), where every near-miss is a formula. The UI labels the brain in full detail for that reason. A watcher should never be unsure which one they are looking at. ## What a live LLM simulation actually costs https://jev-playgrounds.drummerduck.com/how-it-works/cost-of-a-simulation A Parlour party runs five or six minutes on roughly 250–300 evaluation calls of about 3,000 input tokens each, which is three to four cents. Every watcher of a room shares one party, so the bill does not grow with the audience. - **A live party:** ~250–300 calls, ≈3–4¢ - **Per call:** ~3,000 input tokens, input-billed only - **Headless dry-run:** 146 calls, ≈1.8¢ - **The village:** ≈£0.40 an hour at full tilt - **Cost per extra watcher:** zero ### Why the audience is free A room is [one party held in server memory](/how-it-works/server-authoritative) and streamed to everyone looking at it. The model is paid for once per beat however many people are watching, so the marginal cost of a watcher is a socket. That is a design decision with teeth. It is why the site can be public with no login, and why the app is [pinned to one replica](/how-it-works/one-replica). ### Where the tokens go Almost all of it is input. Each call sends one character's view of the room (their condition, who is reachable, what they have seen, the arithmetic) and gets back nine scored answers, which is a trivial payload. Jev bills input only, so the cost is essentially *how much state you show, times how often you ask*. Both of those are the tuning dials. Asking more people more often is the expensive direction, which is why the [village budgets its brain](/how-it-works/budgeted-brain) instead of asking four hundred people anything. ### Putting it on screen The running total sits on the party UI like a buy-in. A cost you can watch accumulate is an honest thing to show, and in practice it is the best argument that the simulation is small: a night out for eight people, for the price of nothing. ## Two guard rails on a public LLM toy https://jev-playgrounds.drummerduck.com/how-it-works/spend-cap Nothing ticks in a room nobody has opened. A party already under way plays to its end and then stops. A rolling hourly cap drops a room to the house brain past a fixed dollar figure. - **Idle rooms:** never start - **Abandoned party:** finishes, then stops - **Worst case for walking away:** the rest of one party (~3¢) - **Hourly cap:** PARLOUR_MAX_USD_PER_HOUR, default $2, per room - **Past the cap:** house brain, and the room says so ### Watcher-started, not watcher-stopped `shouldRun()` in `lib/sim/runtime.ts` says a room starts when somebody opens it and then finishes what it started. It deliberately does not stop when the last watcher leaves. Both halves earn their place. Starting on a watcher means an untouched room costs nothing at all. Refusing to stop mid-party means you can close the tab and come back to a night that went on without you, which is the difference between a simulation and a video, and it caps the downside at the rest of one party. ### The hourly cap `PARLOUR_MAX_USD_PER_HOUR`, default $2, limits live spend per room per rolling hour. Past it the room keeps playing on the [house brain](/how-it-works/house-brain) and puts that on the badge. Degrade, never stop. The budget is process-wide, which is what stops [resumed private parties](/how-it-works/party-files) multiplying it. Fork a party six times and you are still sharing one hour's allowance. ### Why not a login Because the costs really are this small and the sharing really is this good. An auth wall on something that costs three cents an hour to run buys nothing and loses everyone who would have stood in the corner for ninety seconds. # The mechanics Trust, heat and standing; alliances that pay; a betrayal bar that was measured; and the rules that overrule the model. ## Personality as arithmetic, not flavour text https://jev-playgrounds.drummerduck.com/how-it-works/personality-rigs A character in Parlour is a class, meaning what they are allowed to do, plus a rig of code-level modifiers: prices halved or raised, moves forbidden, confidence floors, effects that bounce. No character has a personality paragraph. The tempting way to make eight agents different is eight prompts. It does not work: they converge, because they are one model reading eight adjectives. The rig does it in the engine instead, where the difference cannot be talked out of. ### The live rigs | Guest | Rig, in code | | --- | --- | | Cass | `approach_host` costs half; `withdraw` costs 1.6× | | Nyx | ignores her own reads below **0.72** confidence; cannot court or ally before beat **12** | | Bo | `expose` is forbidden; cannot betray an alliance he still half-trusts | | Vera | flattery ×2 on the host, ×0.5 on Bo; incoming `expose` mostly bounces | | Jules | `gossip` at 0.4× cost, and it splashes back on him | | Dex | confidence floor 0, and spends 1.6× whatever the move needed | | Odile *(The Cut)* | whipping drags other people's ballots onto hers | | Rue *(The Cut)* | her ballot is overwritten by whoever is currently safest | | Quill *(The Cut)* | `whip_votes`, `leak` and `undercut` forbidden, all night | ### Read them as sentences Every line above is a person. Cass finds the host easy and being alone expensive, so she is always at the centre and burns out. Nyx will not act on a hunch she does not believe, and spends the first half of the night committing to nobody. Dex acts on anything and pays double for it. None of that was written as a trait. It falls out of prices and gates, which means it holds under pressure. A character cannot decide to stop being themselves on beat 14, because the arithmetic is not theirs to change. ### The tuning rule If a character is not landing, if Nyx is not scary or Jules is noise instead of a problem, change the rig and the resolution rules. Do not write a longer prompt. The prompt is nine fixed questions and it is not where the character lives. When a rig overrules what the model said, the board says so in amber. See [coercion](/how-it-works/coercion). ## coerce(): when the code overrules the model https://jev-playgrounds.drummerduck.com/how-it-works/coercion coerce() is the last word on every decision. It drops forbidden actions, enforces gates and confidence floors, refuses moves the character cannot afford, and puts every override on screen in amber. The model answers; `coerce()` decides whether that answer survives contact with the rules. It sits between the call and the effect, and everything it changes is recorded instead of swallowed. ### What it checks - Forbidden actions. A class rig may simply not have a move: Bo cannot expose, and Quill cannot whip, leak or undercut. - Gates. A move may be locked until a beat (Nyx before 12) or by state. - Confidence floors. Below a character's floor, their own read does not count and they fall back. - Empty tanks. You cannot spend energy you do not have, and a rig may have made the move cost more than it looks. - Targets. The target must still be reachable and still in play by the time the answer lands. ### Overrides are the show, not the plumbing "The code overruled the model" is the most interesting event on the screen, so the guest's board prints it in amber: what was chosen, what happened instead, and which rule did it. A simulation that hides its overrides is asking to be taken on trust. It is also how a watcher learns the rules without reading any. Watch Nyx's reads get thrown away three times and you have learned her floor. ### Why not constrain the prompt instead Partly because it is not reliable, and partly because the override is worth having. A prompt that forbids a move produces a model that mostly avoids it. A rule that forbids a move produces a character who *wanted to* and could not, which is both more interesting and more legible. The legal option set is narrowed [before the call too](/how-it-works/typed-questions). Coercion catches what remains: state that moved while the call was in flight, and anything the rig prices out. ## The betrayal bar, measured rather than guessed https://jev-playgrounds.drummerduck.com/how-it-works/betrayal-threshold An alliance dies when the model's P(better off without them) clears a bar: 0.42 in the pair rooms, 0.45 in the crew room. Both numbers came from asking the same question across a ladder of situations and putting the bar in the gap. - **BETRAY_THRESHOLD:** 0.42 - **The Syndicate:** 0.45 - **WRECKED_TRUST:** 0.25 - **A bar that could never fire:** 0.72, on the first draft wording ### The pair-room ladder 0.42 sits in the gap between 0.29 and 0.50. It fires on an alliance that is genuinely over and never on one that is merely uncomfortable. | Situation | P(better off without them) | | --- | --- | | healthy alliance, early / late | 0.14 / 0.16 | | ally is already safe, trust intact | 0.19 | | cooling off | 0.29 | | strained, late | **0.52** | | wrecked, and the ally is already safe | **0.50** | ### The draft that never fired The first version asked whether the character would break the alliance *this beat*, and set the bar at 0.72. Breaking an alliance on any given beat really is rare, so that question tops out around 0.18. The bar was unreachable and no alliance ever died. The bug was in the question. ### A crew is a different question The Syndicate asks about a table instead of a person, and the first wording walked into the same wall from the other side. "Would you walk out now, with a cut off the people you leave" answered 0.20–0.25 in *every* situation, healthy or wrecked. What separates is asking whether this is the wrong table to be sitting at when the cage counts, with [the arithmetic](/how-it-works/prompt-state) in the state: | Situation | P(wrong table) | | --- | --- | | crew of 3, early, trust 0.6, biggest in the room | 0.30 | | crew of 6, mid, thin share but still winning | 0.32 | | crew of 3, beat before the last count, ahead | 0.33 | | crew of 5, late, a rival crew has grown past yours | **0.52** | | crew of 2, late, trust 0.12, wrecked | **0.58** | ### The rule you take away A different question is a different scale, so the bar belongs to the room through `betrayBar(spec)` and not to the concept. Strip the arithmetic block out of the state and that same question flattens to 0.39–0.43 whether the crew is winning or losing, which makes the separation a property of what the character can see rather than of the phrasing alone. ## Trust, heat and standing https://jev-playgrounds.drummerduck.com/how-it-works/trust Three quantities carry the politics. Trust is private and pairwise, heat is how much attention is on you, standing is what the room thinks of you, and only trust can buy an alliance. ### The three | | Who holds it | What moves it | What it buys | | --- | --- | --- | --- | | trust | a pair, privately | time spent together, favours, betrayals | the only road to an alliance | | heat | one person, publicly | loud moves, being exposed, being talked about | visibility, good or fatal by room | | standing | one person, publicly | toasts, refusals, being seen to win | how seriously a move of yours lands | ### Trust is slow and asymmetric It drifts upward between people who stand together, which makes proximity a strategy. It is pairwise and not symmetric: you can be working someone who is not working you. Below `WRECKED_TRUST` (0.25) a relationship is functionally over, and the [betrayal question](/how-it-works/betrayal-threshold) usually agrees shortly after. Because trust is private it never appears in anybody else's [state object](/how-it-works/prompt-state). A character reads the room for it the same way you would. ### Heat is the room's attention, and it cuts both ways On the rooftop, heat is how a host notices you. In the writers' room, heat is how you get named on a ballot. Same quantity, opposite sign, which is the cleanest demonstration that [the incentive lives in the room and not the engine](/how-it-works/rooms-are-data). Heat cools on beat boundaries, so a loud move is loud for a while and then is not. Spending your own heat is what makes `expose` a real decision instead of a free attack. ### Standing is what a refusal costs Being turned down in public costs standing per witness. That is why [a refusal is an event](/how-it-works/refusals) and not a null result, and why somebody still standing in a fresh no is the easy target everyone notices you taking. ## Blocs and crews: two shapes of alliance https://jev-playgrounds.drummerduck.com/how-it-works/blocs-and-crews In the pair rooms an alliance is two people who share heat and cover each other. In The Syndicate it is a crew of any size that splits a pot evenly, which turns every recruitment into a maths problem. ### A bloc is a pair On the rooftop and in the writers' room an alliance is `allyId`: one other person. You share heat, you cover each other when you are not in the room, and you split the odds on the prize. It only takes if they already trust you, and [being turned down is public](/how-it-works/refusals). A pair is a side deal. It helps, and the room is winnable without one. ### A crew is the whole game The Syndicate makes the alliance the only route to money. The cage pays the **biggest crew** at each of three counts and splits it **evenly** between everyone in it, so a person sitting alone is paid nothing at all. The target, then, is *the smallest crew that is still the biggest*, and every social move becomes arithmetic with a face on it. You grow a crew by pulling people in, shrink somebody else's by prising a member loose, and [take chips off the people you walk out on](/how-it-works/walking-out). ### Merging Recruiting somebody who already has a crew folds the two together, up to [the cap](/how-it-works/crew-cap). Anyone whose class will not sit at a table that size stays behind. That is how a two becomes a five, and why The Counter, who will not sit in a crew bigger than four, walks out of a merge that suited everybody else. `MIN_CREW` is 2. A crew that drops below it is a person standing on their own again. ### Cold asks fail `wouldJoin` reads what the two have actually seen of each other, so you cannot ask a stranger across the floor to sit with you. Standing next to them for one beat fixes it. That single rule turns small talk from a nicety into a precondition, and it is why `make_rounds`, the one action with no target, which warms everyone standing there, does more work than anything else in the room. ## Why a crew may only lead by one https://jev-playgrounds.drummerduck.com/how-it-works/crew-cap crewCap() stops a crew recruiting once it is two clear of the field, because without it the room finds a dull equilibrium where eleven people sit together, win every count, and each take ten chips. - **Cap:** one clear of the field - **Without it:** eleven-person crew, ten chips each - **Pot:** 300 chips over three counts An even split plus a biggest-crew payout has an obvious dominant strategy: everybody joins one crew, that crew wins every count, and the pot divides into nothing. It is stable, it is rational, and it is unwatchable. ### The rule A crew may only grow to one clear of the field, so recruiting stops when you already lead by two. Enforced in `crewCap()`, checked on every recruit and every merge. That keeps the room permanently near the interesting point. Your lead is always thin enough that one poach flips it, and your share is always thin enough that one more member is a real cost. ### What it does to the texture - Recruiting has an opportunity cost: every seat you fill is a slice off your own share. - A fat crew is the easiest to poach from. The person holding a thin share can see it is thin, and so can everyone else. - The last count pays everything still on the table, so the night ends with a reason to re-cut the room too late for anybody to answer it. ### The general point Interesting behaviour out of language-model agents is mostly a payout-rule problem. This room got interesting when the payout rule changed, not when the characters were described more vividly. If a simulation is flat, [tighten the prize](/how-it-works/rooms-are-data) before you touch the prompt. ## Skim, settle, cooldown: making betrayal cost something https://jev-playgrounds.drummerduck.com/how-it-works/walking-out Walking out of a crew takes about fourteen chips off the people you leave, cannot be done to anyone you sat down with in the last two beats, and cannot be done twice within five. Together those put betrayal on a specific beat. - **SKIM:** 14 chips, off the people you leave - **SETTLE_BEATS:** 2, so you cannot walk on people you just sat down with - **WALK_COOLDOWN:** 5 beats - **Best moment:** the beat before a count ### Skim gives betrayal a clock Walking takes chips off the crew you leave. Because the cage pays at fixed counts, the value of doing that peaks on the beat immediately before one, which converts an abstract question (*should I betray these people*) into a concrete one (*is it now*). Timing pressure is what a simulation of scheming needs and what most of them lack. The tension is never whether somebody is loyal. It is whether this is the beat. ### The two brakes, and why they exist `SETTLE_BEATS` (2) stops you walking out on people you sat down with two beats ago. `WALK_COOLDOWN` (5) stops anybody doing it twice in a row. Both are there because of what happens without them. One walkout wrecks a crew's trust; wrecked trust clears the [betrayal bar](/how-it-works/betrayal-threshold) for everyone else in that crew; and the night collapses into churn, with constant motion, no drama, and nobody ever having sat anywhere long enough for leaving to mean something. ### A general lesson about cascades The bar was not wrong. The bar was right and the *feedback loop* around it was unbounded: an event that lowers everybody's trust makes the same event more likely for everybody. Any threshold whose input it also moves needs a damper, and a settle plus a cooldown is the cheapest one that reads as a social rule instead of a rate limit. ## A refusal is an event https://jev-playgrounds.drummerduck.com/how-it-works/refusals When somebody is turned down in public it costs them standing for every witness, warm people move toward them and cold people away, the room can see it on them for two beats, and the ticker names the rule that said no. - **AWKWARD_BEATS:** 2, which is how long it shows - **Cost:** standing, per witness - **Undercut on the awkward:** half again as effective The easy implementation of a failed ask is nothing: the action does not fire, the beat passes. That is a bug in disguise. In a room, being turned down in front of people is one of the loudest things that can happen to you. ### What embarrass() does - Standing is lost **per witness**. The same refusal in an empty corner barely registers. - Warm bystanders move toward you and cold ones move away. A refusal sorts the room. - For `AWKWARD_BEATS` (2) the room can see it on you, and `isAwkward` is readable by the rules. - Somebody standing in a fresh no is half again as easy to knife, and everybody warm in earshot notices that you took the easy target. ### Say which rule said no `whyRefused()` prints the actual reason on the ticker: *Bel has barely said two words to Mara all night.* The specific rule, not a generic failure. Every one of those lines is a rule you can watch working, which is how a watcher learns that [cold asks fail](/how-it-works/blocs-and-crews) without anybody explaining it. Explainability here is the content, not a debugging feature bolted on. ### The general version Give every failure a social consequence and a stated cause. A simulation where nothing happens on failure teaches its watchers nothing and gives its characters no reason to be careful. ## Rooms are data, physics is code https://jev-playgrounds.drummerduck.com/how-it-works/rooms-are-data A room is a plain RoomSpec: cast, personality rigs, locations, an action menu, two room-specific questions, ticker templates. Adding one should mean adding one file and never touching the engine. ### The split | Data (a room) | Code (the engine) | | --- | --- | | who is here, and their rigs | what trust, heat and standing do | | where they can stand | how proximity moves trust | | what moves exist, and their prices | what each move *kind* actually does | | the two room questions | coercion, resolution, the betrayal bar's shape | | how the ticker phrases things | what the ticker is told about | ### Every action declares a kind An action in the menu names an engine `ActionKind`. The Syndicate's `pull_in` and a pair room's `lock_alliance` are different words, prices and blurbs over different kinds, and neither room contains any behaviour. If a new room needs something genuinely new, add a new `ActionKind` to the engine instead of a special case on a room id. There is a hard version of this rule: no `if (room === ...)` in the engine, and no engine constant hardcoded into a component. ### The room has to explain itself `RoomSpec.objective` carries the game in plain English: the prize, who decides, what winning and losing look like, the badge for somebody safe, the badge for somebody out, and three how-to-watch lines. The engine never reads a word of it, and the UI reads nothing else. That matters because the rooms are mirror images. Being tapped is the win on the rooftop; being named is the loss in the writers' room. No generic phrase is correct in both, so any hardcoded "eliminated" in a component is a bug waiting for the next room. ### The three shapes so far A fourth room has to be a fourth shape. Another room where peers vote somebody out is a reskin, and reskins are how a data-driven engine stops being one. | Room | Who decides | Selection | Alliances are | | --- | --- | --- | --- | | Midnight List | an outsider, from outside the politics | `tap`, positive, visibility wins | a pair | | The Syndicate | the cage, by crew size | `crew`, positive, and split | a crew | | The Cut *(archived)* | the room, by ballot | `ballot`, negative, visibility kills | a pair | ## Tap, ballot, count: three ways a room decides https://jev-playgrounds.drummerduck.com/how-it-works/selection-rules One engine runs positive selection by an outsider, negative selection by the room itself, and payment by coalition size. Which one a room uses inverts what every other rule in it is worth. ### Tap, in Midnight List An outsider, the host, taps three of eight people for the afterparty at beats 10, 16 and 20. Positive selection from outside the politics: nobody in the room has a vote, so alliances are only ever leverage on visibility. The taps are spread across the night instead of saved for the end, so an early tap takes you out of danger for the rest of it. That creates a class of people who are already safe and now merely useful, which is where half the room's cruelty comes from. ### Ballot, in The Cut (archived) Seven writers, two chairs, and the room votes somebody off every fourth beat: 4, 8, 12, 16, 20. Negative selection from inside, so the same visibility that wins on the rooftop is what gets you named here, and every alliance is a vote you are trying not to be the target of. It is archived instead of deleted, still watchable at its URL and still in the test matrix, because "peers vote you out" turned out to be a narrower room than "alliances are the whole game". ### Count, in The Syndicate Nobody is ever removed. Twelve players, 300 chips, and three counts at beats 8, 16 and 24, where the cage pays the biggest crew and splits it evenly. You leave with whatever is in front of you, and only the three biggest piles walk out ahead, so a crew that shared everything four ways finds that out at last call. Removing elimination entirely is what let [alliance size become the mechanic](/how-it-works/crew-cap). Once nobody can be thrown out, the only question left is who you are sitting with and how many ways the money has to go. ### The lesson You do not need different rules to get a different simulation. You need a different way of choosing a winner. Trust, heat, standing, rumours and betrayal are shared verbatim across all three rooms; invert the selection and every one of them means something else. ## Two clocks: real time, not turns https://jev-playgrounds.drummerduck.com/how-it-works/real-time-not-turns Characters act on their own clocks. Each one wakes when its cadence comes round, makes its call, and moves the instant the answer lands, while the slow physics and the room's decisions run on beat boundaries. - **Per-character cadence:** ~5 s for the impulsive, ~11 s for the patient - **Loop:** 200 ms - **A party:** 20 beats over five minutes; 24 over six in the crew room - **Room decisions:** on beat boundaries only ### The fast clock belongs to the characters `runtime.ts` wakes each person when their `nextDecisionAt` arrives, makes their evaluation call, and applies the move the moment it returns. The next look is booked `cadenceMs` later, stretched by patience and shortened by nerve, so the tempo of the room is itself a personality output and not a scheduler setting. Nobody waits for a turn. You watch somebody cross the roof to the host while two other people are mid-conversation, which is the difference between a party and a board game. ### The slow clock belongs to the room `advanceClock` moves the party clock and runs the slow physics on beat boundaries: heat cooling, energy returning, trust drifting between people standing together. It also fires the tap, the ballot or the count on the beats the room decides on. A beat is fifteen seconds, and a party is twenty of them, or twenty-four in the crew room, which needs the extra night to grow a crew and lose it. The room's pause when it decides is the only beat a watcher ever sees, and it is deliberately visible. ### Real time means staggered, not per-frame This is the distinction that keeps getting lost. "Real time" here means characters are *staggered*: each acts when their own read returns. It does not mean the physics runs every frame. Every tuned number in the engine (decay, regen, trust drift) is per beat, and moving any of them onto a frame clock would retune the whole simulation without telling you. ### Why the headless path still exists `resolveTick`, where everybody decides and one beat passes, is kept for the tests and the [terminal dry-run](/how-it-works/headless-dry-run), and is built on the same two primitives. A rule that works headless works live, which is the only reason it is safe to tune the simulation without a browser open. ## What a beat is https://jev-playgrounds.drummerduck.com/how-it-works/beats A beat is the simulation's unit of slow time, fifteen seconds of wall clock and twenty or twenty-four to a party. It is the only moment at which heat cools, energy returns, trust drifts and a room makes a decision. - **A beat:** 15 seconds - **A party:** 20 beats / 5 min, or 24 / 6 in the Syndicate - **Taps (Midnight):** beats 10, 16, 20 - **Ballot (The Cut):** beats 4, 8, 12, 16, 20 - **Counts (Syndicate):** beats 8, 16, 24 ### What only happens on a beat - Heat cools and energy comes back. - Trust drifts between people who have been standing together. - Awkwardness expires (`AWKWARD_BEATS`), cooldowns tick down (`WALK_COOLDOWN`), settle periods elapse (`SETTLE_BEATS`). - The room decides: a tap, a ballot, a count. ### What does not wait for one Actions. Somebody whose [cadence](/how-it-works/real-time-not-turns) comes round mid-beat acts mid-beat. Beats are a physics schedule, not a turn order. ### Beats are how the rules address time Every gate in the system is written in beats: *Nyx cannot ally before beat 12*, *the taps land at 10, 16 and 20*, *you cannot walk out on people you sat down with two beats ago*. That is what makes rigs and rules portable between the live room and the headless dry-run, where a beat is an iteration. It also gives a watcher something to count. "Next tap 2:14" is a deadline, and a deadline is most of what makes the last three beats of a party worth staying for. # The village Four hundred people, one closed economy, a brain you have to ration, and every way a village has starved. ## A closed medieval economy, in real time https://jev-playgrounds.drummerduck.com/how-it-works/village-economy 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. - **Population:** ~440 across two villages - **A day:** 8 real minutes (3 sim-minutes a second) - **A season:** 3 days; a year, 12 - **Sunday:** every sixth day - **Wage:** 4 a day; household credit 50 ### The chain closes Fields grow through spring and summer and are cut in autumn. The mill turns grain to flour and the bakehouse flour to bread. The butcher takes animals off the pastures, the brewer makes the ale the inn sells, woodcutters keep the bakehouse and every hearth going, the smithy makes the tools the fields wear out, and wool becomes cloth becomes clothes. Nothing is spawned. If the millers spend the afternoon at the inn there is no flour tomorrow and the bread runs out the day after, which is how the first live run produced eleven thousand grain sitting in a market with no bread in it. ### Money is real and scarce Producers sell into a market with floating prices. Households shop daily against a purse and a tab. Labour is paid a daily wage. The reeve taxes, keeps a storehouse, and levies a due on hoarded coin; the church tithes the harvest and feeds the poor from the door. The awkward rules are the interesting ones. A market float and a credit line exist because a perfectly closed economy deadlocks the first time coin pools in producer households: everybody has goods, nobody can buy. The clerk can open the storehouse over the reeve's head if the market goes bare, because one bad decision by one notable should not starve a village. ### Hunger is meant to be visible The founding stock is a few days' worth, not a fortnight's. Fishers and woodcutters bring in less than they used to, bakers get less loaf per sack, and people eat more. Vegetables and meat spoil in the market. Three [chaos years](/how-it-works/chaos-brain) now cost about fifty hunger deaths across two villages that still grow. A lean spring should show up in the bars and not be a curiosity you have to go looking for. ### The village notices shortages Hands go where the gap is. A fourteen-year-old is apprenticed to the thinnest trade, a dead miller's place is filled, and each day the essential trades (mill, bakehouse, butcher, wood, brew, fish, wheat) are topped up from labourers and from whatever trade is least needed. The trades that keep the village fed cannot take the afternoon off while it is short. ## Four hundred agents, a few dozen guts https://jev-playgrounds.drummerduck.com/how-it-works/budgeted-brain 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. - **People:** ~440 - **People the model is asked about:** ~30 on a cadence, plus anyone in a real bind - **Hard cap:** 2 calls a second, whole valley - **Cost:** ≈£0.40 an hour at full tilt Giving four hundred people a language model each is not expensive so much as pointless. Most of what a villager does on most days is not a decision at all. It is a trade, a route and a meal, and code does that better, faster and for nothing. ### Who gets asked - Notables, on a cadence: the reeve (tax, the storehouse), the priest (alms, the sermon), the constable (patrol, arrest, look away), the innkeeper (the price of an evening), the master carpenter (repair or build), the masters of each trade, and a score of household heads, a few times a day each. - Anyone at all, in a bind: when the larder is empty and somebody is hungry, *would you break the law tonight if it fed the house* is a calibrated probability, and `coerceVillager` holds it to a bar. ### The rule that keeps it honest Do not "upgrade" this by asking the model about more people. The whole design claim is that four hundred people is a few dozen guts. The model is spent where a judgement changes the day, and everywhere else the economy runs itself. The rationing is a cap and not a hope: never more than two calls a second across the entire valley, whatever is happening. A famine and a fire on the same afternoon do not produce a bill. ### Where the leverage is A reeve's tax decision moves every purse in a village. A constable deciding to look away moves a family's whole year. Those calls are worth paying for. A shepherd choosing which pasture is not, and if the model were asked, the shepherd would answer indistinguishably from the code. ## Calibrating against a chaos brain https://jev-playgrounds.drummerduck.com/how-it-works/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](/how-it-works/calibration) instead of guessing it, applied to an economy instead of a probability. ## Households, marriage, birth and death https://jev-playgrounds.drummerduck.com/how-it-works/households-and-lineage The household is the unit. Everyone has parents, children, a surname, a purse and a larder; people court, marry, take a house, have twins or triplets, feud, sicken, are jailed, die, and are buried in the churchyard their kin visit on Sundays. ### Courting and marrying The unmarried take an interest in someone, walk out with them, and marry. The bride takes the name, and the couple take a free house or move in with family. Courtship prefers people you already [know](/how-it-works/ties), which is why the washing stones and the inn are where the village's futures are decided. Marriages grow or sour with the household's fortunes, and a bad one ends. There is no event table behind that. It is the household's ledger read back as a relationship. ### Growing up in stages Portions follow the stage, which sounds like a detail until children's portions are given children's satiety and a generation starves without anybody noticing. - An infant stays home and keeps its mother there half the day for a year. - A child sits lessons with the clerk one morning in three, goes to church on Sunday, and otherwise plays: a favourite spot in the morning, home for a meal, and the game in the afternoon. - Which children a child runs with is not drawn out of a hat. Every village has six crews, and a child belongs to the one their own corner of the village belongs to, for years at a time. Each afternoon the two crews with the worst blood between them take the field as captains and the other four pick the captain they mind least, so this week's ally is often last week's bloody nose. - A scrap hardens the feud between two crews, and the crews with a feud going are the ones who end up in front of each other. A feud hot enough stops being a game: the whole of one lane goes at the whole of the other, several children are carried home, the parents take it up at their own doors, and then it is spent for a while. The ties keep the damage after the feud has cooled. Some of it still ends in friends across the line. - A youth helps at a parent's bench in the mornings. - At fourteen the village puts them to the thinnest trade. ### Arms, and the flag on the square Every village bears arms, and the shield is a claim about the place rather than a pattern: the charge is counted off the trades its people are in and the landmarks it has, so a valley that fishes bears a fish and a valley that ploughs bears a garb. The tinctures follow the rule of tincture, colour on metal and metal on colour, which is the reason a shield can be read from the other end of a field and the reason the banner can be read from the far bank. The banner is a job, not a prop. The crews take the pole a day each, and the eldest child of the crew on duty walks out at seven to raise it and back at dusk to bring it in. What happens instead is the interesting half: a famine or a sick crew leaves the pole bare all day, a burial drops the flag to half, and a crew with real blood against the crew on duty will run the banner down in the middle of the afternoon, which costs everybody ties and sends somebody back out to put it up again. ### Violence and its memory Drink and temper start it at the inn. Grudges keep it going, families inherit it, and the constable's posture decides who gets taken up. A killing is rare and never forgotten: it stays in the ties and in the lineage, and somebody's grandchild still will not sit at that table. ### The register, which outlives everyone in it Somebody who dies is taken out of the world, because a corpse that still walks to market is worse than no corpse at all. Their lineage is not taken out with them. The moment before the villager goes, their parents, their marriages, their children and which generation they are get copied into the parish register, and every question about kin in the valley reads the living, the ones who walked up the road and the dead as one list. That is the difference between a village with a family tree and a village with a list of who is in the house tonight. A grandmother buried two winters ago is still why two people are cousins, still the name at the top of a sheet, and still a stone you can click on. So the sheets say it properly. A house names whose child each person under the roof is, who they are married to and on what day, who is widowed of whom, and how many generations are sleeping in it. The families panel holds every surname in the valley as a tree, and it is one line long on the first morning and four generations deep a week later. ### Where they lie A grave has an address: the churchyard, a row and a plot, eight stones to a row, filled in the order people die. The stone is on the map and it can be clicked, so a name on somebody's sheet takes you to the grave, and the grave says who is still alive to visit it. The yard only changes when somebody is buried, so the stones are not on the wire four times a second. A frame carries a number that moves at a burial, and the browser fetches the yard again when it does. That is the same trick the wood uses, and it is what lets a valley run for a week with thousands of graves in it. ### Why lineage is worth the bookkeeping Because it is where stories come from for free. A household you clicked on twenty minutes ago is now two households. The boy who lost a fight in the summer is the smith's apprentice by winter. The graves on the Sunday hill have names you recognise. None of it is authored. It is a population model, kept honest, and left alone long enough. ## Land, building, and a house that grows https://jev-playgrounds.drummerduck.com/how-it-works/land-and-houses The village sells parcels along its lanes, and the ones nearer the green cost more. A family that buys one marks out a site the yard raises, walls first and roof at thirty timber and five stone, from hovel to house to second storey to manor. ### Households outnumber houses, on purpose A family doubled up under someone else's roof is the usual buyer, and that pressure is what makes the land market move. The yard builds when families are doubled up, mends ruins first, and raises the houses people have paid to improve. The rich buy a second parcel because they can. A household in debt sells its spare land back. Wealth shows on the map as space. ### A house is so many doors, not so much floor Every house holds a number of dwellings: one for a hovel or a house, two for a second storey, three for a manor, and as many as it was built with for a row or a tenement. Five souls to a dwelling before it is crowded, and crowding costs mood, sleep and health. That makes upgrading a house an act of housing rather than of vanity: the day the yard finishes a second storey, the worst-housed family in the village moves into it. And when the lanes near the green are full the village stops building out and starts building up, which is the only answer to a yard of seven carpenters that cannot raise nine cottages a year. A shortage is measured in households against doors, never in people against floor space. The second measure said the valley was housed while fifteen families were doubled up, because it counted the spare room in a rich family's new storey as housing for a family who were not in it. ### A tier-0 building is not a ruin This is the sharpest edge in the village code. A newly marked-out plot is a `Building` at tier 0, with walls not yet up. If the yard's ruin filter includes it, the yard repairs sites forever and finishes none: seventy-four sites, zero finished houses, found by running it rather than by reading it. `yardTask` excludes tier 0 from the ruin filter and must keep doing so. It is a good example of a bug that is invisible in review and obvious in a ledger. ### Fire A spark from a crowded hearth, or [the crowd's choice](/how-it-works/crowd-vote), spreads through thatch and is fought with buckets by whoever is near. Fire is one of the few events that can undo an hour of a family's fortunes in a minute, which is what makes the yard's queue a tense object. ### The bridge Nobody can order a bridge. It needs people on each bank who know people on the other, two reeves who will sign, and a bill of timber and stone that two villages can only spare a few units of a day, and any of it can be taken away again. Goods cross before it stands, because a river is dear carriage rather than a wall. On a day the river is up, whoever carries and can swim goes over with a pack on their back, two units at a time, and about one pack in five ends up down the river instead. A raft works the ford on a fair day and carries about two dozen. A hard winter freezes the river and sledges do better again. The bridge carries two hundred and seventy-five a day, every day, loses nothing and pays no ferryman. Somebody has to load it, whichever way it goes, so a bank with nobody at the stables and nobody titled carter sells nothing however dear it is over the water. And the packs the river takes are the argument: each one is made by the person who lost it rather than by a reeve. Whether the ford is passable is the river's height rather than the day's weather. Rain and storms put water in it, the spring melt keeps it up, and it falls away over the following days, faster when it is full. So a storm shuts the crossing for about three days and not for one, a wet fortnight is a wet fortnight, and a summer river is genuinely low. That memory is the difference between a valley that wants a bridge and a valley that is unlucky on Tuesdays. That ledger is the seed of trade, and of war. Every person, building and stockpile carries a `villageId`, and a village already has `relations`, `militia` and a `tradeLedger`, so a second bank is an addition and not a rewrite. ## The fever, and how it gets about https://jev-playgrounds.drummerduck.com/how-it-works/the-fever A fever is caught rather than rolled: it passes between people in the same place in the same hour, harder under a roof and harder again in a crowded one. Strangers carry it up the road, and a reeve can shut the square against it. ### It is caught, not rolled The old rule was a flat chance an hour against nothing. Nobody caught anything from anybody, which is the one thing about illness in a village of four hundred worth simulating at all. Now it passes between people who share a place for an hour, and where they are decides how much: a house is worse than a lane, and a crowded house is worse again. What is left of the flat roll is bad water from a fouled well, which genuinely does come out of nowhere. ### The tenement cuts both ways A six-door tenement is how a village houses forty families, and it is also the best thing that ever happened to a fever. The room built to solve one problem is the room that gives it to six families in a night. That is the point of building it into the housing rules rather than beside them. A reeve who builds up gets a housed village and a more dangerous one, and neither half is a dial you can turn without the other. ### It comes up the road Strangers are the only thing that enters the valley from outside, and how many come is renown, recomputed daily from bread, ale, mood and hunger. A village worth visiting gets visited by whatever is going round, so a good year is what buys a bad one. ### What a village can do, and what it costs Everybody with somebody ill under their roof can sit up with them, which helps them and is how you catch it. Anybody can shut their own door and go nowhere. A reeve with enough of the village down can shut the square, take a barn for the sick and pay two to sit with them, or shut the bridge. None of it is free. The square is the only thing in the valley that turns strangers into acquaintances, so a month of quarantine buys a healthier, lonelier village, and a shut square is shut to the market and the fair as well. The rules refuse a reeve who wants to shut a square over one sick child. ### Measured, not guessed Over five years on three seeds: eight to eleven in bed on an ordinary day across both villages, a bad visitation peaking at twenty-odd, one or two of them named, and twenty-seven to fifty-three buried with it. Set `NO_PLAGUE=1` to run the valley without it and read the difference, which is how those numbers were got. The first draft killed a hundred and sixty in the same span and had twenty-eight people in bed every day of five years. Nobody works from a sick bed, so it starved the valley as well: hunger deaths went from twenty-five to eighty-seven. Every number it runs on is a lever in one block at the top of `plague.ts`. ## Who knows whom, cheaply https://jev-playgrounds.drummerduck.com/how-it-works/ties Every relationship is one number in a capped per-person map, written at midnight from the day's company: an evening at the same table, a shift at the same bench, a pew, a basket at the door, a fist. None of it is ever sent over the wire. A social graph over four hundred people is a hundred and sixty thousand potential edges. Storing that per-person and streaming it would dominate both the memory and the frame, for information almost nobody looks at. ### The cheap version - One number per pair, not an object. - A capped map per person, so a villager remembers the people who matter and forgets the rest, which is also true of villagers. - Written once at midnight from the day's company, not on every interaction. - Never sent in frames. The sheet endpoint labels a person's ties when you open them, and only then. - Kin and spouses are not in it at all. Those come from the lineage, which is authoritative. ### What the numbers buy Strangers have no entry, and that absence is load-bearing. One evening in five a person calls on a friend's hearth instead of the inn, help goes to friends first, and courtship prefers people you already know. A person's sheet reads their circle back as words: spouse, kin, sweetheart, friend, colleague, acquaintance, bad blood, enemy. It is also how a childhood scrap turns into a grudge two decades later without anyone modelling grudges. ### The general point Social memory is the part of an agent simulation that looks like it needs a database and does not. A capped integer map, written on a schedule and queried on demand, gets you nearly all of the behaviour for nearly none of the cost. ## The crowd's hand https://jev-playgrounds.drummerduck.com/how-it-works/crowd-vote Every ninety seconds watchers are offered three things that could happen next: a fire at a named house, twins for a woman who is carrying, wolves, damp in the grain, soft rain, a pedlar, a feast. The one they pick happens. - **Interval:** 90 seconds - **Options:** 3, named at real people and real houses - **Load:** ~5 events a game day ### Named, not generic The options point at things you can see: *a fire at the Ackleys' house*, *twins for Mildred Shaw*, *damp in the grain*. A named consequence is a different object from a generic one, because it lands on a family whose purse and larder you could have opened a minute ago. ### Keep the effects small One round every ninety seconds is about five events a game day, which is a real and constant load on the economy. Anything added to the pool happens *often*. So effects stay small, and good luck stays in the pool alongside the bad. A pool of disasters flattens a valley in a year; the crowd's storms alone once knocked a tenth off every roof in the place. ### Why a vote and not a button Because the village is [one shared world](/how-it-works/server-authoritative), the same way a room is one shared party. A per-watcher button would need a per-watcher village. A vote is the only interaction that fits a simulation everybody is looking at at once, and it makes the audience one more source of pressure the economy has to survive. ## The camera has an opinion https://jev-playgrounds.drummerduck.com/how-it-works/valley-director When you are not touching the camera, it cuts to the loudest thing in the valley: a fire, a drowning, a wedding on the move, a fight, a child at the pole. The first drag hands it back, and twelve seconds of stillness gives it to the camera again. - **First cut:** 5 seconds - **Hands back after:** 12 seconds - **Alarms shown:** 4 The valley is seven hundred units across. A fire, a funeral, a child in the river, a mill jammed, a house going up: all of those already happen, and they used to land in a ticker you had to be reading. The director points the camera. ### A shot is a state, not a line of text The list is read off the frame the scene is already drawing. A roof alight, a procession walking, a party in the water, people fighting, a child on the way to the pole. A drowning that has just happened stays as long as it is still in the event window. Ranked, worst first, so the four buttons on the left and the idle cut are the same list. ### Yield on the first drag A camera that keeps taking the shot back is the most irritating thing a live simulation can do. Touch the canvas, the wheel, WASD, an alarm, or follow somebody, and it stops. After twelve seconds of stillness it takes the current top shot again. A fire beats a wedding the moment the roof catches; a walking procession keeps the camera because the shot is the row from this frame, not the one from when it started. ### The buttons are still there Pressing an alarm is the same circle the director would have done, except you chose it. `WarAlert` is the other half and deliberately different: a declaration is a moment and goes away, a fire is a state and stands while the roof is alight. # The build One world in memory, streamed; 3D that never feeds back; save files that are untrusted input; a year in a second. ## One party in memory, streamed to everyone https://jev-playgrounds.drummerduck.com/how-it-works/server-authoritative A room is a single party held in server memory and streamed to every watcher, so everybody sees the same betrayal at the same moment and the model is paid for once per beat however many people are looking. The alternative, a simulation per visitor, is the default shape for an AI toy and it is wrong for this one twice over. It multiplies the bill by the audience, and it destroys the only thing that makes a simulation worth watching with other people: that it is the same one. ### What follows from it - Cost is flat in the audience. The marginal watcher is a socket. See [cost](/how-it-works/cost-of-a-simulation). - One replica, always. Two replicas is one URL serving two different parties. See [one replica](/how-it-works/one-replica). - No database. State lives in memory and dies with the process, deliberately. What deserves to outlive a process is [a file you saved](/how-it-works/party-files). - Rooms start on a watcher. Nothing ticks in a room nobody has opened, and a party under way finishes anyway. ### The server owns everything The server never sends positions. It says where each person is, as a zone, and what they are doing, and the browser walks the figure there. Nothing in the rendering layer may feed back into the simulation except a click to select somebody. That line is not architectural fastidiousness. Positions computed in a browser are per-watcher, and the moment any of them matters to the simulation you have as many parties as tabs. ### You can walk away Close the tab mid-party and the night plays on without you. Come back and you have missed something, exactly as you would have. A simulation that pauses when unobserved is a recording with extra steps. ## Server-sent events for a live simulation https://jev-playgrounds.drummerduck.com/how-it-works/sse Simulation frames go out over server-sent events, which are one-way, plain HTTP and reconnecting for free, because nothing a watcher does needs a socket and the little that does is an ordinary POST. - **Transport:** SSE, one direction - **Rooms:** broadcast no faster than every 250 ms - **Village:** a compact frame 4× a second - **On the wire:** the last 48 ticker lines, not the whole log ### Why not websockets The traffic is almost entirely one-way. The server has news; the watcher has almost nothing to say. A watcher's whole input surface is picking a room, toggling detail, clicking a person, and [voting in the village](/how-it-works/crowd-vote), all of which are fine as ordinary requests. In exchange, SSE gives you reconnection semantics for free, no upgrade handshake, no sticky-session thinking, and a stream you can read with `curl` while debugging. ### Frames are cheap on purpose The log the engine keeps is capped at four thousand events so that a [saved party](/how-it-works/party-files) is a complete transcript, but only the last forty-eight lines ever go over the wire. Broadcasts coalesce to no more than one every 250 ms even when several people act in the same instant. The village sends a compact positional frame four times a second and the browser interpolates. The roster, which is every person as a sortable table, is a separate endpoint polled only while it is open, because most watchers never open it. ### Make the clock survive a lumpy connection `lib/clock.ts` extrapolates the party clock between frames from the last server value and wall time. Without it a slow connection reads as people teleporting; with it, it reads as people walking and a countdown that keeps counting. That is the general trick for a streamed simulation: send the truth rarely, and let the client be confidently wrong about the microseconds. ### Keep proxies off it Every `/api/*` response carries `X-Robots-Tag: noindex`, and the stream must not be buffered or cached by anything in front of it. A CDN that helpfully buffers an event stream turns a live room into a two-minute-old room, which is worse than an error because it looks like it is working. ## The 3D layer never feeds back https://jev-playgrounds.drummerduck.com/how-it-works/presentation-only-3d The browser receives zones and activities and decides everything about bodies: where they walk, which way they face, what gesture they make. Nothing in the rendering layer may write back to the simulation except a click to select. ### The contract The server says: this person is at the railing, doing `gossip`, aimed at that person. The browser walks the figure there at walking pace, turns it to face its target, and drifts it while it stands. If the renderer needs to know something, that something goes in the world state and not into a variable in a component. ### One gesture per action kind `POSES` maps every engine `ActionKind` to a gesture. An offer is an open hand, a rumour is a hand at the mouth, a toast raises a glass, a refusal leaves you with your arms down. Add an `ActionKind`, add a pose: the map is exhaustive on purpose, so a new rule cannot be invisible. ### Focus: the last loud public thing Set once per snapshot instead of per frame. Everyone near it turns their head, a shock ring runs across the floor, and the camera eases onto it and pushes in, then hands control straight back the moment you touch anything. A camera that keeps taking the shot back is the most irritating thing a live simulation can do. Yield on first input, always. The [valley director](/how-it-works/valley-director) is the same rule at a different scale: cut to the loudest thing while the watcher is idle, drop it on the first drag. ### Furniture `LocationSpec.standOff` is how far back people stand in a zone with something in the middle of it. Without it, the room stands on the card table, which is the kind of bug that makes a scene read as tokens instead of people and costs nothing to fix once you know the zone has a shape. ## Drawing four hundred people https://jev-playgrounds.drummerduck.com/how-it-works/instanced-crowds The valley is a handful of instanced meshes, three for people and five for houses by tier and one for trees, with frustum culling off, world-sized bounding spheres set once, and clicks landing on invisible fat capsules. ### Three gotchas, each found by a screenshot - Frustum culling must be off. An `InstancedMesh` keeps its base geometry's tiny bounding sphere at the origin, so once the river leaves the view three.js culls the entire mesh and everybody loses their bodies. - Set a world-sized `boundingSphere` once. Otherwise the mesh computes its sphere from wherever the instances happened to be on the first raycast and never again, and clicks miss after people move with nothing to show for it. - Pick with fat invisible capsules. Raycasting thin bodies and heads means a click that misses by two pixels selects nothing, in a scene where everything is moving. ### Nothing is fetched No models, no textures, no fonts on the critical path. Geometry is primitives and everything else is computed, which keeps the Docker build hermetic and means the valley renders on a cold cache in one round trip. A sun that is a function of the hour, windows that come on at dusk, fields that turn gold in autumn and white in snow, a mill wheel that turns, fires that flicker: all of it is arithmetic over the frame, not assets. ### The crowd is jostled, not carried Nobody walks the exact centreline. Each person keeps their own side of the lane, a stable offset from their id, at their own pace, and a separation pass nudges anyone standing closer than a shoulder's width. Doors gather a loose knot instead of a queue. People who have stopped are leashed to where they stopped. Without the leash, a baker at a busy door was shoved two hundred units across the river over one day, could not path home, and starved beside a full larder. If somebody is ever a long way from their village, the leash is what broke. ## Saving a party as one file https://jev-playgrounds.drummerduck.com/how-it-works/party-files Save writes the whole night, full world state plus every ticker line with timestamps, as a single JSON document that reads as a transcript in any editor. Resume picks the night back up at exactly that beat. - **One file:** world + complete event log - **Log cap:** 4,000 events (the wire only carries 48) - **Resumes live at:** /rooms/?party= - **Concurrent forks:** 6, LRU-evicted when idle ### Saving changes nothing Save downloads the file and the room carries on. There is no pause, no mode and no ownership. The party is not yours; you took a copy of it. The event log is capped generously so that the file is a complete record. It is the one place the full log matters, since the stream never carries more than the last forty-eight lines. ### A resumed party never touches the public room Resume loads the file into its own private runner keyed `"::"`, living at `?party=`. Share the link and other people watch that one with you; resume the same file twice and you join the same private party instead of forking again. Forks are capped at six and evicted least-recently-used once they are not busy, and the [hourly spend budget is process-wide](/how-it-works/spend-cap), so forking cannot multiply the cap. A link to a party that has since been evicted lands you in the public room instead of nowhere. ### It is a transcript as well as a save Because the log carries timestamps and plain lines, the file reads top to bottom as an account of the night in any text editor. That makes it the natural artefact to send somebody: not a screenshot of a simulation, the simulation. ``` curl -O -J localhost:4712/api/rooms/midnight/export curl -X POST --data-binary @midnight-beat12.parlour.json \ -H 'content-type: application/json' \ localhost:4712/api/rooms/midnight/resume # -> { url } ``` ## A save file is untrusted input https://jev-playgrounds.drummerduck.com/how-it-works/untrusted-input parseParty rebuilds the world from createWorld and overlays only recognised fields, clamped, with every id checked against the room's own cast, locations, masks and actions. A hand-edited file may make a strange party but never a broken one. A save file is a document a stranger can write. Treating it as a state object to be assigned is how a toy acquires a crash, or worse, an id that points somewhere the engine assumed it could not. ### Rebuild, then overlay The reader never hydrates the incoming object. It calls `createWorld` for the room, producing a world that is valid by construction, and then copies in only the fields it recognises: numbers clamped to their ranges, ids checked against the room's own cast, locations, masks and action menu, references dropped instead of trusted. Anything unknown is discarded. Anything out of range is clamped rather than rejected, because the goal is a playable party and refusing a file for a trust value of 1.3 helps nobody. ### Strange is fine, broken is not A hand-edited file that gives everybody maximum standing is a legitimate thing to want, and it plays. A file naming a guest who does not exist in that room never reaches the engine at all. There is a test that edits a file on purpose. It is the only real way to be sure the reader is still a reader and has not become an assignment. ### The general rule Any state you let a user hand back to you is input, no matter that you wrote it five minutes earlier. Build the valid object yourself and let the document *influence* it. Never let the document *be* it. ## Playing a whole world in the terminal https://jev-playgrounds.drummerduck.com/how-it-works/headless-dry-run 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. - **A party:** bun scripts/dry-run.ts syndicate - **Reproducible:** SEED=7 plays the same party every time - **A village year:** bun scripts/village-dry-run.ts, under a second - **Three years:** DAYS=36 ### Same primitives, not a second implementation `resolveTick`, where everybody decides and one beat passes, is built on the same two primitives the [live loop](/how-it-works/real-time-not-turns) uses. That is what makes headless play trustworthy: there is no separate test engine to drift out of sync with the real one. Seeded and on the [house brain](/how-it-works/house-brain), a dry-run is deterministic, which is what lets the rules be tested as rules instead of as smoke. ### What it makes possible - Tuning without paying. Iterate on a rig or a threshold for free, then spend three cents confirming it live. - Reading the ledger. The village run prints day by day, so you can change a rate, play a year, and look at deaths-by-cause before trusting it. - Adversarial play. `BRAIN=chaos` is only practical because a year takes a second. See [the chaos brain](/how-it-works/chaos-brain). - A regression net. Any rule you would be annoyed to see break has a test, and the test is the simulation being played. ### Why a second is the important number A year that takes a second is something you run mid-thought. A year that takes a minute is something you run before committing, which means most of the tuning happens without it, which means the rate you changed on a hunch stays changed. Speed of the feedback loop is a design constraint on the simulation itself, not a developer nicety. ## Why this app is pinned to one replica https://jev-playgrounds.drummerduck.com/how-it-works/one-replica The party lives in server memory and every watcher of a room shares it, so two replicas means one URL serving two different parties. railway.json pins numReplicas to 1 as a correctness constraint, not a cost saving. Horizontal scaling is the reflex, and here it is a bug. Two instances behind one hostname is two simulations: half the audience watches one betrayal and half watches a different one, and neither half can tell. ### It is a constraint you buy something with In exchange for not scaling out, the whole design gets simple. No database, no coordination, no state machine spread over a cache, no sticky sessions. [One party in memory](/how-it-works/server-authoritative), streamed. That is worth more than an axis of scaling this app does not need, and since the [cost is flat in the audience](/how-it-works/cost-of-a-simulation), the pressure to add instances never arrives from the bill. If it ever does need to scale, the answer is a room per process addressed by routing, not replicas behind a load balancer. ### Write the constraint down where it is enforced `numReplicas: 1` lives in the deploy config with a comment, the rule is in the repo's own guidance, and the reason is on a page like this one. A single-instance requirement that only exists as a number in a dashboard survives about one incident. ### Deploy notes Git-driven only: push to the default branch and let the trigger deploy. A manual CLI deploy reaches production without being on the branch, so the next automatic deploy reverts it. One more sharp edge, specific to Railway: the config-as-code path resolves from the repository root, so a monorepo app needs `apps//railway.json` even when the service's root directory is already `apps/`. Getting that wrong kills the deploy in about five seconds with `Snapshot code: service config not found`. # Building one The transferable half: why prompted characters converge, what to do when a simulation is flat, and what to build before you write a prompt at all. ## Building an LLM simulation, in order https://jev-playgrounds.drummerduck.com/how-it-works/building-an-llm-simulation Write the resolution rules before you write a prompt. Build a world that plays without a model at all, replace the decision function with one, and measure every threshold against what the model actually returns. - **Step 1:** rules that play headless - **Step 2:** a typed decision function - **Step 3:** measure the thresholds - **Step 4:** make it watchable The order matters more than any individual choice, because the wrong order produces a system whose behaviour nobody can explain, including the person who wrote it. ### 1. Make it play with no model Write the world, the actions and the resolution rules first, and drive them with a deterministic heuristic. If it is not interesting with a [house brain](/how-it-works/house-brain), a model will not save it. It will only make the flatness harder to see, because a language model's output is fluent enough to be mistaken for content. Keep that heuristic forever. It is your test harness, your offline mode and your control group. ### 2. Replace only the decision The model should answer *what does this person do* and nothing else. It should not narrate, resolve, move anything or see the rules. Everything that happens stays in one file you can read. Ask in [typed questions](/how-it-works/typed-questions) built from the legal moves, so an illegal action is absent instead of forbidden, and there is no free text to parse or police. ### 3. Measure before you tune Every threshold you put on a model's answer needs [a ladder](/how-it-works/calibration): the same question across six or eight hand-built situations, with the bar placed in the gap between the ones that should differ. A bar chosen by intuition usually sits somewhere the model never goes. This project shipped one at 0.72 against a question that tops out at 0.18, and no alliance ever died. Anything with an economy gets the same treatment by [playing it headless](/how-it-works/headless-dry-run): a year in a second, then read the ledger. ### 4. Then make it watchable A simulation nobody can read is a log file. [Show the machine](/how-it-works/showing-the-machine), meaning the near-misses, the overrides and the cost, and give the room [a deadline](/how-it-works/what-makes-it-watchable) so that something is always about to happen. ### What to skip - A database, until state has to outlive a process. This one has none; a night you want to keep is [a file](/how-it-works/party-files). - Memory systems, until a fixed state object demonstrably is not enough. See [generative agents](/how-it-works/generative-agents). - More agents. Four hundred people needed [about thirty guts](/how-it-works/budgeted-brain), and the rest is code and is better for it. ## Why eight prompted agents behave like one https://jev-playgrounds.drummerduck.com/how-it-works/why-agents-converge Characters written as prompts converge because they are one model reading eight adjectives. Differences that survive contact with a situation have to live in the rules, in prices and gates and floors, and not in description. Give a model eight personality paragraphs and you get eight voices and one behaviour. They will phrase things differently and choose the same move, because the situation dominates the adjective, and because a model asked to be bold is being asked to perform boldness rather than pay for it. ### What survives a situation Arithmetic does. If approaching the host costs one character half what it costs everybody else, that character is at the centre of the room all night whether or not they feel bold. If another cannot act on a read below 0.72 confidence, they spend the first half of the night committing to nobody, and you can watch them throw their own hunches away. Those are [personality rigs](/how-it-works/personality-rigs), and each is one line of code. None of them is a description, so none of them can be talked out of. ### Three shapes of rig that work | Shape | Example | Reads as | | --- | --- | --- | | a price | `withdraw` costs 1.6× | somebody who cannot be alone | | a gate | cannot ally before beat 12 | somebody who commits late | | a floor | ignores own reads below 0.72 | somebody who doubts themselves | ### Let the override show A rule that rewrites a decision without saying so makes a character look inconsistent. A rule that rewrites a decision and says so makes them legible: the board prints what was chosen, what happened instead, and which rule did it. Watch somebody's reads get thrown away three times and you have learned who they are without reading a word of description. See [coercion](/how-it-works/coercion). ### The general form Personality is a distribution over *costs*, not over words. Anything you want a character to be reliably, put in the budget. Anything you are content to have them merely say, leave to the model. ## Memory-stream agents and fixed decision heads https://jev-playgrounds.drummerduck.com/how-it-works/generative-agents Generative-agent designs give each character a memory stream with retrieval, reflection and planning. Parlour gives everyone the same nine questions over a purpose-built state object, which is cheaper, steadier and less ambitious. ### Two different jobs Memory-stream agents are built to be *believable over time*. A character accumulates observations, retrieves the relevant ones, reflects on them into higher-level beliefs, and plans a day. That is the right architecture when the thing you are studying is whether an agent can sustain a coherent life. Parlour is built to make a room legible in five minutes. Nobody needs to remember last Tuesday; they need to read the table they are sitting at right now. So there is no memory stream. Each call is a fresh look at a [state object](/how-it-works/prompt-state) written from one person's side of the room, and the continuity lives in the world instead of in the character's head. ### What each buys and costs | | Memory stream | Fixed decision head | | --- | --- | --- | | Continuity | in the agent | in the world state | | Calls per decision | several (retrieve, reflect, plan, act) | one | | Output | text, then parsed | typed answers with distributions | | Tunable by | prompt and retrieval weights | prices, gates, thresholds | | Fails as | drift, contradiction, expensive silence | flatness, if the rules are flat | ### Why this one went the other way Because the interesting object here is the rule, not the agent. If a character betrays somebody, a watcher should be able to answer which rule fired and on what number, and that is only answerable if the decision is one typed call with a [measured bar](/how-it-works/betrayal-threshold) behind it. It is also what makes the thing affordable enough to leave running in public: [three cents a party](/how-it-works/cost-of-a-simulation), and [four hundred villagers on about thirty guts](/how-it-works/budgeted-brain). ### When to reach for the other one If your simulation's payoff is long-horizon, with an agent that should remember a grudge from six sessions ago or plan a week, a state object will not carry it and you want retrieval. The village splits the difference: relationships are [one number per pair](/how-it-works/ties), written by the day's company, which is memory enough for a grudge without being a memory system. ## When it is boring, change the payout https://jev-playgrounds.drummerduck.com/how-it-works/when-a-simulation-is-boring A flat simulation is almost always a flat incentive. Tighten the prize, cap the dominant strategy, and give betrayal a deadline. The room here only became interesting when its payout rule changed. The instinct when characters are dull is to describe them more vividly. It does not work, and it is expensive. The three fixes that have worked here are all changes to what winning is. ### Tighten the prize Three invitations for eight people is a fight. Eight invitations for eight people is a party. Scarcity is the only thing making any of the social machinery matter, and halving the prize is a one-line change with more effect than any amount of characterisation. ### Cap the dominant strategy, do not hope it is not found Pay the biggest coalition and split evenly, and everyone joins one coalition. Stable, rational, unwatchable. The fix is [a cap](/how-it-works/crew-cap): a crew may only grow to one clear of the field, which keeps the room permanently near the point where one defection flips it. Assume the dominant strategy will be found. Language models are not clever, but a room full of them will fall into an equilibrium as reliably as water finds a drain. ### Give betrayal a moment Abstract betrayal is a mood. Betrayal that is worth fourteen chips only on the beat before a count is a decision with a clock on it. Add [a settle period and a cooldown](/how-it-works/walking-out) so one defection cannot cascade into churn, and the night gets a shape. ### What not to do - Do not write a longer prompt. It is the most expensive way to change nothing. - Do not add objectives such as jobs, romances or hunger meters on top of a thin prize. More things to want is not more tension; it is a Sims clone with a bigger bill. - Do not raise the temperature. Noise is not drama. It is a character who does not mean anything they do. ## Put the machine on screen https://jev-playgrounds.drummerduck.com/how-it-works/showing-the-machine An AI product that hides its workings is asking to be taken on trust. This one shows the runners-up on every decision, every rule that overruled the model, which brain is answering, and what the session has cost so far. There is a standard way to present a model's output, confidently and as a finished thing, and it is the wrong one for anything a person is supposed to reason about. Four things are on screen here that usually are not. ### The near-miss `approach_host 0.71 · hold_court 0.25 · withdraw 0.02`. An almost-did you can see, taken straight from the [distribution](/how-it-works/probability-distributions) instead of from a model's account of itself. It is the difference between watching somebody decide and watching a token move. ### The override, in amber Every time a rule overrules the model, the board says which rule and what it changed. Most systems treat that as plumbing and hide it. Here it is the most interesting thing on the screen, because it is the only place where the two halves of the system disagree in public. ### Which brain is answering Live model or [house brain](/how-it-works/house-brain), on a badge, always. A product that degrades to a heuristic without saying so is lying by omission, and the fallback is much less embarrassing than the concealment would be. ### What it has cost A running total, like a buy-in. It makes the [economics](/how-it-works/cost-of-a-simulation) an argument instead of a claim, and it teaches a watcher how small this kind of system can be. ### The rule behind all four Show the thing that would embarrass you slightly. The near-miss, the override, the fallback and the bill are each a small admission, and together they are the reason a watcher can believe the parts that are impressive. ## What makes a simulation worth watching https://jev-playgrounds.drummerduck.com/how-it-works/what-makes-it-watchable One shared world instead of a private instance, a visible deadline so something is always about to happen, rules you can learn by watching them fire, and permission to walk away and come back to a story that carried on. ### One world, not one per visitor Everybody watching a room sees the same betrayal at the same moment. That is what makes it worth telling someone about, and it is also what makes it cheap, since [the model is paid for once per beat](/how-it-works/server-authoritative) however many people are looking. A private instance per visitor costs more and is worth less. ### A deadline, always visible "Next tap 2:14." A countdown to a decision is most of what makes the last three beats of a party worth staying for, and it is why the room's [decision moments](/how-it-works/selection-rules) sit on fixed beats instead of being triggered by state. Something is always about to happen, and you can see how long you have to wait. ### Rules you learn by watching Every failure states its cause, as in *Bel has barely said two words to Mara all night*, so a watcher learns that [cold asks fail](/how-it-works/refusals) without anyone explaining it. A rule you discover by seeing it fire is a rule you remember. A rule in a help panel is not. ### Let people leave A room nobody has opened never starts, but a party already under way [plays to its end](/how-it-works/spend-cap) with an empty tab. Close it, come back, and you have missed something, which is the difference between a simulation and a recording and costs at most the rest of one party. ### Two ways to watch The party, or the party with its machinery beside it. Anything a first-time watcher needs, meaning the prize, who decides and what winning and losing look like, is in both. Probabilities, distributions and costs sit behind full detail. One product, two audiences, no second app. # Glossary https://jev-playgrounds.drummerduck.com/glossary - **Action kind**: The engine-level verb behind a room's action. Two rooms can name and price the same kind differently; only the kind has behaviour. (https://jev-playgrounds.drummerduck.com/how-it-works/rooms-are-data) - **Beat**: The unit of slow time: fifteen seconds, twenty or twenty-four to a party. Heat cools, energy returns, trust drifts and the room decides, only ever on a beat. (https://jev-playgrounds.drummerduck.com/how-it-works/beats) - **Betrayal bar**: The probability above which an alliance dies. 0.42 in the pair rooms, 0.45 in the crew room, both measured against the exact wording used. (https://jev-playgrounds.drummerduck.com/how-it-works/betrayal-threshold) - **Bloc**: A two-person alliance: shared heat, mutual cover, split odds on the prize. Only forms if the other person already trusts you. (https://jev-playgrounds.drummerduck.com/how-it-works/blocs-and-crews) - **Brain**: Whatever answers the nine questions: the model, the deterministic house brain, or the chaos brain in village testing. (https://jev-playgrounds.drummerduck.com/how-it-works/house-brain) - **Brain board**: The full-detail panel showing each of the nine answers with its distribution, plus anything the code overruled. - **Cadence**: How often one character consults their gut, roughly five seconds for the impulsive and eleven for the patient. A personality output, not a scheduler setting. (https://jev-playgrounds.drummerduck.com/how-it-works/real-time-not-turns) - **Chaos brain**: A village test brain that answers every question at random. If two villages cannot survive three years of it, a real model will kill them. (https://jev-playgrounds.drummerduck.com/how-it-works/chaos-brain) - **Class**: What a character is allowed to do. Paired with a rig, it is the whole of their personality. (https://jev-playgrounds.drummerduck.com/how-it-works/personality-rigs) - **Coercion**: The pass that decides whether the model's answer survives the rules: forbidden moves, gates, confidence floors, empty tanks. Every override is shown. (https://jev-playgrounds.drummerduck.com/how-it-works/coercion) - **Confidence**: The probability mass on the move a character picked. A measurement, not a self-report. (https://jev-playgrounds.drummerduck.com/how-it-works/probability-distributions) - **Count**: One of three moments in The Syndicate when the cage pays the biggest crew and splits it evenly. The last count pays everything left. (https://jev-playgrounds.drummerduck.com/how-it-works/selection-rules) - **Crew**: An alliance of any size in The Syndicate. The only route to being paid, and capped at one clear of the field. (https://jev-playgrounds.drummerduck.com/how-it-works/crew-cap) - **Crew cap**: A crew may only grow to one clear of the field, so recruiting stops at a lead of two. Without it the room settles into eleven people and ten chips each. (https://jev-playgrounds.drummerduck.com/how-it-works/crew-cap) - **Detail**: The watch mode. Basic is the party; full detail puts the machine on screen beside it. Remembered per browser. - **Director**: The idle camera in the valley. It cuts to the loudest thing happening and hands control back the moment you touch anything. (https://jev-playgrounds.drummerduck.com/how-it-works/valley-director) - **Evaluation model**: A model that answers typed questions about one shared state in a single call, each answer a probability distribution. (https://jev-playgrounds.drummerduck.com/how-it-works/evaluation-model) - **Focus**: The last loud public thing. Heads turn toward it, a ring runs across the floor, and the camera eases onto it until you touch anything. (https://jev-playgrounds.drummerduck.com/how-it-works/presentation-only-3d) - **Heat**: How much of the room's attention is on you. On the rooftop it is how the host notices you; in the writers' room it is how you get named. (https://jev-playgrounds.drummerduck.com/how-it-works/trust) - **House brain**: A deterministic personality heuristic that answers the same nine questions with synthesised distributions, so the site runs with no key at all. (https://jev-playgrounds.drummerduck.com/how-it-works/house-brain) - **Jev**: typesafe-ai/jev, the evaluation model Parlour runs on. Billed on input tokens only. (https://jev-playgrounds.drummerduck.com/how-it-works/jev) - **Mask**: The face a character wears while acting: warm, sharp, mysterious, useful, wounded. A room declares its own set. - **Notable**: A villager whose judgement moves other people's days (the reeve, the priest, the constable, the masters), and therefore one the model is asked about on a cadence. (https://jev-playgrounds.drummerduck.com/how-it-works/budgeted-brain) - **Objective**: The room's rules in plain English, carried in the RoomSpec. The engine never reads it; the UI reads nothing else. (https://jev-playgrounds.drummerduck.com/how-it-works/rooms-are-data) - **Party file**: One JSON document holding the whole night, world plus complete event log, that reads as a transcript and can be resumed. (https://jev-playgrounds.drummerduck.com/how-it-works/party-files) - **Pose**: The gesture a body makes for an action kind: an open hand for an offer, a hand at the mouth for a rumour. One per kind, exhaustively. (https://jev-playgrounds.drummerduck.com/how-it-works/presentation-only-3d) - **Rig**: A character's arithmetic: prices halved or raised, moves forbidden, gates by beat, a confidence floor. Never a paragraph of description. (https://jev-playgrounds.drummerduck.com/how-it-works/personality-rigs) - **RoomSpec**: A room as plain data: cast, rigs, locations, action menu, two room questions, ticker templates. (https://jev-playgrounds.drummerduck.com/how-it-works/rooms-are-data) - **Selection**: How a room chooses. Tap (positive, from outside), ballot (negative, from inside), or count (payment by coalition size). (https://jev-playgrounds.drummerduck.com/how-it-works/selection-rules) - **Skim**: The fourteen chips walking out takes off the people you leave. Worth most on the beat before a count. (https://jev-playgrounds.drummerduck.com/how-it-works/walking-out) - **Standing**: What the room thinks of you. Lost per witness when you are turned down in public. (https://jev-playgrounds.drummerduck.com/how-it-works/refusals) - **Stand-off**: How far back people stand in a zone with furniture in the middle. Without it the room stands on the card table. (https://jev-playgrounds.drummerduck.com/how-it-works/presentation-only-3d) - **Tap**: The host's choice of somebody for the afterparty, at beats 10, 16 and 20. Positive selection from outside the politics. (https://jev-playgrounds.drummerduck.com/how-it-works/selection-rules) - **Ticker**: The line-by-line account of the night. Templates filled by the engine, never written by the model. - **Tie**: One number recording how well two villagers know each other, written at midnight by the day's company and never sent in frames. (https://jev-playgrounds.drummerduck.com/how-it-works/ties) - **Trust**: A private, pairwise, asymmetric quantity. The only road to an alliance. Below 0.25 a relationship is functionally over. (https://jev-playgrounds.drummerduck.com/how-it-works/trust) - **Village day**: Eight real minutes. Three days to a season, twelve to a year, so winter comes every twelve days. (https://jev-playgrounds.drummerduck.com/how-it-works/village-economy) - **Yard**: The village's building crew. Mends ruins first, then doubled-up families, then upgrades, and must never treat an unbuilt site as a ruin. (https://jev-playgrounds.drummerduck.com/how-it-works/land-and-houses)