Skip to content

arturh85/factorio-bot

Repository files navigation

Factorio Bot

User Guide LUA API Docs MIT License GitHub issues Dev Guide

What is it?

Factorio Bot is a platform for the game Factorio inspired by factorio-bot. It allows scripted execution of a factorio server and multiple clients.

Goals / Use Cases:

  • TAS (Tool Assisted Speedrun) to beat the world record with many bots which share the workload efficiently
  • Learning Environment to train Machine Learning algorithms within Factorio
  • Playground for Factorio Experiments

Youtube Videos

Features

  • sets up & starts factorio server & configurable number of clients
  • resizes Factorio client windows so the whole screen is equally used (windows only)
  • integrated monaco lua editor which allows scripting of bots
  • uses included factorio mod to read factorio instance ...
    • recipes
    • entity prototypes
    • item prototypes
    • entities
    • resources
  • Build Graphs of:
    • Entity Connections with distance based weights
    • Flow Connections with flow rate per second for each belt side/resource
    • Bot Task Dependencies with time estimate based weights
  • Example LUA Script which can:
    • Plan some task with time estimation
    • Find Seed which minimizes execution time
    • Research Automation in MM:SS (work in progress)
  • (optional) REST API Endpoints with OpenAPI specs
  • read map contents by chunk for leaflet based Map View (currently broken)
  • use whatever mods you want, configured in central location for all factorio instances
  • should work on Win/Mac/Linux (not tested on Mac)
  • MIT licenced

Planned Features

  • Create ZIP from Steam Verson of Factorio
  • Indicate Client Actions as Drawn Lines / Rectangle in the Factorio Client

Quickstart

  • Download the latest release for your Operating System
  • Download Factorio as .zip or .tar.xz (don't use the headless version!)
  • Start the application and select your downloaded factorio archive under Settings
  • Use the Start Button in the top right to start the given number of factorio instances with given seed/map exchange string
  • Select the Script you want to run and execute it

Contribute

See the Dev Guide and Send me your Pull Requests :)

Contact

Email: arturh@arturh.de