Factorio is a C++ game. Its Lua sandbox hosts a cooperative Silk OTP agent. Game ports sit on the deployment boundary. The agent asks a .NET mind for goals and plans using Erlang distribution through a TCP gateway and RCON. The gateway registers Factorio with EPMD; the mind looks up the port. Dotted lines are discovery only. The mind chooses the first feasible goal in a fixed ladder and uses a recipe HTN-lite planner that simulates a world copy. Emacs evaluates through an nREPL bridge that sends each form over RCON to the in-game REPL entry, remote.call silk eval, which runs factorio.repl/eval-string between ticks in the same Silk world as the agent.
Game process
Silk OTP · Lua
Factorio
Environment
Ports
Agent
Sense · execute
Dist
Percepts
Actions
REPL entry
runs between ticks
remote.call('silk','eval')
→ factorio.repl/eval-string
send! {:act op}
to the body
Gateway
Byte relay
RCON
Mind · .NET
Silk OTP
Goal ladder
First feasible goal
Recipe planner
HTN-lite · world model
TCP
Ask / plan
Erlang distribution
EPMD
Node discovery
Register
Lookup
Dotted: connection discovery
Solid: percepts, actions, asks + plans
nREPL bridge
Silk · .NET
nREPL · 7999
RCON · /sc remote.call('silk','eval', code)
Emacs
CIDER · REPL client
Silk OTP message
nREPL · Emacs
discovery · EPMD
call
1×
loop
1
-
5
modes
space
play
→
step
esc
picture