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

Training the carnivore

As you may have already guessed, the carnivore training is going to be fairly close as to what we did with the plant eaters. Follow along with this exercise to train the carnivore:

  1. Open Visual Studio Code or another text editor and load the trainer_config.yaml file.
  2. Add the CarnivoreBrain settings, essentially a clone of the HerbivoreBrain settings, to the end of the file, as shown in the following code:
      CarnivoreBrain:        use_recurrent: true        sequence_length: 64         num_layers: 1        hidden_units: 128        memory_size: 512        beta: 1.0e-2        gamma: 0.99        num_epoch: 3        buffer_size: 1024        batch_size: 128        max_steps: 5.0e5        summary_freq: 500        time_horizon: 128
  1. Save the file when you are done editing it.
  2. Open a Python or Anaconda prompt and activate ...

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