Skip to content

JackHopkins/factorio-learning-environment

Repository files navigation

Factorio Learning Environment

Leaderboard | Paper | Website | Documentation | Discord (#factorio-learning-env)

An open source framework for developing and evaluating LLM agents in the game of Factorio.

Claude Opus 4.1 Plays Factorio

Quick Links

Installation

Prerequisites

  • Docker
  • Python 3.10+
  • Factorio (version 1.1.110), only for optional rendering.
# Core FLE SDK package
pip install factorio-learning-environment

# With optional features
pip install factorio-learning-environment[eval]      # For running experiments
pip install factorio-learning-environment[mcp]       # For MCP protocol support  
pip install factorio-learning-environment[psql]      # For PostgreSQL support
pip install factorio-learning-environment[eval,mcp,psql]  # All features

# Using uv (recommended)
uv sync

Quickstart

Use the CLI:

# Activate venv
source .venv/bin/activate

# Start Factorio cluster
fle cluster start

# Run evaluation trajectories (requires [eval] dependencies)
fle eval --config configs/gym_run_config.json

Environment

FLE is an agent evaluation environment built on the game of Factorio, a popular resource management simulation game.

Agents interact with FLE by code synthesis through a REPL (Read-Eval-Print-Loop) pattern:

  1. Observation: The agent observes the world through the output streams (stderr/stdout) of their last program.
  2. Action: The agent generates a Python program to perform their desired action.
  3. Feedback: The environment executes the program, assigns variables, add classes/functions to the namespace, and provides an output stream.

Contributing

Join our team and contribute to one of the AI research community's most challenging problems - building open-ended / unsaturateable evals for post-AGI frontier models. If you want to contribute, please read CONTRIBUTING.md first.

Ask DeepWiki

About

A non-saturating, open-ended environment for evaluating LLMs in Factorio

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages