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.14k forks source link

Want to be able to specify which brains to train, as of 0.11 #2928

Closed robinerd closed 4 years ago

robinerd commented 4 years ago

In our game Source of Madness we are using ML agents to train our monsters, with reinforcement learning.

We are now looking into the possibility to also train an agent that plays the main character, using imitation learning. This could help us out with some basic QA and testing. As of 0.11, we can not train the player agent while having inference for the monsters. Training everything at the same time is not an option as it takes a long time for monsters to learn.

I saw a code change work-around mentioned in another thread, but I would like to request this as a feature also. Training everything in the scene is still a good default and I like how the framework is easier to use now. Maybe a way to override which "brains" to include in the training would work. That could possibly also solve my issues in #2927.

Thanks! Robin Carry Castle

mbaske commented 4 years ago

I saw a code change work-around mentioned in another thread, but I would like to request this as a feature also.

Hi @robinerd, the code change you're referring to is actually really minor. I've created a gist here https://gist.github.com/mbaske/64a0e261f02aa7daff459cc1afef0198

robinerd commented 4 years ago

Hi, Thanks for that! I will give it a try, should be enough for now.

PinataMostGrim commented 4 years ago

This was a feature I also used in previous versions of the MLAgents toolkit and would like to second the request for it to return as an official feature.

chriselion commented 4 years ago

@mbaske Just a heads up that we changed the "Use Heuristic" bool to an enum in 0.12.0, which is equivalent to your change. Going to close this.

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.