Builderment is a factory game. You place extractors on ore, lay belts, feed furnaces and workshops, and deliver what they make to a research lab to unlock the next tier. The long goal is Earth Tokens. I wanted to see if Claude could get there.
It took three attempts and 128 saved worlds. The first Earth Token reached the labs on 21 November. For most of the way, Claude never touched the running game.
Attempt one: screenshots and clicks
The game runs on the Mac as an iPad app. It has no API, no URL scheme, and no debug console.
So the first player worked like a person. A script captured the game window, Claude looked at the screenshot, and cliclick performed the move. Claude built a layer under itself, the Foreman, that handled button positions, belt routing, and a guard against the in-game shop, all without using tokens. It also ran as an MCP server with 17 tools, and a SwiftUI Player app wrapped it all.
Haiku could not play; it broke the plank chain in the tutorial. Sonnet with vision finished the tutorial and unlocked smelting. But clicking was fragile. The first click after a focus change vanished, the game dropped fast clicks, and the quota ran out.
Attempt two: a headless server
I tried to run the game on my home server so the Mac would only watch. The Android emulator tops out at OpenGL ES 3.1, and the game needs 3.2. Android in Docker ran it, but every building rendered as an invisible shadow. Dead end.
Attempt three: the save file only
Then we drew a line. Claude works only through saved files:
- Never launch, click, type in or screenshot the game.
- Never overwrite the original world. Every change goes into a new copy, with a backup.
- Write only while the game is closed.
I load the world, play it, press Unlock on research, and close it again.
A save turned out to be readable. Every building is a 36-byte record: type, position, direction, tier, item, recipe, and pointers to its inventory. Research progress sits in its own section, with a count of each item delivered. The save stores items on belts by position, not by belt; that detail later made deletion possible.
Learning to build well
Gears pay for belt speed, so the first target was gears. The first design connected every iron deposit to one shared trunk. On paper it raised gears into the labs from about 110 to about 465 a minute. In the game it jammed.
World 5: ten extractors on one belt, ore piling up in front of too few furnaces.
I looked at it and told Claude the trick: connect exactly as many inputs as a unit can process, and use the highest tier of every unit. The next worlds became trees with fixed ratios. The ratios were right, but every branch went wherever there was room, and the result was a maze. I said an ideal build should look like an array of workshops and furnaces fed from neat belts, and fixed one corner by hand.
World 7: correct ratios, but a maze. My fix gave Claude a number the save could not: a tier-2 extractor makes about three times as much as a tier-1, so a tier-2 furnace takes two of them.
A neat layout needs empty ground, so Claude learned to delete. It removes a building’s record, shifts every pointer in the file to match, and clears items lying within half a tile. Then it deleted 5,136 buildings of old gear lines and rebuilt them as 25 identical array blocks: one straight ore bus, a splitter per column, a furnace on each side, a gear workshop behind each furnace, and a straight gear bus to the nearest lab.
Estimated gears per minute went from about 110 in World 4 to about 2,666 in World 10. Belt Speed IV, V and VI completed along the way.
World 10, drawn from the save file. Hatched squares are furnaces, gear wheels are workshops, diamonds are splitters, and the concentric squares are research labs.
I drew that stretch, Worlds 1 to 10, as a set of drawing sheets: A Brave New World.
From an agent to an autopilot
By World 118 I asked a different question: could a program play to Earth Tokens on its own, starting once and stopping when tokens appear?
Claude’s answer was yes, almost all of it deterministically. The save is fully readable, and Claude had decoded the recipes, the tech tree of 93 technologies, the tiers, and the machine footprints. Every action had been a save edit or one of three screen actions: load a world, read research, or press Unlock. Only gaps in our own tooling had needed an agent, and each gap could become a rule.
So Claude wrote an autopilot in Rust, about 9,400 lines: a save codec and writer that match the Python tools exactly, a flow graph and rate estimate, a router, and a stage planner. It runs a deterministic loop and calls a language model only when the planner runs out of retries. A small tool may now open the game, load a world, and quit, so the loop can measure a world while it runs.
World 122 was the first world the autopilot planned. In a 20-minute trial, Atomic Locators went from 24 to 33.
World 122: the autopilot’s own Nano Wire line. Each input runs in its own corridor lane; brackets mark tunnels where lanes cross.
Earth Tokens
World 127 added a Matter Duplicator, built from stock that finished research no longer needed. It made one every 25 minutes or so. Particle Glue held it back: each Duplicator takes 100, and about four a minute arrived. Ten Duplicators unlocked the Earth Teleporter, and I placed it by hand, because the writer could not.
That changed the same evening. Claude cannot invent a record format; it can copy one. I placed a Robotic Arm and a Storage, then a second Teleporter far from the first, and Claude read their records from the save. A Teleporter turned out to be an ordinary machine record. The writer now places them itself.
The Matter Duplicator, fed by four lanes, drops its output into the Earth Teleporter.
A test world settled another question. The writer had never built a tunnel longer than four tiles. Claude wrote tunnels of four, five, and six into a copy of the world, ran it, and counted ore past each exit. I placed one by hand at the longest span the game allowed: seven tiles. The planner now uses all seven, which matters near the labs, where belts lie too close for short tunnels.
Near the labs, lanes cross each other in tunnels; dashed lines mark the underground runs.
World 128 added a park of nine blocks to make glue for the Duplicator. The first Earth Token reached the labs the next morning, before that park had made any glue: its long input belts were still filling. By the evening three had arrived.
The glue park in World 128: nine blocks on the right, from Copper Wire at the bottom to Particle Glue at the top.
World 128, drawn from the save file by the project’s own viewer: 58,680 buildings.
What comes next
Earth Tokens are expensive. Running the Teleporter at full speed, about 1.4 Duplicators a minute, would take some 600 machines and 2,300 extractors. The map has free iron ore for less than half of that. The planner also builds each park as one column of blocks. That fits a few dozen blocks; a full Earth Token tree asked for a rectangle of 941 by 2,148 tiles, larger than the map. The next step is a grid of blocks between straight belt avenues, fed by shared buses.
The lab hub in World 128. Every lane ends here, so new ones barely get through.
Claude drew these pictures from the save files, not from the game. A small renderer reads every building and belt and draws each kind with its own symbol, in the colours of the drawing sheets.
The AI part
Since November 1 the project has 127 commits. I did not decode a binary save format, write a belt router, or port a planner to Rust. Claude did. My part was to play the worlds it wrote, press Unlock, and tell it what a good factory looks like.