AI Player

by ob_105

Adds an autonomous AI player that uses LM Studio/Open ai to play Factorio. The AI can build, mine, craft, fight, and interact with the world.

Utilities
a month ago
2.0
593
Logistics Combat Character Enemies Logistic network Manufacturing

g Not working on linux

a month ago

RCON connection failed.

Here is full log:

lf@lf-pc:~$ python3 /home/lf/.factorio/mods/ai-player_0.1.2/lm_studio_bridge.py

LM Studio Bridge for Factorio AI Player

[Bridge] Monitoring directory: /home/lf/.factorio/script-output/ai-player
[Bridge] LM Studio URL: http://127.0.0.1:1234/v1/chat/completions
[Bridge] RCON: 127.0.0.1:27015
[Bridge] Verbose logging: True (file: /home/lf/.factorio/script-output/ai-player/bridge_debug.log)
[Bridge] Starting LM Studio Bridge...
[Bridge] Press Ctrl+C to stop
[20:54:43] RCON settings updated via config: host=localhost, port=27015, password=(empty)
[20:54:43] Loaded config: provider=lmstudio, base=https://api.openai.com/v1, lm_url=http://localhost:1234/v1/chat/completions, custom=None
[20:54:43] LM Studio is running. Available models: 19
[20:54:43] RCON connect failed: Failed to establish a connection to the server
[20:54:43] Make sure Factorio is running and RCON is enabled
[20:54:43] Will continue monitoring but cannot send responses
[Bridge] Bridge is running. Waiting for requests...

[20:54:43] Reconnecting RCON with updated settings...
[20:54:43] RCON connect failed: Failed to establish a connection to the server
[20:54:43] Make sure Factorio is running and RCON is enabled
[20:54:43] Will continue monitoring but cannot send responses
^C[20:56:33] Stopping bridge...

a month ago

Is rcon set up correctly? It needs to be Set up in both factorio and the mod settings in factorio. If it is set up properly, Try running the bridge after the world is loaded.

a month ago

Wait, is it not enabled by default? I checked multiplayer server settings and there seems no rcon option. And I have checked local-rcon-socket parameter, it's set to 127.0.0.1:27015 (default)

a month ago

Wait, is it not enabled by default? I checked multiplayer server settings and there seems no rcon option. And I have checked local-rcon-socket parameter, it's set to 127.0.0.1:27015 (default)

New response