Search Unity

Question Training different agents simultaneously

Discussion in 'ML-Agents' started by TheJarmanitor, Jun 5, 2021.

  1. TheJarmanitor

    TheJarmanitor

    Joined:
    Mar 18, 2018
    Posts:
    20
    Right now i have two agents, both completely different in actions and rewards. One is a "regular" agent, trained to finish a level, and the second one gets information from the first agent and learn from it. So, here are my questions:

    1. How do i would go on training such different agents at the same time? Is it just like with normal but adding a second behavior on the YAML file?
    2. I already trained the first agent. can i just train the second agent and just have the first one use the model instead of having it train?
     
  2. andrewcoh_unity

    andrewcoh_unity

    Unity Technologies

    Joined:
    Sep 5, 2019
    Posts:
    162
    Hi @TheJarmanitor

    1. Yes. You could train them both simultaneously by adding a second behavior name to the yaml. You could also alternate training using our self-play feature if this seems to be a little unstable.
    2. Yes. You can set the `Behavior Type` to Inference only in the behavior parameters component of the agent that has already been trained when training the second agent. This will just run the onnx model of the trained agent and will not continue to train it.