AI Player v3 (skills)


Skill-based autonomous AI player for Factorio 2.0. The mod implements deterministic skills (basic loops) + primitive actions; an external bridge runs a small LLM router that picks skills/params and returns them via RCON. (Visit github to get the python code to run)

Utilities
a month ago
2.0
92
Owner:
Demon117_
Source:
https://github.com/thedemon117/ai-player-v3
Homepage:
N/A
License:
MIT
Created:
a month ago
Latest Version:
0.3.5 (a month ago)
Factorio version:
2.0
Downloaded by:
92 users

Hello World

Based off the amazing work of ob_105 for ai-player, factoring in work from factorio-agent by lvshrd, using claude I made this mod.
This is a work in progress, so check below for a changelog of sorts.

Discussion & Errors

  • Please post error messages received in the discussion here or issues on github
  • I am primarily developing the mod on a mac, but need to test on windows too

Installation

  • Github has detailed instruction for installation of this mod
    -- Git also has the repo, containing the python bridge (and MCP) to allow the model or Claude or OpenAI to play factorio
  • https://github.com/thedemon117/ai-player-v3

Github for more details (setup, skills and commands)

  • Skills are better documented in github
  • console commands for ai commands, deterministic workflows, loops, etc.

Local Recommended Model

  • qwen/qwen3-coder-next
    -- Super fast model for fast action (not having to wait up to 240 seconds for Minimax M2.7's reasoning)
    -- Capable model, albeit the skills equipped need some improvement (blame the human, not the model lol)

Factorio MCP

  • Opus created an MCP from RCON to assist with
    -- ClaudeCode taking controls
    -- Interrogating the game_state and factory to better task the ai-player over RCON

ClaudeCode recommendation

  • Sonnet is recommended if you're going to connect ClaudeCode to the game, Haiku might be reasonable
  • Opus was instrumental in getting this version of the mod functional

Discussion

  • This thing is fun and buggy, and has lots of potential for better solo and co-op play
  • Love to see if and how it's working for others
  • Would to hear about the bugs - fun and not
    -- Like setting up steam power by dropping an offshore pump on a crude oil patch with random pipes, a boiler and steam engine

Future

  • Further local agent work
  • Either use of loops or skills
  • Blueprint access, if available via RCON
  • Better use of skills, perception and less dropping of so many furnaces and cheating miners (refer to thumbnail for a burner-miner configuration)

Challenges

  • Infinite bootstrap, always dropping and starving furnaces
  • Triple burner miners - the ai cheats over RCON - illegal placement of machines

Discussion

  • This thing is fun and buggy, and has lots of potential for better solo and co-op play
  • Love to see if and how it's working for others
  • Would to hear about the bugs - fun and not
    -- Like setting up steam power by dropping an offshore pump on a crude oil patch with random pipes, a boiler and steam engine

Thanks for giving my mod a shot!


Version 0.3.5

Fixes

  • /goto-ai-player and /ai-come no longer teleport you and the AI onto the exact same tile, which could trap you under the AI character. Teleports now land beside the target (at least 1 tile away). Same fix applied to the return-to-you step of /ai-collect.

Version 0.3.4

Fixes

  • Fixed a mod load crash on some Lua versions: goto is a reserved keyword in Lua 5.2 and broke the skill registry.
  • Fixed the bridge getting stuck repeating build_ghosts forever when ghosts couldn't be built (e.g. missing items). If the last attempt failed, the AI now gathers or crafts what the ghosts need before retrying.

Features

  • The AI can now see production statistics: all-time totals and per-minute rates for key items (plates, circuits, science packs) plus researched-tech count. This helps it judge whether the factory is actually growing.
  • New run evaluation tooling for the bridge: every LLM exchange is logged to metrics.jsonl, and python -m bridge.report prints a run summary — milestone times, action success rates, response latency — with side-by-side comparison when you switch models.
  • Added an FAQ (see the repo) covering setup, providers, offline play, commands, and troubleshooting.