Unity-ML-Environments icon indicating copy to clipboard operation
Unity-ML-Environments copied to clipboard

agent not moving when set to internal

Open ghost opened this issue 6 years ago • 11 comments

kindly suggest me a solution I am trying to run your project, and after training it when I add trained graph file and set brain type to internal the agent not even move please suggest how should I make it work

ghost avatar Mar 02 '18 16:03 ghost

Hi, which environment are you referring to? A specific one or all of them? To be honest, I have never run my environments in internal mode.

MarcoMeter avatar Mar 02 '18 16:03 MarcoMeter

I am talking about simple continuous controller if you haven't tried them in internal mode then how do you see what have they learnt

ghost avatar Mar 02 '18 16:03 ghost

You can use the external inference mode.

Inside the jupyter notebook, just set load_model to True and train_model to False. Then the agent is put to action on its learned policies. Also, the inference settings on the academy apply (e.g. resolution and time scale).

MarcoMeter avatar Mar 02 '18 16:03 MarcoMeter

can you guide me a bit further that when I am setting load model to True which model will be loaded and why isn't it performing in internal mode where as we test the brain in internal mode, doing what it has learned

ghost avatar Mar 02 '18 17:03 ghost

The latest model is loaded. Please track down the python code if you want more insights.

I'm not using the internal mode, because TensorflowSharp is highly experimental.

MarcoMeter avatar Mar 02 '18 17:03 MarcoMeter

thanks for your help its working in external mode but the continuous controller agent start moving toward the bottom left corner and it just sticks there guide me if you have experienced the same

ghost avatar Mar 02 '18 17:03 ghost

Are you using a camera observation as input?

So far its not been working for this environment. Continuous inputs, such as direction to the target and the velocity of the agent works out within thousands of steps.

MarcoMeter avatar Mar 02 '18 17:03 MarcoMeter

no not using camera, so far I have trained it first after building in external mode the training continued till 850000 steps now it stuck to the wall when I am loading the model(as you suggested)

ghost avatar Mar 02 '18 17:03 ghost

If you didn't change anything after cloning the project, there is one camera resolution setup on the brain. If you set it to 0, just the continuous state is used as input. Then, the agent should be able to solve the tasks after a few thousands of steps. anything

MarcoMeter avatar Mar 02 '18 17:03 MarcoMeter

thanks I really appreciate. It worked and I was able to train it correctly, but for this time when I set load model true and run the script, the unity environment loads and suddenly in a moment shuts down don't know what's going on please guide

ghost avatar Mar 04 '18 13:03 ghost

As I updated the whole repository to ml-agents' version 0.3b, the jupyter notebooks are not included anymore. Maybe your issue is gone with the new version of ml-agents. Refer to the ml-agents repository for further information on how to run environments for training.

python learn.py builds/SCC --train --run-id=scc_1

MarcoMeter avatar Mar 22 '18 20:03 MarcoMeter