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

Building the herbivore

In the 2002 version of Terrarium, developers had to code the brain on their own and this sometimes grew to thousands of lines of code. We, however, know that with the ML-Agents tools, we can let the creature program or build its own best solution using DRL. Open up Unity to the Terrarium scene and follow along in order to build the herbivore:

  1. Right-click (Command click on macOS) the Academy object in the Hierarchy window. From the context menu, select Create Empty. Rename the new object HerbivoreBrain.
  1. Add a Brain component to the object and set the properties as follows:
Setting the HerbivoreBrain properties

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