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.

Question ML-Agents 2 Tasks

Discussion in 'ML-Agents' started by webjeff, Nov 12, 2022.

  1. webjeff

    webjeff

    Joined:
    Mar 11, 2015
    Posts:
    39
    Hi,

    How would you go about training 2 sequential actions. For example, if you had to train a bot to get a key and open the door. Going to find the key is one task and then finding the door is the second.

    Would I just ignore rewards on the door if they don't have the key yet?

    Thoughts?
    Thanks!
     
  2. garytrickett

    garytrickett

    Joined:
    Sep 2, 2018
    Posts:
    60
    you could use academy training and add the door as part of a later lesson so the AI learns quickly one task at a time
    but yes, make sure the door can't be opened without the key otherwise it will learn to skip picking up the key
     
  3. Veinemoinen

    Veinemoinen

    Joined:
    Sep 17, 2020
    Posts:
    2
    Also consider using a goal signal for this in addition to classic observations, if that information on their task is available. E.g. provide a signal of 0 if the goal is "get the key" and 1 if the goal is "open door with key".