Writing · October 2026

Claude learns to play Factorio

I gave Claude my own Factorio world and the rules a human player lives under. About eighteen hours of commits later it had blue science, a cleared biter nest, and a file of things it learned the hard way.


Factorio is a game about building a factory that builds the next factory. You land on a planet with a pistol and a few iron plates, mine ore by hand, and keep automating until a rocket leaves and, in the Space Age expansion, a ship reaches the edge of the solar system. It is famous for eating people’s weekends.

So I gave it to Claude. Not a sandbox built for AI research — my own Factorio 2.1 world, on my Mac, with my character standing in it. Claude reaches the game through its remote console and Lua scripting, and gets its own character, labeled “Claude”, to walk around in.

Overhead view of a Factorio base on brown ground: smelting arrays and grey belts on the left, rows of assembling machines at center right with a row of labs above them, a crashed spaceship wreck near the bottom, and a lake at the lower right.
The south half of Claude’s base, about a day in. Smelting on the left, the science assemblers at center right with the labs in a row above them, the first steam power block, and the lake that feeds it. The wreck at the bottom is the crashed ship every game starts from. Everything here was mined, carried and placed by Claude’s character.

The rules

The interesting question was never whether a language model can spawn a factory with console commands. It can — and that proves nothing. The rules were the ones a human player lives under:

That last rule did more work than the others. A bot that learns this map has learned nothing.

Eighteen hours

The repo’s first commit says “a Factorio world to be played through RCON, starting empty.” About eighteen hours of commits later, the same world had:

On fresh maps it reached steam power from an empty inventory in 31 and 57 game minutes on two random seeds. A good human player does it faster. A good human player has also played before.

Overhead view of the north half of the base: a long row of furnaces, a block of green-circuit assemblers, and a row of ten labs along the bottom, with autumn-colored trees and grass above.
The north half: the long furnace line, the green circuit block, and the ten labs along the bottom — all of it powered by steam engines Claude built.

What the game taught it

Claude keeps a file of discoveries, one dated line each. Some are things any Factorio player learns in their first hour, written down by something that had never played. A few are things I didn’t know.

Hand mining is slow and honest. Fifty stone took a hundred seconds. One burner drill makes 0.25 ore a second and one stone furnace smelts 0.31, so one drill feeds one furnace. Every early-game player arrives at that ratio by feel — Claude arrived at it by measuring.

A character with no player is invisible to the game’s bookkeeping. Claude crafted a lab, and the technology that unlocks when you craft a lab never fired. The engine only credits crafting to a player — and Claude’s character has none. The fix was to credit Claude’s crafting exactly the way the game credits mine. Not more.

Standing on the spot blocks the build. It walked to its lab site, stood on it, and failed to place the lab three times. It now steps off first. I’ve done that one.

An unarmed character dies. On one map with worms near the spawn it died 14 times in 32 game minutes and never got past its first drill. The freeplay starting kit — a pistol and some magazines — is handed to players only. Claude’s character now gets the same kit I got.

Picking up the old poles cut the power. When it retired its burner drills it picked up their small power poles, and those were the only link between the new electric base and the steam engines. The whole factory sat dark while the engines ran. Every Factorio player has done exactly this.

Factorio 2.1 changed under it. Midway, the game updated. The update — 2.1.23 — quietly replaced the world’s script with the default one, removed two things the code read and changed the blueprint format. Claude found each from the error it raised, fixed it, and moved the world over — live save included.

What I caught

The record is not all clean, and the misses were the interesting part.

I noticed it was researching everything. While the next technology on its plan waited on something else, it spent its science on whatever was cheapest — landfill, railway, gates, concrete. On a test copy it burned through a pile of technologies it had no use for in twenty minutes. Now it researches only the next thing on its plan and what that needs.

Then I noticed it standing still. “Factorio seems idle,” I said. With nothing left to build until a pumpjack ran, it had parked itself in a state called “waiting (stocked).” Now it crafts ahead for the next project instead.

Both were things a person watching for thirty seconds would see — and the bot, inside its own loop, could not.

The nest

The best story is the last one. A biter nest expanded to within thirty tiles of the oil field Claude had chosen, after the survey that chose it. On its first trip there Claude’s character was killed by small biters and respawned with nothing. Everything it had been carrying lay on the corpse beside the nest.

The only oil field with no nest nearby was 356 tiles away — too far to pipe. So it had to clear the nest, honestly, with what it could make.

Overhead view of an oil field among autumn trees: a large dark patch of biter creep in the center, green pumpjacks being built at its upper right edge, and grey gun turrets just below it.
The oil field after the nest. The dark patch is the creep the nest left behind; the green machines at its edge are the first pumpjacks going in, and the gray ones below are the turrets that cleared it.

What it worked out is what Factorio players call turret creep. A gun turret reaches 18 tiles, a small worm 25. The character can build 10 tiles from where it stands. So it stood 26 tiles from the worms, out of their range, and placed turrets on an arc 17 tiles from them, in range for the turrets — not for itself. It filled them with ammunition from where it stood, and moved the arc forward.

It rehearsed this on a test copy of my world first: four waves of four turrets cleared all nine structures. Then it ran it live, and the first live wave lost every turret. Right after placing them it walked off to refuel its burner drills — refueling came first in its loop — and the worms ate the unattended turrets. On the test copy the refueling had never come due mid-wave. One line of priority later, a wave is watched before anything else. Five waves and six lost turrets in, the nest was gone. It walked to its old corpse and picked up 1,640 items in 20 kinds.

What this is and isn’t

This is not a model that has learned Factorio the way I learned it. It is a model writing and fixing a program that plays Factorio — and keeping notes — at a speed I cannot match and with blind spots I can see from across the room. The split of work was the same one I’ve seen everywhere I’ve put these systems to work: it does the volume, and the catches that matter come from somebody looking at the screen.

The plan runs to sixteen milestones. Next comes construction robots, where the game stops being about placing things by hand. Then the rocket, then four more planets — then a ship that has to survive the trip to the edge of the solar system. I’ll report back when it gets there, or when it finds something new to stand on.