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. Dismiss Notice

FoodCollector example: OnEpisodeBegin() gets called every few seconds

Discussion in 'ML-Agents' started by betike, Dec 5, 2020.

  1. betike

    betike

    Joined:
    May 28, 2019
    Posts:
    18
    Hi there,

    I noticed OnEpisodeBegin() gets called every few seconds and I am wondering what triggers this? and why it is every ~10 seconds or so. I can't figure out why the episode ends so quickly. The agents haven't reached their Max Step count nor I see anywhere an EndEpisode().
    Anyway to change this behaviour?
    Thanks a lot

    Monica
     
    Last edited: Dec 5, 2020
  2. betike

    betike

    Joined:
    May 28, 2019
    Posts:
    18
    Oh I just figured that there is a max step in the inspector for each agent so thats why OnEpisodeBegin() gets triggered but what's the difference between this max step for each agent and the one in the yaml file?

    Thanks!
     
  3. m4l4

    m4l4

    Joined:
    Jul 28, 2020
    Posts:
    81
    tha MaxStep you see in the inspector is related to the length of the single episode.
    If nothing else resets the agent, after reaching maxStep value, a new episode begins.
    if set to zero, there will be no time limit on the episode.

    The max_steps in the config file, is the length of the entire training session.