This is my personal framework for AI experiments in Factorio.
You can install this mod through the built-in modloader of Factorio under the name "Ember Autopilot". Alternatively, you can manually install it using git or by downloading the source code in .zip format.
Mod folder (Windows): %appdata%\Factorio\mods
Mod folder (Mac OS X): ~/Library/Application\ Support/factorio/mods
Mod folder (Linux): ~/.factorio/mods
cd <path to factorio mods>
git clone https://github.com/Diordany/factorio-ember-autopilot.git ember-autopilot_0.4.1
Just save the .zip file to the mod directory of Factorio as ember-autopilot_0.4.1.zip
(or leave the name as is if downloading from the releases page).
Ember Autopilot works by binding agent programs to players to perform specific tasks. The agent programs that are currently available are explained here.
This agent uses Factorio's built-in pathing algorithm to navigate to the given position. Start the agent with the command:
/ember-path <x> <y>
I couldn't get Factorio to generate a path that avoids collisions. I'm not sure if I missed something, but I'm planning on implementing a pathfinding algorithm myself anyway.
cmd-path.webm
You can make the player walk towards a target position with the command:
/ember-walkpos <x> <y>
You can also start the agent with a position relative to the player:
/ember-walkrel <x> <y>
This agent does not use a pathfinding algorithm. It stops whenever its path is blocked.
cmd-walkpos.webm
This agent wanders around aimlessly while trying to avoid obstacles. Start the agent with the command:
/ember-wander
cmd-wander.webm
If for whatever reason you want to stop the agent, just run the following command:
/ember-stop