unity-game-engineml-agent

Couldn't connect to trainer on port 5004 using API version API-13 when using Unity3D ML-Agents


I'm using Unity3D ML-Agents and when running examples of multiple clones inside(3DBall for example), there is a message in the console says:

Couldn't connect to trainer on port 5004 using API version API-13. Will perform inference instead. UnityEngine.Debug:Log(Object) MLAgents.Academy:InitializeEnvironment() (at Assets/ML-Agents/Scripts/Academy.cs:228) MLAgents.Academy:LazyInitialization() (at Assets/ML-Agents/Scripts/Academy.cs:147) MLAgents.Agent:OnEnable() (at Assets/ML-Agents/Scripts/Agent.cs:255)

I tried to turn off the firewall but it didn't work. How can I solve it?

The version I'm using is

Unity 2018.4.14f1, 
ml-agents: 0.13.0,   
ml-agents-envs: 0.13.0,  
Communicator API: API-13,   
TensorFlow: 1.7.1

Solution

  • This is just a normal warning that tells you that you won't train but instead use an already trained version in the environment(s). You don't need to worry about this. I assume your environment works when you start it.

    If you really want to turn this off, you can go to the agent object and look for the 'Behavior Parameters' -> 'Behavior Type' then set this value to "Inference". Make sure to set it back to default when you want to train your agents.

    enter image description here

    If you want a good introduction to MLAgents, make sure to check out my YouTube ML-Agents Playlist

    Edit: I just saw that you're using a beta version. Make sure to use at least version 0.16.0. Probably just going through my first video would be the best idea to get you started.