Unity-Technologies / ml-agents

The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents using deep reinforcement learning and imitation learning.
https://unity.com/products/machine-learning-agents
Other
16.93k stars 4.13k forks source link

Help with imitation learning #2249

Closed ImBackAgain closed 4 years ago

ImBackAgain commented 5 years ago

image The issue is the above exception being thrown when I try to use the Inference Engine on a model generated through online imitation learning.

Here's what I did:

  1. I created an empty scene
  2. I created an empty GameObject, to which I attached Ball3DAcademy
  3. I added two instances of the 3D ball Game prefab
  4. I changed one of the instances to use a 3D Ball Player brain
  5. I added 3DBallLearning and 3DBallPlayer to the Academy's broadcast hub.
  6. I copied the online bc config file, and set the appropriate value for brain_to_imitate
  7. I ran mlagents-learn with --slow and --train (pretty sure it worked, as the student's behaviour did change to reflect mine). I did end training by stopping play mode in Unity.
  8. Oh, I also changed the player brain's axes to Mouse X and Mouse Y. I don't expect that's where the issue is, but I thought I'd mention.
  9. I retrieved the generated model and attached it to 3DBallLearning.
  10. I unchecked the Control box for the 3DBallLearning in the Academy.

I have also checked that the original 3DBallLearning model still works fine for inference. It's the model generated that seems to have issues.

Anyone have any advice?

shihzy commented 5 years ago

hi @ImBackAgain - the only thing I can think of is there might have been some issues with the mapping between using a mouse to actions that the agent will use. Have you tried to do the imitation learning without the mouse and see if that works?

ImBackAgain commented 5 years ago

Just tried switching it back to the Horizontal and Vertical axes. Trying to use the model generated thus yields the same result.

Anything else? (And thanks for your reply, @unityjeffrey!)

shihzy commented 5 years ago

not sure on that... CC: @ervteng - any thoughts on the thread and inference error using IL with the 3dball?

chriselion commented 4 years ago

I'm going to close this due to inactivity.

That particular error log is fixed on the development branch right now. It is generally caused by another error, so if you're hitting problems, you should look earlier in the output logs.

github-actions[bot] commented 3 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.