MarcoMeter/Unity-ML-Environments

agent not moving when set to internal

Opened this issue · 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

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.

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

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).

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

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.

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

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.

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)

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

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

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