Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

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.