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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Train different brains at the same time

Discussion in 'ML-Agents' started by Aionix, Aug 26, 2020.

  1. Aionix

    Aionix

    Joined:
    Aug 31, 2018
    Posts:
    3
    Hi
    I'm making a game where 2 different heros play against 2 other heros. Lets say i have one mage, one warrior and 2 hunters. All of them need a different brain since they have different skills. So now i was wondering how i am gonna train all these different brains to fight each other?

    Is there someone who can point me in the right direction please?

    Thanks!
     
  2. m4l4

    m4l4

    Joined:
    Jul 28, 2020
    Posts:
    81
    i had a similar problem, but in my case, the 3 brains (let's talk about mage, war, hunt, for simplicity) fought for their own side (3 mages vs 3 war vs 3 hunt), so i was able to just name the behavior components, set the team numbers, and make a config file with the 3 different configurations, using the self-play parameters.
    behviors:
    Mage:
    ........
    ...........
    War:
    .........
    ............

    that way, during the training, mages get trained for x time, than war, then hunters, that way each x time they will face an improved version of their opponents.

    in your case, the problem is that you want to mix the team with different classes.
    It could still work, they'll be still trained by behavior name, but they should learn to fight alongside with their partner.

    i'm working on a similar project right now (archers & swordmans) let me know if that work, or if you need more detailed instructions