O'Reilly logo

Learn Unity ML-Agents - Fundamentals of Unity Machine Learning by Micheal Lanham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting up a cloning behavior trainer

The trainer we use when performing Imitation Learning is called Behavioral Cloning. This trainer matches the PPO trainer we have used many times before, but it is extended to take observation and action space input from a training or player brain. Fortunately, the configuration is quite similar and only requires some special customization. Follow this exercise to finish configuring the trainer and play the game:

  1. Open the trainer_config.yaml file in Visual Studio Code or your favorite editor and add the following new section at the end of the file:
      Student:        trainer: imitation        max_steps: 10000        summary_freq: 1000        brain_to_imitate: Teacher              batch_size: 16        batches_per_epoch: 5        num_layers: 4              hidden_units ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required