Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

How to reset ML Agents environment when MaxStep is reached?

Discussion in 'AI & Navigation Previews' started by SaroVati, May 28, 2020.

  1. SaroVati

    SaroVati

    Joined:
    Jun 7, 2015
    Posts:
    5
    Hello,

    Haven't found an answer to this, but I have a few functions that subscribe to the OnEnvironmentReset, but OnEnvironmentReset is only called at the start of my training, and never when MaxStep is reached. It feels like I'm missing something extremely simple, but I can't find the issue.

    EDIT: On further research, I understand the use cast of OnEnvironmentReset. My question now is: Is there a built in event for when MaxSteps is reached, or should I design that myself? All of my agents currently would be acting with a MaxStep of 5000, and I'd like an "OnEpisodeEnd" event to subscribe and reset my environment with.

    Any help would be great!
     
    Last edited: May 28, 2020
  2. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400