An agent beat Factorio with a player's limits
A developer had an AI coding agent play the factory game Factorio from start to rocket launch, through a small code library that only lets it do what a human player could. It took 13.5 hours of game time.
ContextFactorio is a game about building ever larger automated factories; launching a rocket is its traditional win condition. Ryan Madden has been testing agents on it for months.
Ryan Madden ran OpenAI's GPT-5.6 Sol inside the Codex agent at a low thinking level, on peaceful mode (no enemies). It did not see the screen as pixels: it called a small Python library that enforces the player's reach and fog of war, the same limits a person has in the game's interface. Earlier runs went through shell commands.
Sol built through red, green, blue, purple and yellow science and launched the rocket at 13.5 hours of game time. Madden had planned to stop at blue science. GPT-5.5 had failed largely because it never used conveyor belts.
It was not clean. Late in the run Sol never fully connected some production lines and kept the factory going by carrying supplies by hand between areas. Madden publishes the production log and a timelapse, and plans runs with enemies and other models.
Technical details
The interface is a game manager plus a Python library the agent imports. Madden says it applies the same restrictions human players face in the GUI, naming player reach and fog of war; the post does not list the rest. The run manager logged total resource production, annotated with each science milestone.
The post gives no real-time duration, token count or cost. Madden's earlier posts cover getting Claude Code to play Factorio and a testbed called Faketorio.
Why it mattersA game API that matches what a player can do turns an agent run into evidence about your systems: where it stalls, what it works around, which shortcuts it finds. That is a playtest you can rerun after every change.
For youExpose one ElementalBlades system (inventory or crafting) through a small player-limited command set and let Claude Code try a fixed goal; the workarounds it finds are your bug list.
- fog of war
- Parts of the map a player has not explored yet and cannot see.
- Codex
- OpenAI's coding agent, which runs commands and edits files from a terminal.
- thinking level
- How much the model reasons before acting; lower is faster and cheaper.
Sources Ryan Madden: GPT-5.6 Sol can beat FactorioTimelapse of the run (YouTube)