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

Question Train ML Agent on different levels

Discussion in 'ML-Agents' started by Taskmanager, Feb 9, 2021.

  1. Taskmanager

    Taskmanager

    Joined:
    May 15, 2017
    Posts:
    2
    Hi,
    I'm currently developing an Agent for my racing game.

    When I started training on my very complex first level, the agent made 2/3 of the track in 24 hours learning.

    So I thought that I should train the agent on simple tracks first (a straight track, a simple round track,...)

    But how do I train a previous trained model on a different game level?

    Is "- - resume" the right approach or is there another command for learning on different environments?


    For example is this right after the training on a previous different level?
    mlagents-learn - -run-id="PreviousRunId" --resume

    Or is this the wrong approach and I should train different tracks simultaneously with multiple agents?
     
    Last edited: Feb 9, 2021
  2. awjuliani

    awjuliani

    Unity Technologies

    Joined:
    Mar 1, 2017
    Posts:
    69
    Hello. You can run resume to continue training a model on a new environment, but I would recommend having many different agents learning on different tracks simultaneously. This will prevent any possible catastrophic forgetting (https://en.wikipedia.org/wiki/Catastrophic_interference) which may take place if you try to train the model sequentially.
     
  3. Taskmanager

    Taskmanager

    Joined:
    May 15, 2017
    Posts:
    2
    Thank you, I will give it a try. I've also seen that the karting micrograme uses multiple levels in parallel.