Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Curious question: trainer_controller.reset_env_if_ready inside for range(n_steps) loop

Discussion in 'ML-Agents' started by Rechant, Aug 26, 2020.

  1. Rechant


    Mar 14, 2020
    Don't know if anyone can help me with a specific curious question I wasn't able to answer digging through the code:

    Why is trainer_controller.reset_env_if_ready inside a n_steps loop? n_steps refers to the number of distinct UnityEnvWorkers that have stepped through their respective environments (as I understand it, this is if you wanted to train for num-envs > 1). Also, there is no particular check as to which env_worker might need a parameter update or reset, just that it resets all env_workers.

    Any insight? Thanks in advance.