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.

Training versus a pretrained Brain

Discussion in 'ML-Agents' started by Sephraih, Apr 13, 2020.

  1. Sephraih

    Sephraih

    Joined:
    Jun 15, 2019
    Posts:
    11
    Of course, self-play already covers this during the training, however, I would love to be able to reuse a trained brain to pit a variety of new setups against each other - creating a basic ai to compete against for updated or specialized agents (that have different abilities for example, or learn with different rewards, etc.)

    So far, I have tested the trained models by adding them to the Behavior Parameters under the model - adding them there and starting a new training will however train a new brain as far as i know.
    Having a different gameobject with the same setup, would still be subject to that training, hence, seeing I wasn't able to find a parameter to be given to the --train command that would allow to only train a certain brain / behavior depending on its name or so, I wondered if there is any way to achieve this at all - is there for example a component that only plays the brain but doesn't train them?

    Thanks a lot for your time and replies! :)
     
  2. andrewcoh_unity

    andrewcoh_unity

    Unity Technologies

    Joined:
    Sep 5, 2019
    Posts:
    162
    Can you use the 'inference only' setting of the behavior type in the behavior parameters script to achieve this?
     
  3. Sephraih

    Sephraih

    Joined:
    Jun 15, 2019
    Posts:
    11
    Ah, thanks, seems like i misunderstood the inference option to train if connected to a trainer.
    - oddly, if i keep one of the self-play agents set to inference only and another to train anew (default), the model of the training agent seems to update to the interference agent brain's behavior quite rapidly, which i deemed it not working earlier - I'll get to the bottom of it, i guess :)

    thanks again, greetings,
    seph