ml-agents icon indicating copy to clipboard operation
ml-agents copied to clipboard

Need help with multiple brains in one scene

Open Maximus-CZ opened this issue 9 years ago • 3 comments

I cant seem to get it working. I posted several questions regarding it and received several answers, but even tho I passed more and more "exceptions" I cant get it run. I think its not in my power to ask and receive sufficient feedback to make it work, I hereby ask for some code guru to make a working example, that I can modify enough to suit me.

Questions: Can there be an example scene with 2 working brains? <-- This is the most important step I am working towards and cant get it working. Please if you can code it post what needs to be made, I am desperate

Can there be an option to call train function for specific brain, and step different brains asynchronously? I got a reply that its not possible to get more brains learned in one environment atm, but would love to see it happen. Can anyone give direction for this?

Maximus-CZ avatar Oct 03 '17 10:10 Maximus-CZ

I think the error you are getting is because you are trying to use the ppo.py script to do the training. As of right now, the PPO algorithm only works in very specific use cases (including only one brain). If you want to train multiple brains at the same time, you will have to create and train two different neural networks. If you have more than one brain in your scene, calling step or reset will give you a dictionary mapping brain names to BrainInfo objects that you can use for your training. When calling step, you will need to input a dictionary for the actions mapping from brain names to numpy arrays. I hope this helps.

vincentpierre avatar Oct 05 '17 23:10 vincentpierre

We have released this feature as part of our 0.3. release. Please check it out!

eshvk avatar Mar 28 '18 20:03 eshvk

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.

lock[bot] avatar Jan 03 '20 16:01 lock[bot]