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
17.12k stars 4.15k forks source link

Training Area Replicator, does not replicate Environments during Training #5757

Closed JulesVerny closed 2 years ago

JulesVerny commented 2 years ago

ML Agents 1.9 Training Area Replicator, to avoid having to explicitly create multiple Training Area(With its Child Agents and Enemies etc) as multiple Training Area Game Objects in my Scene.

When I use Training Area Replicator, and set the number of Area (Num Areas) and simply Press Play directly in the Editor, the Multiple scenes are created, and are played through.

However when I execute Play following with a python mlagents-learn Training session prompt, the scene only creates and plays a single Training Area instance. I note that the Num Areas filed is set to Zero in the inspector, whilst the Training session is in play.

So the ML Agents Training Area Replicator does not seem to work with the python mlagents-learn sessions ?

miguelalonsojr commented 2 years ago

Hi @JulesVerny , if you'd like to use the training area replicator in python, you'll have to add the following, for example, to your trainer config file to replicate 8 training areas:

env_settings: num_areas: 8

JulesVerny commented 2 years ago

Unfortunately when I try to use the following in my YAML env_settings: num_areas: 8 Is not recognised by the ML Agents 1.9 YAML parser it thrwos up an error "The option num_areas" is invalid I tired with env_settings at the top level of my YAML, then under Behaviours. Still does not parse. Where is the formatting of this option in the YMAL documented ?

JulesVerny commented 2 years ago

Unfortunately when I try to use the following in my YAML env_settings: num_areas: 8 Is not recognised by the ML Agents 1.9 YAML parser it thrwos up an error "The option num_areas" is invalid I tired with env_settings at the top level of my YAML, then under Behaviours. Still does not parse. Where is the formatting of this option in the YMAL documented ?

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows

From: Miguel Alonso @.> Sent: 22 June 2022 15:30 To: @.> Cc: @.>; @.> Subject: Re: [Unity-Technologies/ml-agents] Training Area Replicator, does not replicate Environments during Training (Issue #5757)

Hi @JulesVernyhttps://github.com/JulesVerny , if you'd like to use the training area replicator in python, you'll have to add the following, for example, to your trainer config file to replicate 8 training areas:

env_settings: num_areas: 8

— Reply to this email directly, view it on GitHubhttps://github.com/Unity-Technologies/ml-agents/issues/5757#issuecomment-1163178344, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAULPDZRTBILF5T3LLP7GB3VQMPRZANCNFSM5ZPJUTUA. You are receiving this because you were mentioned.Message ID: @.***>

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had activity in the last 28 days. It will be closed in the next 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically closed because it has not had activity in the last 42 days. If this issue is still valid, please ping a maintainer. Thank you for your contributions.

github-actions[bot] commented 2 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.