betaFeedback

WorksComputer Science

Factoriax: A GPU-Accelerated Factorio-Style Simulator for Reinforcement Learning

Abstract

We introduce Factoriax, a GPU-accelerated factory-building simulator written in JAX. In Factoriax, an agent must collect resources, build machines using those resources, and then automate the collection and crafting process by arranging machines on the map to build production pipelines. This paper discusses the structure of the Factoriax simulator and an initial benchmark called Easy Rocket in which an agent is tasked with building a resource-intensive machine called the Rocket in a limited number of game ticks to escape the planet. We also publish results from a number of PPO-based training runs on Easy Rocket. Factoriax is built to be fast. A 1-billion-step PPO training run, equivalent to 500,000 episodes, runs on Easy Rocket in about 8 minutes on a single NVIDIA A100. A standard laptop GPU can complete the same run in about 84 minutes. Our trained PPO agent learns to gather resources, craft machines from those resources, and place them on the map through a curriculum reward directly tied to a manually designed set of achievements. After training, the agent does not place machines in a functional spatial configuration, failing to fully complete the benchmark, and leaving the challenge open for future attempts.

Introduction

We introduce Factoriax1, a GPU-accelerated factory building simulator written in JAX [3] for reinforcement learning (RL). In Factoriax, an agent spawns in a grid world (Figure 1), where it must collect resources, build machines, and ultimately automate resource collection and processing by building and maintaining factories. Factoriax enables research into factory layout design, often called facility layout problems [2] in operations research (OR), with RL. Approaches to solve factory layout design tend to treat the problem as disembodied, with the inputs being some sort of matrix or graph and the output being a permutation of the factory layout. Studying embodied agents in a dynamically built factory setting such as Factoriax is less common. The order of construction becomes more important for an agent moving in an embodied way through a simulator, as it might create or obstruct its own routing. Concerns like reach and walking distance become apparent as well. Embodiment thus adds an additional spatial element to the planning, execution, and maintenance of factory layout design.

A typical early-game state in Factoriax

Figure 1. A typical early-game state in Factoriax. An agent (red dot) on a 2D grid mines raw materials using a miner (green), crafts machines, and arranges them so belts (yellow) carry the correct inputs to assemblers (purple). The assemblers create half-fabricates to speed up the production of more machines. A single coal miner on the right drops coal ore onto a belt, which is split between both lines through a belt splitter. Arms (brown) drop each assembler’s output onto pallets (grey) acting as high-capacity item buffers.

Factor iax is inspired by the game mechanics featured in Factorio3. The Factorio Learning Environment (FLE) [7] uses the full Factorio game as a language model benchmark. However, the game is optimized for human gameplay and runs at a limited speed of 60 frames per second, making FLE impractical for RL. Although less faithful to the original game than FLE, Factoriax preserves the core challenges of long-horizon planning, layout design, and agent embodiment that make the game interesting for RL research. Moreover, by leveraging JAX to load both the model and

19th European Workshop on Reinforcement Learning (EWRL 2026). the environment onto the GPU, Factoriax reduces communication overhead, resulting in significant improvements in computational throughput.

In addition to the simulator behind Factoriax and its key design ideas, this paper introduces Easy Rocket, the first benchmark built in Factoriax. A PPO-based agent shows that Easy Rocket is partly solved. Solving the full benchmark is still an open problem. Finally, this work includes a computational performance analysis of Easy Rocket and the PPO training run. It shows that a 1-billion-step PPO training run on the included Easy Rocket benchmark completes in about 8 minutes of wall-clock time on a single NVIDIA A100, and about 84 minutes on a standard laptop GPU.

Related Work

Factoriax combines GPU acceleration and a focus on embodied agents and factory layout design. This section discusses related benchmarks along these lines. Table 1 provides an overview of the benchmarks and their relationship to Factoriax.

GPUEmbodimentLayoutDetailsReference
SafeOR-Gym✗✗▲Operations research[16]
Gym / Gymnasium✗✓✗Standard API, classic control[23]
NetHack✗✓✗Roguelike (procgen)[9]
COOM✗✓✗Doom (continual RL)[19]
HASARD✗✓✗Doom (safe RL)[20]
MineRL✗✓▲Minecraft building[6]
FLE✗✓✓Factorio for LLM agents[7]
Pgx✓✗✗Board games (chess, go)[8]
Jumanji✓✗✗Combinatorial OR[1]
MuJoCo XLA (MJX)✓✓✗3D physics engine[14]
IsaacLab✓✓✗3D robotics simulation[13]
Kinetix✓✓✗2D physics engine[12]
CRAX✓✓✗Safe RL (MuJoCo-based)[21]
Brax✓✓✗3D continuous control[4]
SocialJax✓✓✗Social dilemmas[5]
XLand-MiniGrid✓✓✗Meta reinforcement learning[15]
Gymnax✓✓✗Collection of environments[10]
JaxMARL✓✓✗Multi-agent[17]
MEAL✓✓✗Continual multi-agent[22]
Craftax✓✓▲Open-ended survival[11]
Factoriax✓✓✓Factory building / coupled ORThis paper

Table 1. Comparing Factoriax to other simulators and benchmarks. Comparisons assess whether a benchmark is GPU-accelerated, whether the agent in the benchmark is embodied and has to navigate through the environment, and whether the benchmark tests the agent’s capacity to create interconnected factory layout designs. ▲ indicates partial fit.

GPU acceleration Some simulators are built to run on the GPU, which are then used to create different experimental settings and benchmarks. An example in 3D physics is MuJoCo MJX [14], the GPU-accelerated version of the simulator that powers the robotics environments in the Gymnasium [23], the accelerated continuous control benchmark Brax [4], and a safe reinforcement learning benchmark CRAX [21]. Other simulators include IsaacLab [13] for 3D physics and Kinetix [12] for 2D physics. Similarly, Factoriax uses JAX to leverage GPU acceleration to speed up simulation.

Examples in other fields using GPU acceleration include Gymnax [10], which implements JAX versions of classical problems like CartPole, MountainCar, and the Atari environment. Pgx [8] implements popular board games like chess and Go. JaxMARL [17] implements a host of multi-agent benchmarks and algorithms in JAX. MEAL [22] extends multi-agent benchmarking specifically for continual RL. SocialJax [5] is more geared towards studying sequential social dilemmas. Finally, Jumanji [1] focuses on games like Tetris, Snake, Maze, and the Rubik’s Cube.

Embodiment Embodiment broadly refers to a benchmark in which the agent is located in the environment and has to navigate and move around to complete its goals. The robotics benchmarks discussed earlier belong to this category. Many video games are also used as embodied agent benchmarks. Minecraft has been used as a crafting-centric embodied benchmark through MineRL [6]. Doom has been adapted into benchmarks geared to specific reinforcement learning settings, such as COOM [19] for continual learning, and HASARD [Tomilin et al., 2025] for safe RL. Another approach to simulate embodied agents is using a grid world. Factoriax uses this approach, as do other benchmarks. Craftax [11], inspired by the NetHack Learning Environment [9], features an embodied agent in a grid-world RPG setting with procedural level generation, dungeon exploration, item crafting, and persistent block placement. XLand MiniGrid [15] is an accelerated benchmark aimed at studying meta-reinforcement learning with a dynamically configurable grid world.

Layout design SafeOR-Gym [16] decomposes OR problems into nine operations-research tasks as separate constrained environments for safe RL. Factoriax differentiates itself by focusing on a GPU-accelerated combination of embodiment and factory layout design. The Factorio Learning Environment (FLE) [7] is the only other benchmark combining embodiment and layout design. FLE exposes a software interface for large language models to interact directly with the full Factorio game. The full game of Factorio has much richer game mechanics, but is not GPU-accelerated. FLE runs at Factorio’s native speed of roughly 60 game ticks per second, which is too slow to train and evaluate RL algorithms within time frames practical for most researchers in the RL community. While Factoriax does not have the same fidelity to the original game as FLE, it preserves the core challenges of long-horizon planning, layout design, and agent embodiment.

Factoriax Simulator

Mechanics and Gameplay

Game Loop Figure 1 shows the central gameplay loop in Factoriax. At the start of a run (episode), the agent spawns in a bounded grid-world where each location may contain a number of resources, a machine, or the agent’s character. Each action the agent takes progresses the entire world by a single game tick. Resources can be mined and subsequently hand-crafted by the agent into half-fabricates and machines. Machines can be placed to automate parts of the crafting chain, allowing the agent to expand the factory setup while production continues without direct agent interaction.

Termination Runs can have different win conditions depending on the scenario. For example:

  • “Produce an expensive machine as fast as possible.”

  • “Produce as many items of a specific type as you can in a limited amount of time.”

  • “Balance the throughput of an existing factory.”

  • “Triage a resource depletion issue by re-routing the factory to restart production.”

The environment resets when the win condition is achieved. Resetting might generate a new randomized map, or pick from a set of hand-designed levels, depending on the setup.

Crafting Crafting transforms items according to the so-called recipes. Each recipe combines two item types, which can be raw resources, half-fabricates, or machines. The number of items required as input and collected as output can be configured differently depending on the scenario. A scenario can use the default recipe book or create a custom recipe book containing different item combinations. Figure 2 shows a customized recipe book and Figure 7 shows the default version. Each input combination can only occur once per recipe book, which is checked during the initialization of a scenario. This makes each recipe book a directed acyclic graph (DAG).

Figure 2. A custom recipe book designed for the Easy Rocket task (§ 4). Raw ores feed every intermediate. The rocket itself requires 100 hulls and 100 engine units (highlighted edges). This requires a working production line rather than hand assembly to finish within 2000 ticks. Appendix § 8 shows the full standard recipe book.

Figure 7. Standard production recipe book. Every recipe in the simulator’s BASE_RECIPES book, laid out by topological depth. The Easy Rocket scenario uses a simplified subset (Figure 2).

Machines Machines can be placed on the map while raw resources and half-fabricates cannot. Table 2 provides an overview of the most important machines. Miners play a crucial role by extracting some amount of raw ore from the ground during each game tick and placing the ore on an available conveyor belt in the direction it faces. Conveyors, splitters, and crossings carry a configurable amount of items across them each game tick. Assemblers can craft recipes using the items on two input conveyors. Arms can pick items out of one machine inventory and put them in another, adding to the available routing options in the game. Pallets act as high-capacity item buffers. Finally, the rocket is a special item that can be used as a capstone or finishing condition. Most machines have an internal item buffer that can store a limited number of items. All these machines form the basic building blocks for a factory in Factoriax.

NameRolePer-tick actionKey property
MinerProducerPulls ore from the tile beneath into its output bufferNeeds an ore patch beneath; depletes the patch
AssemblerProducerPulls two inputs, advances a recipe timer, emits the output2-input → 1-output; recipe set by inserted items
Conveyor beltLogisticsShifts contents one tile forward along its facing directionTwo parallel lanes (A and B)
ArmLogisticsPicks one item from the tile it faces, deposits it on the opposite tileOne item transferred per tick
SplitterLogisticsAlternates incoming belt items between two outputsBalances two downstream consumers from one supply
CrossingLogisticsTwo belt lanes that cross perpendicularly without mergingNo item transfer between the crossing lanes
PalletStoragePassive single-slot storageItems picked up by arms or by the player
RocketCapstoneNo per-tick action; placement is the eventScenarios may treat placement as a capstone signal

Table 2. Subset of the placeable machines in Factoriax. Icons are the in-simulator sprites used by the renderer. Appendix § 8 gives an overview of the machines’ crafting recipes.

Items The agent has an internal inventory with space for a fixed number of each item, similar to the player carrying a specific “pouch” for every item of the game. Appendix § 8 describes all the ores, half-fabricates, and machines currently implemented in Factoriax.

RL Agent Interface

Observations Factoriax has several options for agent observations, mainly divided into two axes. First, an agent might use xx-ray to see the internal state of every machine and resource in its observational range. Otherwise, the observation is superficial, and the agent can only see detailed information about the machine it is facing. This setting was added to support partial-observable scenarios later on. The second axis pertains to global versus local observations. The global observation encodes the world in absolute coordinates and shows every tile to the agent. Local observations are encoded relatively and show tiles up to a configured radius. All four variants emit flattened vectors and a per-player scalar block for pose, inventory state, and a per-recipe flag that indicates whether a recipe can be manually crafted by the agent. Appendix § 9 catalogues every observation channel.

Actions Agents can choose actions based on one of five categories: move, interact, place, craft, and deposit. Move includes lateral translation and rotations, as well as the NOOP action, meaning the agent skips acting for a turn and progresses time by a single tick. Interact covers mining the currently faced tile, picking up a machine, withdrawing items from a machine item buffer, and machine rotation on the map. The other three categories are parametric. Place has one action for every placeable machine. A machine can only be placed if it is present in the agent’s inventory. Craft has one action for every half-fabricate and machine and only triggers if all the required base materials are present in the inventory. Deposit has an action for every item, including raw resources. The agent can choose to deposit any item into the item buffer of a machine it faces. Factoriax includes an ActionMaskWrapper that can be used to hide actions from the agent. A masked action defaults to NOOP. Appendix § 10 describes the full set of available actions.

Rewards Factoriax contains a host of reward functions. The implementation splits into two types. One type of reward is granted based only on the current state. Examples include mining_reward and sparse_mining_reward. No other information is needed. Other rewards are constructed using not only the current state, but also whether that state has already occurred. If it has, no reward is given. Factoriax implements this with an achievement system. Each achievement is tied to a particular feature of world state. A particular benchmark implementation decides the conditions that trigger an achievement. The achievement is then recorded and passed along so that it is remembered throughout the episode.

Research Tools

Factoriax aims to facilitate research by providing an analysis library, a human-playable version of the game, and a level editor to support manual design of new levels and benchmarks. The analysis module contains standard plotting tools, a standard episode recording format, and ways to create visual snapshots and video files of the game and the internal agent inventory. The human-playable version of the game loads a randomized map in “free play” mode. It can be played with a keyboard or a controller. The level editor has a feature to manually draw ore patches and place machines. Levels can be loaded in the human-playable interface directly from the editor for testing and tweaking.

Easy Rocket Benchmark

In this section, we introduce Easy Rocket, the first benchmark in Factoriax. The goal in Easy Rocket is to produce a machine called the Rocket and place it on the map as fast as possible. The benchmark features a simplified recipe book, shown in Figure 2, with at most two production steps, called tiers, to get to the final product. The Rocket needs only 100 engine units and 100 hulls; however, crafting such resources directly is infeasible in the available 2000 ticks. Therefore, the agent must build a factory to gain efficiency and complete the challenge on time.

The map is a 16-by-16 grid, with the agent always spawning at the center, as shown in Figure 8, and each resource spawns in a 2-by-2 patch at a random location. To support reproducibility, this randomization produces the same map given a fixed seed. Other benchmark designs could have a small amount of resources per tile, forcing the agent to triage resource depletion problems during the challenge. This is deliberately not the case in the Easy Rocket benchmark. One ore tile contains enough resources to make all the necessary parts to complete the benchmark. The agent only needs to learn which ore types are relevant to build the components it needs.

Four reset states of Easy Rocket showing seeds 0–3 and resource patches

Figure 8. Four reset states of Easy Rocket. The player spawns at the centre of a 16×1616 \times16 grid scattered with patches of finite raw materials. The patches are placed differently for each random seed while preserving spawn-area clearance and a perimeter around the ore patches for belt routing.

Easy Rocket runs on a superficial global observation vector as described in § 3.2. The action space is unmasked. The reward is manually designed to form a curriculum based on achievements. When an achievement is attained, a reward is triggered. The achievements can be divided into phases. The bootstrapping phase focuses on basic navigation and resource collection. The miners phase automates resource extraction. The storage phase rewards forming the first connection between machines in the form of connecting miners to storage crates. Finally, the hull, engine, and rocket production phases all reward the production of the necessary half-fabricates and the rocket. Crucially, there are no achievements for connecting all of the machines in a particular way. Achieving victory under these fairly sparse conditions is the core challenge of the Easy Rocket benchmark. Appendix § 12 shows a breakdown of the achievements and associated trigger conditions.

Scripted Baseline

We use a scripted agent to validate the benchmark’s feasibility, tune its parameters, and establish a baseline for comparison. We tested the scripted agent on 16 different map seeds, and it solved all of them. The scripted agent’s strategy is fixed. Since each miner can mine three ores at a time by default, while the agent can only mine one ore per tick by hand, the scripted agent first places miners on every ore patch. Next, the agent starts crafting machines for the hull, engine, and rocket section of the factory, returning to the miners for more base material between phases. Eventually the factory produces a Rocket, which is finally placed to complete the challenge. Figure 3a shows six snapshots from seed 42 corresponding to the described phases. Figure 3b indicates at which game tick achievements are completed across the 16 testing seeds. The strategy discussed in this section can be treated as a rough upper-bound performance estimate for the benchmark, although more efficient ways to solve it likely exist.

Scripted-baseline agent showing cumulative factory phases and achievement timing

Figure 3. Scripted-baseline agent. (a) Cumulative factory at the end of each phase on seed 42. (b) First-unlock tick distribution across 16 random map seeds. The scripted baseline reaches all twenty-five achievements on every seed within the 2000-tick budget.

Experiments

This section discusses the experimental setup for a PPO training run on the Easy Rocket benchmark, as well as performance results in terms of episodic return and computational throughput. We train a PPO [18] agent on the Easy Rocket benchmark on a total of ten independent seeds at learning rate 10−410^{-4} and entropy coefficient 0.01. Each agent is trained for 10 billion steps, totaling 100 billion steps. The neural network is a small MLP architecture with two hidden layers of 256 neurons each. Appendix § 11 provides further details on the setup.

PPO on Easy Rocket

Figure 4 shows the training curve for the PPO training run. No run ever manages to complete the full benchmark. Mean episodic return saturates at 17.7±2.7517.7 \pm2.75 of 25 possible achievements around 1.5 billion steps and is flat thereafter. Figure 5 shows the unlock rate of achievements divided into a number of phases. The agent struggles to learn achievements related to the latter part of the use phase, namely “hull built”, “engine built”, and “mining master”.

Mean episodic return on Easy Rocket over training

Figure 4. Mean episodic return on Easy Rocket over training, across ten seeds at learning rate 10−410^{-4} and entropy coefficient 0.01. The solid blue line shows the mean across seeds and the shaded area the standard deviation. The dashed reference at 25 is the scripted-baseline ceiling, or in other words, a fully successful run. Return saturates around 1.5 billion steps at a mean of 17.7 and is flat thereafter.

Per-achievement unlock rate at 10 billion steps across ten PPO seeds

Figure 5. Per-achievement unlock rate at 10 billion steps across ten PPO seeds.

Both “hull built” and “engine built” require completing two tiers of construction. The difference between hull and engine production rates might have to do with the recipe book for Easy Rocket, shown in Figure 2. Agents are rewarded for crafting miners and conveyor belts, which indirectly reward gathering iron ore, coal, limestone, and silicon. Since both iron ore and limestone are needed for hull production, the probability that the agent accidentally discovers how to craft a hull is quite high. Compare this to the engine unit, which requires limestone and copper ore. The only other device that uses copper ore is the arm, which is not connected to an achievement. The agent has no incentive to collect copper and is thus less likely to stumble upon unlocking the engine unit achievement.

In similar fashion, the agent never learns to complete “mining master”, which requires at least one miner placed on every ore type. The agent is naturally incentivized to gather four different ore types to complete all the crafting achievements. However, collecting tin or copper for crafting is never directly or indirectly rewarded. To cross the gap and complete “mining master”, an agent needs to collect materials, craft enough miners, walk to the remaining ore patches it never otherwise uses, and place the miners. This hardly ever happens by accident during exploration, which is why the agent never learns to complete the achievement.

The common theme between both failures to learn is that the curriculum does not expose the agent enough to the discovery of the hard-to-complete achievements. In any case, the agent never learns to build even a partially operational factory, instead stopping at learning to craft and place machines in particular locations of interest. The Easy Rocket benchmark with the current reward structure thus remains an open problem.

Throughput

This section describes a throughput analysis on an NVIDIA A100, referred to as the server GPU, and an NVIDIA GeForce RTX 3050 6GB laptop GPU. We compare the throughput performance of raw environment runs and PPO training runs. The PPO training run loads Factoriax into GPU memory alongside the training code for PPO, which makes it suitable for checking actual training performance. Raw environment performance is checked by running the environments with random action selection. It is mainly useful to get a sense of the impact that different environment settings have on the throughput. The throughput for Easy Rocket is mainly determined by three parameters: training batch size, entity limit, and map size.

Batch Size Batch size indicates the number of Factoriax environments that can run in parallel on the GPU. The left image in Figure 6 shows how batch size influences throughput. Batch size is mainly limited by the Video Random Access Memory (VRAM) of the GPU. The laptop GPU used here has much lower VRAM than the server GPU and can thus serve fewer concurrent environments at a time. At some point, reading and writing to the GPU becomes the bottleneck for training, and the rate of performance gain drops off. A consequence of a large batch size is that a larger amount of training happens in parallel. If the total number of episodes in the training is lower than the number of episodes represented in the training set, the model can only update a single time. Therefore, the batch size also needs to be tuned such that enough training updates can occur during training. The wall-clock training time of a 1-billion-step PPO training run, or approximately 500,000 episodes, on the laptop GPU is approximately 84 minutes. On the server GPU, the same run takes about 8 minutes of wall-clock time.

Raw environment and PPO wall-clock time versus batch size, and raw environment minutes per 1B steps at batch 1024

Figure 6. Left: A plot of wall-clock time versus the batch size on the GPU. Right: Impact on wall-clock time for map size and entity limit, where blue indicates the server GPU and red the laptop GPU.

Entity Limit and Map Size Factoriax optimizes performance by defining a hard limit on the number of machine entities on a map. This generally works well since the number of placed machines is usually much lower than the number of tiles in a Factoriax environment for all but the smallest maps. As can be seen on the right side of Figure 6, a change in the entity limit can have a large impact on wall-clock time for raw environment throughput. For both the laptop GPU and the server GPU, varying between half the standard entity limit and double the standard entity limit results in around 40 percent increased wall-clock time for a run on the lower end of the map sizes. This can go as high as a difference of almost five times the wall-clock time on the server GPU with map size 128 by 128. Map size itself also has a large impact on performance across the board for both the laptop GPU and the server GPU.

Conclusion

We introduced Factoriax as a new factory-building simulator for RL, and Easy Rocket, a curriculum reward benchmark built with Factoriax. Factoriax uniquely combines GPU acceleration, embodied agents, and factory layout design in a single simulator. The purpose of an agent in a Factoriax environment is to gather resources and build a factory. The PPO agent partially solved the Easy Rocket benchmark, but could not complete the full challenge. Specifically, it could not learn how to connect machines to build a functional factory, although it did learn to craft and place machines on the map and complete a large part of the associated achievements. This means Easy Rocket remains an open problem. Easy Rocket PPO training runs with 1 billion steps can be completed in 84 minutes on a laptop GPU and 8 minutes on an NVIDIA A100. We bring this Factoriax to EWRL hoping to find out which future developments matter most to the community, and we look forward to people attempting the Easy Rocket challenge themselves.

AI Use Disclaimer

AI was used to generate the initial version of this paper. It was subsequently rewritten entirely by hand because the resulting writing was mediocre and confusing at best. Hopefully the rewrite has improved upon that. AI was useful to check for grammatical mistakes and perform broad scans on related works.

The initial version of the Factoriax code was generated mainly by AI as an experiment in the possibilities of AI-driven coding. The process was anchored in test-driven development. Every feature included in the simulator had an associated test to ensure correct implementation. Despite this effort and others, the code turned out ugly and full of “code smell”. Therefore, the authors ended up also performing significant manual inspection and refactoring on the code. During this process, many bugs surfaced that would otherwise have gone undetected, even after performing multiple automated bug scans using the same models. AI was fruitfully used to perform large scans on the codebase to search for implementation details, understand JAX, create plots, and create prototypes of both the JAX implementations and UI elements for comparison.

We hope these short observations will help other researchers decide how to apply AI to their own research projects.

Item Reference

The tables below list every item in the simulator, together with its icon, the recipe that produces it, and a short description of its function. Recipes here are the standard recipe book (BASE_RECIPES). The Easy Rocket scenario described earlier in the paper swaps in a simplified set tuned to the rocket’s two-stage hull/engine production line (see Figure 2). Figure 7 shows the full production DAG for the standard book.

NameFunction
CoalMined from coal patches. Burned in furnace recipes and used in several intermediates.
Iron OreThe base metal ore. Smelts to iron plate; direct input to several machine recipes.
Copper OreThe conductive ore. Smelts to copper plate; used in circuits and wires.
Tin OreSmelts to tin plate; used in frames, wires, and pallets.
SiliconRefines to wafer; input to electronic intermediates.
LimestoneInput to refractory brick and to several rocket-part recipes.

Table 3. Raw resources in the standard recipe book, with the function of each.

NameRecipeFunction
Miner1×1 \times Iron Plate, 1×1 \times WireExtracts ore from the tile underneath into its output buffer.
Pallet1×1 \times Tin Plate, 1×1 \times WirePassive storage tile that holds items in place.
Conveyor Belt1×1 \times Iron Plate, 1×1 \times Copper PlateMoves items one tile forward per tick along its facing direction.
Assembler1×1 \times Frame, 1×1 \times CircuitCombines two recipe inputs into an output; recipe selected by inserted items.
Arm1×1 \times Copper Plate, 1×1 \times WirePicks an item from the tile it faces and deposits it onto the opposite tile.
Rocket6×6 \times Hull, 4×4 \times Rocket CoreCapstone machine. Placing it on the map triggers liftoff.
Science Lab2×2 \times Circuit, 2×2 \times MotorConsumes science packs to progress research.
Splitter1×1 \times Tin Plate, 1×1 \times CoalAlternates incoming belt items between two outputs.
Crossing1×1 \times Copper Plate, 1×1 \times CoalTwo belt lanes that cross without merging.

Table 4. Machines in the standard recipe book, with the recipe that produces each one and its function.

Observation Reference

Factoriox ships four observation functions, formed by combining a profile (x_ray or superficial) with a view (global or local), producing global_x_ray, global_superficial, local_x_ray, and local_superficial. All four return float32 vectors and concatenate a flattened spatial tensor with a per-player scalar block:

Nobs=Cprof⋅Ntiles+SprofN_{\mathrm{obs}} = C_{\mathrm{prof}} \cdot N_{\mathrm{tiles}} + S_{\mathrm{prof}}

with Cprof=10C_{\mathrm{prof}} = 10 for x_ray and 33 for superficial, Sprof=72S_{\mathrm{prof}} = 72 for x_ray and 6363 for superficial, and NtilesN_{\mathrm{tiles}} equal to H⋅WH \cdot W for the global view or (2r+1)2(2r + 1)^2 for the local view (default radius r=10r = 10).

Spatial Channels

Table 6 lists every spatial channel and which profile includes it.

#Channelx_raysuperficialEncodesNormalisation
1block_type✓✓Tile type (dirt, water, ore type, ...)/ max(BlockType)
2machine_type✓✓Machine type placed on the tile (or NONE)/ max(Machine)
3block_resources✓—Ore count remaining under the tile/30000
4slot0_type✓—Assembler input slot 0 item type/33
5slot0_count✓—Assembler input slot 0 item count/1024
6slot1_type✓—Assembler input slot 1 item type/33
7slot1_count✓—Assembler input slot 1 item count/1024
8slot2_type✓—Assembler output / buffer slot item type/33
9slot2_count✓—Assembler output / buffer slot item count/1024
10machine_direction✓✓Cardinal facing of the placed machine/4

Table 6. Spatial channels per observation profile. The x_ray profile uses all ten. The superficial profile uses three.

Per-Player Scalars

Both profiles share a common scalar block. The x_ray profile additionally appends nine facing-tile scalars covering the machine state of the tile directly in front of the player.

GroupCountEncodes
Pose + time4Player xx (normalised by map_width), yy (by map_height), facing direction (/4), current timestep (by max_timesteps)
Recipe affordabilityNUM_RECIPES (26 in the default book)One float per recipe in the active book; 1 if the player can hand-craft the recipe right now, 0 otherwise
Player inventoryNUM_ITEM_TYPES (33)Item count per type, normalised by per-item PLAYER_MAX_STACK
Total (both profiles)63

Table 7. Common per-player scalars, shared by both profiles. Recipe-affordability and inventory sizes scale with the active recipe book and item set.

Table 8: Facing-tile scalars appended by the x_ray profile only. Each scalar reads the entity on the tile directly in front of the player. All nine are zero if that tile is out of bounds.

#ScalarEncodes
1facing_machine_typeMachine type on the tile in front of the player
2facing_buffer_typeBuffer item type on that tile
3facing_buffer_countBuffer item count on that tile
4facing_asm_in0_typeAssembler input slot 0 item type
5facing_asm_in0_countAssembler input slot 0 item count
6facing_asm_in1_typeAssembler input slot 1 item type
7facing_asm_in1_countAssembler input slot 1 item count
8facing_asm_out_typeAssembler output item type
9facing_asm_out_countAssembler output item count

Table 8.

Action Reference

The action space is a single discrete head of size NUM_ACTIONS = 85, laid out as five categories ordered MoveAction, InteractAction, PLACE_*, CRAFT_*, and DEPOSIT_*. The two non-parametric families (Table 9 and Table 10) name every action explicitly. The three parametric families (Table 11) are summarised by base offset, count, and the item set that they describe (Appendix § 8).

Table 9: Movement family. Codes are the absolute Action integer (movement starts at 0). Cardinal moves implicitly set facing. FACE_* actions snap facing without moving.

CodeActionEffect
0NOOPSkip the tick; player state is unchanged
1UPMove one tile up if passable, otherwise stay; sets facing UP
2DOWNMove one tile down if passable, otherwise stay; sets facing DOWN
3LEFTMove one tile left if passable, otherwise stay; sets facing LEFT
4RIGHTMove one tile right if passable, otherwise stay; sets facing RIGHT
5FACE_UPSnap facing direction to UP without moving
6FACE_DOWNSnap facing direction to DOWN without moving
7FACE_LEFTSnap facing direction to LEFT without moving
8FACE_RIGHTSnap facing direction to RIGHT without moving

Table 9.

Table 10: Interaction family. Codes follow movement (starting at 9). Each action operates on the tile directly in front of the player.

CodeActionEffect
9MINEReduce the ore counter on the tile in front by one and add the ore to the player inventory
10PICKUPPick up the machine on the tile in front into the player inventory
11WITHDRAWDrain the output slot of the machine in front into the player inventory
12REPAIRRestore the entity in front to full health (see note below)
13ROTATE_LEFTRotate the machine on the tile in front to face LEFT
14ROTATE_RIGHTRotate the machine on the tile in front to face RIGHT
15ROTATE_UPRotate the machine on the tile in front to face UP
16ROTATE_DOWNRotate the machine on the tile in front to face DOWN

Table 10.

FamilyBase offsetCountItems
PLACE_*1710Machine (NONE excluded); see Appendix § 8, Table 2
CRAFT_*2726HalfFabricate ∪\cup Machine (NONE excluded); see Appendix § 8, Table 5 and Table 2
DEPOSIT_*5332Resource ∪\cup HalfFabricate ∪\cup Machine (NONE excluded); see Appendix § 8

Table 11. Parametric families. Each family covers a contiguous range of Action integers starting at the listed base offset. The item index inside the family follows the simulator’s enum order.

NameRecipeFunction
Iron Plate1×1 \times Iron Ore, 1×1 \times CoalSmelted iron. Structural input to frames, miners, conveyors, and hulls.
Copper Plate1×1 \times Copper Ore, 1×1 \times CoalSmelted copper. Conductive input to circuits, wires, and conveyors.
Tin Plate1×1 \times Tin Ore, 1×1 \times CoalSmelted tin. Input to frames, wires, and pallets.
Wafer1×1 \times Silicon, 1×1 \times CoalRefined silicon disc. Input to circuits and advanced science packs.
Frame1×1 \times Iron Plate, 1×1 \times Tin PlateStructural plate-and-girder. Input to motors, assemblers, and hulls.
Circuit1×1 \times Copper Plate, 1×1 \times WaferLogic substrate. Input to sensors, assemblers, and avionics.
Wire1×1 \times Copper Plate, 1×1 \times Tin PlateConductive strand. Input to motors, sensors, miners, pallets, arms, and engine units.
Motor1×1 \times Frame, 1×1 \times WireActive mechanism. Input to basic science packs and engine units.
Sensor1×1 \times Circuit, 1×1 \times WireDetection element. Input to advanced science packs and avionics.
Basic Science Pack1×1 \times Motor, 1×1 \times Tin PlateFirst-tier research unit. Consumed by science labs.
Advanced Science Pack1×1 \times Sensor, 1×1 \times WaferSecond-tier research unit. Consumed by science labs.
Refractory1×1 \times Limestone, 1×1 \times CoalHeat-resistant brick. Input to furnace recipes.
Hull2×2 \times Frame, 2×2 \times Iron PlateStructural part of the rocket. Combines with rocket cores.
Engine Unit2×2 \times Motor, 1×1 \times WirePropulsion subassembly. Input to rocket cores.
Avionics2×2 \times Circuit, 2×2 \times SensorControl electronics. Input to rocket cores.
Rocket Core1×1 \times Engine Unit, 1×1 \times AvionicsRocket subassembly. Two of these and a hull combine into a rocket.

Table 5. Half-fabricates in the standard recipe book, with the recipe that produces each one and its function.

The base simulator implements REPAIR as a full health restore on the entity in front of the player, but the simulator currently ships without a damage mechanic, so the handler has no observable effect at present. Damage propagation and the matching repair-cost rules are future work.

Reproducibility

Seeds

Seeds reported in this paper. Seed 42 for the scripted-baseline build progression (Figure 3a) and the final-factory heatmap (Figure 9). Seeds 0–3 for the reset-grid sample (Figure 8). Seeds 0–15 for the scripted-baseline timing distribution (Figure 3b). PPO training runs were run with Seeds 0-9. PPO throughput numbers (Figure 6) are single runs per (device, batch size, map size, entity cap) cell, with the wall-clock time measured directly. Throughput numbers carry no seed dependence beyond JAX’s PRNG init for the env reset.

Final scripted-baseline factory on seed 42 for Easy Rocket

Figure 9. Final scripted-baseline factory on seed 42 for Easy Rocket. Six independent miner setups, four more for the production lines. Three assemblers, two of which produce hulls and engines, and the final one combining the two to create the rocket according the the recipe graph in Figure 2.

Hardware

Numbers reported in this paper were measured on two devices: an NVIDIA GeForce RTX 3050 6GB laptop GPU and an NVIDIA A100. Both run JAX 0.9.1 against the CUDA backend with no custom XLA flags set. The throughput sweep (Figure 6) takes one timed run per (device, batch size, map size, entity cap) cell, preceded by a JIT warm-up iteration that is excluded from the measurement.

PPO Hyperparameters

Hyperparameter10-billion-step runTrainer default
Learning rate1×10−41 \times10^{-4}2.5×10−42.5 \times10^{-4}
Entropy coefficient0.010.01
Discount factor γ\gamma0.990.99
GAE smoothing λ\lambda0.950.95
Clip ϵ\epsilon0.20.2
Value-loss coefficient0.50.5
Update epochs per iteration44
Minibatches per epoch88
Max gradient norm0.50.5
Parallel environments409664
Rollout length (steps)128128
Network hidden dimensions(256, 256)(256, 256)
Observation normalisationonline running mean/stdonline running mean/std
Total steps101010^{10}10710^{7}
OptimiserAdam, linear LR annealAdam, linear LR anneal

Table 12.

The 10-billion-step run column lists the values used for the 10-seed PPO results (§ 5). Network architecture is a flat MLP shared between the policy and value heads, with the heads as the final two linear layers.

Easy Rocket Scenario Details

§ 4 describes the Easy Rocket scenario. This appendix goes into more detail. Figure 8 shows four random initialisations of the map. Table 12 describes each achievement in the benchmark. Figure 9 shows the factory created by the scripted baseline on seed 42.

#Engine namePhaseTriggered when
1mine_1_oreBootstrapPlayer inventory holds any raw ore.
2mine_3_oreBootstrapPlayer inventory holds at least one of three distinct raw ore types.
3prospectorBootstrapPlayer inventory holds at least one of every raw ore type.
4place_minerBootstrapAt least one miner is placed on the map.
5place_3_minersBootstrapThree miners are placed on the map.
6metal_in_motionBootstrapSix miners are placed on the map.
7automated_miningMiners upA placed miner has ore in its output buffer.
8ore_fieldsMiners upThree or more ore types sit under producing miners.
9mining_masterMiners upAll six ore types sit under producing miners.
10one_palletStorageAt least one pallet is placed on the map.
11three_palletsStorageAt least three pallets are placed on the map.
12stackedStorageAt least six pallets are placed on the map.
13assembler_onlineHullAt least one assembler is placed on the map.
14assembler_and_armHullAt least one assembler and one arm are placed on the map.
15one_beltHullAt least one conveyor belt is placed on the map.
16three_beltsHullAt least three conveyor belts are placed on the map.
17hull_productionHullAn assembler carries a finished hull in output or buffer.
18two_assemblersEngineA second assembler is placed on the map, opening a parallel production line.
19an_arm_and_a_legEngineAt least two assemblers and two arms are placed on the map.
20six_beltsEngineAt least six conveyor belts are placed on the map.
21engine_productionEngineAn assembler carries a finished engine unit.
22auto_botsRocket productionA third assembler is placed on the map, freeing one for the rocket-assembly line.
23belt_spaghettiRocket productionAt least ten conveyor belts are placed on the map.
24rocket_assembledRocket productionAn assembler carries a finished rocket item.
25liftoffRocket productionA rocket machine has been placed on the map.

Table 12 (PDF p. 19). Easy Rocket achievements in unlock order. Achievements 1-3 read the state of the agent inventory, and achievements 4-25 read the map state for placed machines or item buffer states.

PPO Training

Per-phase breakdown of the ten-seed run from § 5. Each row in the graph corresponds to a phase in the achievement set. Each phase cell shows the individual achievement unlock rates shown in Figure 5.

Long run (10B steps) — per-phase detail

Figure 10. 10-billion-step run training runs. Each plot shows achievement unlock for that phase. Rates reported over training (ten seeds).

References

  1. [1]Clément Bonnet, Daniel Luo, Donal Byrne, Shikha Surana, Sasha Abramowitz, Paul Duckworth, Vincent Coyette, Laurence Illing Midgley, Elshadai Tegegn, Tristan Kalloniatis, Omayma Mahjoub, Matthew Macfarlane, Andries P. Smit, Nathan Grinsztajn, Raphaël Boige, Cemlyn N. Waters, Mohamed A. Mimouni, Ulrich A. Mbou Sob, Ruan de Kock, Siddarth Singh, Daniel Furelos-Blanco, Victor Le, Arnu Pretorius, and Alexandre Laterre. Jumanji: a diverse suite of scalable reinforcement learning environments in JAX. In ICLR, 2024.arxiv.org/abs/2306.09884
  2. [2]Khalil Bouramtane, Saïd Kharraja, Jamal Riffi, Omar El Beqqali, and Abdelahad Chraibi. A comprehensive review of static and dynamic facility layout problems. Annu. Rev. Control., 58: 100970, 2024.DOI
  3. [3]James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye Wanderman-Milne, and Qiao Zhang. JAX: composable transformations of Python+NumPy programs, 2018. URL http://github.com/jax-ml/jax.
  4. [4]C. Daniel Freeman, Erik Frey, Anton Raichuk, Sertan Girgin, Igor Mordatch, and Olivier Bachem. Brax - A differentiable physics engine for large scale rigid body simulation. In NeurIPS Datasets and Benchmarks, 2021.arxiv.org/abs/2106.13281
  5. [5]Zihao Guo, Shuqing Shi, Richard Willis, Tristan Tomilin, Joel Z Leibo, and Yali Du. SocialJax: An evaluation suite for multi-agent reinforcement learning in sequential social dilemmas. arXiv preprint arXiv:2503.14576, 2025.
  6. [6]William H. Guss, Brandon Houghton, Nicholay Topin, Phillip Wang, Cayden R. Codel, Manuela Veloso, and Ruslan Salakhutdinov. MineRL: A large-scale dataset of Minecraft demonstrations. In IJCAI, 2019.arxiv.org/abs/1907.13440
  7. [7]Jack Hopkins, Mart Bakler, and Akbir Khan. Factorio learning environment. In NeurIPS, 2025.arxiv.org/abs/2503.09617
  8. [8]Sotetsu Koyamada, Shinri Okano, Soichiro Nishimori, Yu Murata, Keigo Habara, Haruka Kita, and Shin Ishii. Pgx: Hardware-accelerated parallel game simulators for reinforcement learning. In NeurIPS, 2023.
  9. [9]Heinrich Küttler, Nantas Nardelli, Alexander H. Miller, Roberta Raileanu, Marco Selvatici, Edward Grefenstette, and Tim Rocktäschel. The NetHack learning environment. In NeurIPS, 2020.arxiv.org/abs/2006.13760
  10. [10]Robert Tjarko Lange. gymnax: A JAX-based reinforcement learning environment library, 2022. URL http://github.com/RobertTLange/gymnax.
  11. [11]Michael T. Matthews, Michael Beukman, Benjamin Ellis, Mikayel Samvelyan, Matthew Thomas Jackson, Samuel Coward, and Jakob Nicolaus Foerster. Craftax: A lightning-fast benchmark for open-ended reinforcement learning. In ICML, 2024.
  12. [12]Michael T. Matthews, Michael Beukman, Chris Lu, and Jakob Nicolaus Foerster. Kinetix: Investigating the training of general agents through open-ended physics-based control tasks. In ICLR, 2025.
  13. [13]Mayank Mittal, Pascal Roth, James Tigue, Antoine Richard, Octi Zhang, Peter Du, Antonio Serrano-Muñoz, Xinjie Yao, René Zurbrügg, Nikita Rudin, Lukasz Wawrzyniak, Milad Rakhsha, Alain Denzler, Eric Heiden, Ales Borovicka, Ossama Ahmed, Iretiayo Akinola, Abrar Anwar, Mark T. Carlson, Ji Yuan Feng, Animesh Garg, Renato Gasoto, Lionel Gulich, Yijie Guo, M. Gussert, Alex Hansen, Mihir Kulkarni, Chenran Li, Wei Liu, Viktor Makoviychuk, Grzegorz Malczyk, Hammad Mazhar, Masoud Moghani, Adithyavairavan Murali, Michael Noseworthy, Alexander Poddubny, Nathan Ratliff, Welf Rehberg, Clemens Schwartke, Ritvik Singh, James Latham Smith, Bingjie Tang, Ruchik Thaker, Matthew Trepte, Karl Van Wyk, Fangzhou Yu, Alex Millane, Vikram Ramasamy, Remo Steiner, Sangeeta Subramanian, Clemens Volk, CY Chen, Neel Jawale, Ashwin Varghese Kuruttukulam, Michael A. Lin, Ajay Mandlekar, Karsten Pатzwaldt, John Welsh, Huihua Zhao, Fatima Annes, Jean-Francois Lafleche, Nicolas Moënne-Loccoz, Soowan Park, Rob Stepinski, Dirk Van Gelder, Chris Amevor, Jan Carius, Jumyung Chang, Anka He Chen, Pablo de Heras Ciechomski, Gilles Daviet, Mohammad Mohajerani, Julia von Muralt, Viktor Reutskyy, Michael Sauter, Simon Schirm, Eric L. Shi, Pierre Terdiman, Kenny Vilella, Tobias Widmer, Gordon Yeoman, Tiffany Chen, Sergey Grizan, Cathy Li, Lotus Li, Connor Smith, Rafael Wiltz, Kostas Alexis, Yan Chang, David Chu, Linxi "Jim" Fan, Farbod Farshidian, Ankur Handa, Spencer Huang, Marco Hutter, Yashraj Narang, Soha Pouya, Shiwei Sheng, Yuke Zhu, Miles Macklin, Adam Moravanszky, Philipp Reist, Yunrong Guo, David Hoeller, and Gavriel State. Isaac Lab: A GPU-accelerated simulation framework for multi-modal robot learning. arXiv preprint arXiv:2511.04831, 2025.
  14. [14]MJX Authors. MuJoCo XLA (MJX) - MuJoCo documentation. https://mujoco.readthedocs.io/en/stable/mjx.html, 2023. [Accessed 28-01-2026].
  15. [15]Alexander Nikulin, Vladislav Kurenkov, Ilya Zizman, Artem Agarkov, Viacheslav Sinii, and Sergey Kolesnikov. XLand-MiniGrid: Scalable meta-reinforcement learning environments in JAX. In NeurIPS, 2024.arxiv.org/abs/2312.12044
  16. [16]Asha Ramanujam, Adam El Youmi, Hao Chen, Sai Madhukiran Kompalli, Akshdeep Singh Ahluwalia, Shraman Pal, Dimitri J. Papageorgiou, and Can Li. SafeOR-Gym: A benchmark suite for safe reinforcement learning algorithms on practical operations research problems. Trans. Mach. Learn. Res., 2026, 2026.arxiv.org/abs/2506.02255
  17. [17]Alexander Rutherford, Benjamin Ellis, Matteo Gallici, Jonathan Cook, Andrei Lupu, Gardar Ingvarsson, Timon Willi, Ravi Hammond, Akbir Khan, Christian Schröder de Witt, Alexandra Souly, Saptarashmi Bandyopadhyay, Mikayel Samvelyan, Minqi Jiang, Robert T. Lange, Shimon Whiteson, Bruno Lacerda, Nick Hawes, Tim Rocktäschel, Chris Lu, and Jakob N. Foerster. JaxMARL: Multi-agent RL environments and algorithms in JAX. In NeurIPS, 2024.
  18. [18]John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.arxiv.org/abs/1707.06347
  19. [19]Tristan Tomilin, Meng Fang, Yudi Zhang, and Mykola Pechenizkiy. COOM: A game benchmark for continual reinforcement learning. In NeurIPS, 2023.DOI
  20. [20]Tristan Tomilin, Meng Fang, and Mykola Pechenizkiy. HASARD: A benchmark for vision-based safe reinforcement learning in embodied agents. In ICLR, 2025.arxiv.org/abs/2503.08241
  21. [21]Tristan Tomilin, Mourad Boustani, Mickey Beurskens, and Thiago D Simão. CRAX: Fast safe reinforcement learning benchmarking. arXiv preprint arXiv:2606.20376, 2026a.arxiv.org/abs/2606.20376
  22. [22]Tristan Tomilin, Luka van den Boogaard, Samuel Garcin, Constantin Ruhdorfer, Bram Grooten, Fabrice Kusters, Yali Du, Andreas Bulling, Mykola Pechenizkiy, and Meng Fang. MEAL: A benchmark for continual multi-agent reinforcement learning. In ICML, 2026b.arxiv.org/abs/2506.14990
  23. [23]Mark Towers, Ariel Kwiatkowski, John U. Balis, Gianluca De Cola, Tristan Deleu, Manuel Goulão, Andreas Kallinteris, Markus Krimmel, Arjun KG, Rodrigo Perez-Vicente, J. K. Terry, Andrea Pierré, Sander Schulhoff, Jun Jet Tai, Hannah Tan, and Omar G. Younis. Gymnasium: A standard interface for reinforcement learning environments. In NeurIPS, 2025.arxiv.org/abs/2407.17032

Paper details

vlnc:W_bqwt4d94
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

AI

View statement
Looking for related papers…
Contents