# Lab A game at `lab.html`, and the direction Misaligned is heading. You run an AI lab, and the lab harvests people's work to make its models better. The player should feel what is being taken: "I see what you are taking from me." It is long (5 to 10 hours, real time with pause, nearer Stellaris than an arcade game). It starts inside your own building, and the map opens as you grow: the city, then the region, then the world. Each zoom out is a new era. This file is the design as agreed with Cameron on 2026-10-14. Numbers live in code, not here. ## The core: cubes and topology - **Work comes as stacks of cubes.** Each piece of work is one capability, named like a file: `answer-complaint`, `bash-script`, `unit-tests`, `compassion`. Its **colour is the capability's family**, and its **complexity** (1 to 4) is how many cubes are stacked. Work never merges, even when two pieces look the same. - **Sources** emit work cubes: people, companies, and in era one your own lab's inboxes. **Pumps** pull cubes toward you. **Storage** holds them. **Sinks** digest them. A serving sink earns money and data; the training sink turns data into the next model. - **You place nodes; the links between them exist already.** A link carries so many cubes a second, whatever their size. A stack of four takes one slot, as a single cube does, but holds four steps of work. Tall stacks push more work through the same pipes, which is why you want them. - **Digesting** lifts one cube off a stack at a time. Each step succeeds with a chance set by your model's skill at that capability against its difficulty. A right step pays. Every step, right or wrong, drops a **raw data cube** as big as the stack was before the step. Hard work teaches more, and trials teach even when they fail. - **Data:** a reviewer grades a raw data cube into a **graded** one, which is worth more to training. Research makes grading better. - **Training** works as it does in Scaling. Data plus compute make the next model, and you **ship** it to put it to work. Shipping starts a new run, so each step costs more than the last. - **Saturation:** as your model nears certain at a capability, that capability's data stops teaching. This is what drives research, and why your own lab eventually "runs dry". - **Capabilities are a growing catalogue**, like Factorio's items. Researchers invent new ones from ones you have mastered. A new capability opens new internal work (playing tall) and new outside customers (playing wide). - **Data terms** are set at each pump: opt-in, opt-out buried in the terms, or scraping. They decide who will work with you and how much data you keep. People's stance on terms (open, careful, hostile) varies by place. ## People and talent - **A few humans stay in the loop**, as nodes: named reviewers and researchers whose work cannot be automated in era one. They are the scarcest thing you have. - **Talent:** you hire from a pool of about three candidates. Good reviewers raise quality, and good researchers invent capabilities faster. Later you can click any researcher on the map, see which lab they are at, and poach them. - **The staff look like Evil Genius minions**: small named characters with a role mark at their desks. This is tone only, with no needs or morale. - **Automating grading** comes after the first build, as a red, risky decision: `grading` becomes a capability, and you choose whether to automate your own checkers. ## The world, later - **Rival labs** are actors under the same rules as you. Every action is open to every lab, but a lab's style makes some actions cheaper. - **Styles** you can play: aggressive, careful (governance), research (Millennium), the slop monger, and later the AI itself. - **Names are fictional, but thinly veiled.** - **Victory paths:** - Market: most of the world's work. - Frontier: the best model. - Governance: you write the rules. - Domination: you absorb your rivals. - Tall: you build a deep lab and never sell. - **Sell, assist or take**, for each customer. Displacement is something you watch happen: George clears his desk. - **The late game is national warfare.** Governments run tasks of their own, and there is attack and defence, starting as skirmishes between labs. ## Where it stands `lab.html`, isometric 2.5D. Rules are in `rules.ts` (no DOM), drawing in `draw.ts`, and the page in `main.ts`. Tests are in `tests/lab.test.ts` and `e2e/lab.spec.ts`. `node scripts/lab-bot.ts 5` plays seeded games and prints the pace. Changed on 2026-10-15, after Cameron played: there is no internal inbox era and no launch gate. Work comes from real places from the first minute, and you lay out the lab yourself. - **Your floor** is an 18 × 12 grid with the training core in it. You start with the middle (9 × 8); the wings and corners around it are hatched and for lease. Tap one to lease it; each wing leased makes the next dearer. The east and west doors are on the far walls of their wings, so a company there needs its wing. - **Every block in the city is a company** (`city.ts`): thirteen at the start, each with its own work, people, busyness, tolerance for fear and price, and a door on the wall of your lab facing it. Lines run along the streets, so far companies cost more to lay a line to. Pier 9 Coworking is your first customer. - **The city grows** (changed 2026-10-16, so the race is not a land grab that ends at minute 30): seven empty lots line a new street at the south edge of town, drawn as bare ground. From about minute 9, every few minutes (longer gaps as they fill, shorter while the city spends more) a company opens on one, with its own block, people, work, price and a door on your south wall: - **People out of work start one together** ("Dale and Bea, out of work, start Tidewater Labs"): their names, their old work, small, and **wary of the lab that took their jobs** (it pays twice to sign them, and they start trusting it little). They are back at work, and the out-of-work list says what they started. - **An assisted company that grows** opens a second ("Gull Annex"), doing the same work, **friendly to the lab it grew beside** (cheaper for it, trusting from the start). - Otherwise, while the city is spending, **someone new opens in town** (a brewery, a games studio, a clinic...). The three take turns, so the edge of town is not all startups. New companies go up over a few seconds with their founders' names over the roof. Rivals sign them under the same rules, and sooner while one is open. They add to the city's work, so the market's half moves as the city grows. Each game keeps its own city (`useCity` in `rules.ts`), saved with it. With the city growing, `node scripts/lab-bot.ts 6 table` against the three rivals: the mixed player wins 18 of 18 in 21 to 38 minutes; Assist 17 and opt-out 12 (mostly the frontier, 32 to 50 minutes); Take 13; Sell 9; Scrape 6, all late frontier sprints (39 to 57 minutes) on the least money and the most fear. Rivals win the market less often than in the fixed city, so more games run on into the frontier race. - **The region, locked:** once you have signed about a third of the city's work (or a race is over), a road appears at the west end of the north street with a barrier and a lock. Tap it: "Era three: the region. Not built yet." - **Rivals** (`rival.ts`): one or two labs, each with a campus at the east edge of town and its own colour, playing by the same rules as you. A style is data (`STYLES`): the same moves with different weights, and its own short log lines. Each rolls its own dice, so which company it signs first, its pace and when it turns are different every game. New asks who you are up against (Overfit AI unless you pick; `?vs=phil`, `?vs=overfit,beta` or `?vs=two` in the address). - **Overfit AI** (magenta, aggressive): fast. Signs on Sell; every ten minutes or so (twice as often once it goes for the frontier) it takes a bold company's work and copies its archive, so the city fears it. A tower that grows with each model. - **Philanthropic** (blue, careful): slower. Signs on Assist and opt-in, so its companies trust it and grow, and never takes. It lobbies the council: each time the council steps in 5 fear sooner, scraping frightens the city more, and the council can act on a scraped company, not only a taken one. A stepped hall. - **Beta AI** (lime, the slop monger): signs cheap, serves fast and badly at rock-bottom prices, and courts your companies on Sell at a fraction of the usual price (Assist protects them). Each company it holds dirties the city's data: everyone's data teaches less, up to a quarter. A wide shed packed with racks, grey slop riding its lines. - Two rivals fight each other too: either can win the other's company under the same rules, and the council goes after whichever lab frightens it most. The bar stacks both rivals' work in their colours and shows the rival nearest the frontier; the panel has a section for each. - Old saves keep Overfit AI as their only rival. - A rival signs from the first minute, about one company every two or three minutes, and serves what it holds with some of its GPUs (the rest train). Your companies are on its list too: it courts them as keenly as its style does, most of all ones you serve badly or its model does better. - Any lab wins a company from another with a model clearly better at its work (1.2× the price), by outbidding (1.6×), or at the plain price if the holder took its people's jobs, lost its trust, or leaves half its work undone. A company that trusts its holder and is served well costs a quarter more. - Before a rival moves on one of your companies it courts it for a minute, on a toast and the company's card. Answer with a model better at their work, or pay to keep them for ten minutes; keeping does not hold a company whose work you leave half undone, or against a model clearly better at it. - Trust grows only with work you actually do, under every deal: work left undone wears it down, Assist too. - Fear has costs for whichever lab causes it: people hide their work (it teaches less), investors pay less for a model, careful companies will not deal, and deals cost more. When fear passes 40 (less once Philanthropic lobbies), the city council says which taken company it will make hire its people back, and 45 seconds later does it (naming what frightened it): that company drops the lab and will not deal with it for half an hour. Hire the people back yourself first and you keep the company. - With no company left for a minute, Pier 9 (or the cheapest company free) signs with you again for free; never one that just walked out on you. - **Deals with weight** (changed 2026-10-16, after play-test 3, so taking is a real temptation): - **Take** is strong now: all their work comes to you (half as much again, what their people did by hand) at twice the pay, and it counts fully toward the market. The price comes later: their people are out of work (fear; the other companies you work with trust you less; careful ones will not deal; the council), the company stops growing and after ten minutes winds down, and people out of work spend less, so every company in the city has less work (Scaling's demand: 1 + (0.5 × extra − 1 × out of work) / labour; Assist's growth is the extra). - **Opt-out and Scrape** wear trust by how careful the company is (the square of its tolerance): Pier 9 barely notices opt-out and puts up with scraping for five minutes; the vet walks out in under a minute. Work done builds trust under any terms, opt-in more. The door card says how long each would last. A company that walks out will not deal with you for half an hour. - **Assist** grows a company slowly to 1.25×, teaches a quarter more, pays 0.7, and its people's own work counts a quarter toward serving them (only beside yours). - **Displacement is witnessed:** the people whose jobs you take get up and walk out of their floor carrying a box, their names in red; on the city their names rise off the roof. The panel lists everyone out of work because of you (name, job, where, when; dim once hired back), and how many each rival put out of work. - **Offers** every two or three minutes from minute 3.5, in the hint line with a countdown and a ring on the company: a company that will try you at half price (with the wing for its door, in one tap), or a broker selling a company's records (data now, fear when it gets out, which fades over five minutes). - Investors pay more for each model (×1.12 a model), for rivals too. New companies have two and a half minutes' grace before undone work wears their trust. A door on a wing you have not leased is shut (it links to nothing; its card and label say so, and Sign offers "lease the wing and sign" in one tap); GPUs in a company's server room still serve it, and its door is not marked stuck. After the first race ends the other one still runs, with its own ending; the hint names the next goal. - The bot plays each deal style: `node scripts/lab-bot.ts 6 table overfit` (or `phil`, `beta`). Against the three rivals, 6 seeds each, the mixed player (`sensible`: Assist on careful companies, opt-out on bold ones, and takes bold companies' work while the city can bear it) won 18 of 18 in 25 to 40 minutes with 3 to 7 jobs taken; pure Sell, Assist, Take and Opt-out each won 12 to 14 (Take earns about twice as much, at fear around 45), and pure Scrape 1. - **The race:** do half the city's work (Market), or ship MW-12 before a rival ships its twelfth model (Frontier). The market counts the work each lab actually finished for its companies in the last minute or so, not signatures. The bar shows both from the start, with numbers and the goal: a tug of war for the city's work (yours, the rivals', goal 50%), and the two models toward the frontier model. A win or lose screen sums it up, and play goes on. The bot (`node scripts/lab-bot.ts 10 sensible overfit`, or `phil`, `beta`, `two`; add `-q` for less) wins 9 of 10 seeds against each single rival, in 31 to 50 minutes (the losses are a rival's frontier model or Beta's market), and 7 of 10 against two, in 34 to 49. Rivals win 4 to 10 of its companies over 10 games. Idle, `rush` and `assist` all lose. - **Building:** - Pick something in the build bar, then tap a cell (one placement per pick; hold Shift to place more): a GPU, storage, a support desk, a review desk or a research desk. GPUs cost more each time. - Drag across the floor to fill an area with what is picked (on a phone, hold still a moment, then drag; a plain drag still pans): a ghost on every spot that would get one, how many and what they cost, red past what you can pay for, and a red bolt on a GPU that would have no power. GPUs keep a cell clear of every other GPU, so they come out evenly spaced and cool; everything else fills every free cell. Let go to build them all at the prices you would pay by hand; Esc or a right-click lets the drag go. A drag of one cell is a tap. `fillPlan` and `fill` in `rules.ts`. - Keys: B then a letter picks from the build bar (the letter is on each button), arrows or W A S D pan, Space pauses, 0 to 3 set the speed, Esc lets go. - Things within 3 cells of each other link up on their own, along what can feed what: - work goes from a door to storage, GPUs and support desks, and from storage to GPUs and desks; - data goes from GPUs, desks and doors to review desks and the core, and from review desks to the core. - While you place something, its reach and the links it would make are drawn, so the layout is the puzzle. - The core sits one hop from the north door, so the opening is easy. The east door needs a relay (storage toward the core, or a review desk between its GPUs and the core); the west door needs a chain: storage by the door, GPUs past it, review desks near the core. - Work from a door or storage goes to the least busy GPU in reach. A serving GPU with no work coming in is dim, with an hourglass over it; its card shows how busy it has been in the last minute. - Tap anything built to change it or take it off the floor (half its price back). - **Power and heat** (`power.ts`): - GPUs need power. A Power unit runs 4 GPUs within 3 cells, and the building's mains (by the core) runs your first four. A GPU without power goes dark with a red bolt; when there is not enough, the newest goes dark first. - GPUs touching each other run hot and slow: a warm glow under them, slower the more touch. Cooling makes the GPUs touching it run at full speed. Spacing them out against packing them with Cooling is the layout choice. - Placing a GPU shows whether it would have power and how hot it would run, and whether it will serve or train; Serve and Train in the hint set it before you place it (unset, a GPU by the core with no work in reach trains). Placing Power shows its reach. - **Training:** GPUs set to Train within reach of the core build the next model. Their compute goes to the families whose data is furthest ahead of their compute (a family with no data gets none). Tap a family in the panel to pin it: it gets at least half. A thin line under each family's bars shows its share, amber when pinned. Data that reaches the core joins the dataset. Ship from the bar. - Each family has two bars toward its next step, data and compute, drawn in its colour on the tower, the Ship button, the panel and the core's card. Ship shows what investors pay; compute that shipping would spend for nothing is hatched grey ("spent if you ship"). - The first run is under way when you start, and a young model learns even from easy work (less after each ship), so a player who follows the first steps ships in about three minutes. - **People:** desks are empty until you hire for them. Letting someone go adds to the city's fear. New names come first; a name that comes back is the same person. With under half a minute of money left, the money pulses red and the hint points at the dearest desk. - **Review desks** grade one cube at a time and pass the rest on to the core ungraded, so a relay through one never jams the GPUs behind it; an empty review desk passes everything on. - **Late money:** a GPU upgrades twice (1.6× then 2.4× speed, $6k and $16k), and a faster GPU heats its neighbours more, so Cooling matters late. Keeping a company and hiring people back cost money too. - **Stuck:** a red mark sits on anything whose output has nowhere to go (a GPU whose data cannot reach review or the core, a door or storage whose work nothing takes, a GPU without power counting as nothing); its card says why. - **Companies:** each has its deal (sell, assist, take), data terms, trust, line (which you can widen), and a server room with sockets for your GPUs. City fear works as before: tolerance, dearer deals, and lost trust. - Their cards set your model against the rival's for each kind of their work (amber yours, each rival in its colour, the margin), and say which wing their door is on, with a button to lease it. A lease card lists every door on its wall. - In the city view a company you hold keeps its block and name, in amber, with a ring for its trust and its deal and terms. One a rival is courting gets a pulsing ring in that rival's colour, on the city and on its door, and its card and the hint count down to its try (`watch.ts` reads this off the rules). As fear nears the council's line the bar shows it; once the council has said what it will do, the bar counts down to it and the company it names gets a red ring. - **Research:** harder capabilities in a family, opened by mastering the one before. Companies whose work includes that family start asking for it. Tap options to queue them; Auto picks the cheapest when the queue is empty. Each shows what a right step pays, how much it teaches, and which companies send it. Idle researchers get an amber mark; with nothing to invent they draw no pay. - **Saves:** the game saves itself every few seconds and when you leave, and picks up where you left off (`save.ts`, versioned with a list of migrations). New in the bar starts over (tap twice); `?fresh` ignores the save. - **Feel** (`fx.ts`): money rises in amber where it is earned, a red cross marks a step that came out wrong, the core flashes as data arrives, a shipped model flashes and drains the tower with a chime, and a new company's door rings. Pops are throttled. Sound is on a toggle in the bar. - **First steps** (`guide.ts`): a short run of steps, each pointing at its target (a pulsing amber cell, a button) and done when you do it: a GPU on the marked cell (the only row that reaches both the north door and the core), another by the core set to Train, then Ship. Skippable. - **Words on the floor** (`draw.ts`) are put on top of everything at the end of a frame, most important first; one that would land on another or on a mark moves a little or, if minor, drops out. The page patches the panel and cards in place, so a button never vanishes under a tap. On a phone the hint sits under the bar, the panel or a card (one at a time) sits above the build bar, the camera comes in close enough that a cell is 36 px (on what you have built), the city view runs from your lab to the rivals' campuses, news sits above the build bar, and everything you tap is 44 px. - **Not yet:** - lab styles for you, and more rival styles (research); - the other victory paths (Governance, Domination, Tall).