Factorio Learning Environment
Jack Hopkins, Mart Bakler, Akbir Khan
TL;DR
The Factorio Learning Environment (FLE) offers a non-saturating, open-ended benchmark for evaluating autonomous agents on long-horizon planning and resource optimization, using Factorio as a rich but controllable testbed. By providing lab-play and open-play settings, an interactive Python/Lua API, and an unbounded production objective, the paper demonstrates that even frontier LLMs struggle with spatial reasoning, iterative error correction, and scalable automation, while coding-oriented models show stronger progress in open-ended tasks. Key contributions include an open-source framework, a persistent, REPL-based programming interface for iterative agent development, and a detailed characterization of model capabilities across structured and unbounded factory challenges. The work highlights FLE’s potential as a relativized, curriculum-like benchmark that can drive progress in planning, synthesis, and robust automation, with implications for scalable AI safety and reproducibility research.
Abstract
Large Language Models (LLMs) are rapidly saturating existing benchmarks, necessitating new open-ended evaluations. We introduce the Factorio Learning Environment (FLE), based on the game of Factorio, that tests agents in long-term planning, program synthesis, and resource optimization. FLE provides exponentially scaling challenges -- from basic automation to complex factories processing millions of resource units per second. We provide two settings: (1) lab-play consisting of eight structured tasks with fixed resources, and (2) open-play with the unbounded task of building the largest factory on an procedurally generated map. We demonstrate across both settings that models still lack strong spatial reasoning. In lab-play, we find that LLMs exhibit promising short-horizon skills, yet are unable to operate effectively in constrained environments, reflecting limitations in error analysis. In open-play, while LLMs discover automation strategies that improve growth (e.g electric-powered drilling), they fail to achieve complex automation (e.g electronic-circuit manufacturing).
