Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Environment parameter randomization only at the start of an episode

Discussion in 'ML-Agents' started by V3CT0R173, Mar 20, 2024.

  1. V3CT0R173


    Oct 10, 2023
    Hi there,

    I am currently building a curriculum in a yaml file. I am attempting to use parameter randomization, but I want the value to be resampled only at the start of each new episode and remain the same throughout it. I am on the latest main branch version for both the python tool and unity package. This mentions in the latest change that
    is now removed (which seems the case in my install too) to allow for exactely my scenario where I want to sample once for each episode as they say. But right now when I retrieve the parameter from the academy with
    Academy.Instance.EnvironmentParameters.GetWithDefault("param", 0.0f)
    each sample is still different.

    What should I do differently? The docs linked in the changelog don't seem to reference any way of how to do this, am I missing something in there?

    Thanks in advance!