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

Looking at the Q-Learning ConnectedDecision script

There is some special code handling in the automatic connectivity of the cubes, but we won't be going over it. Those readers that want to extend this example are encouraged to explore the code further. For our purposes, however, the only main thing we need to look at is the changes in the Decision script. Locate the ConnectedDecision script in the Assets/Simple folder and double click on it to open it in your editor to follow along with these steps:

  1. At the top, we have the following declarations:
      public float learningRate = .9f;      public float gamma = .9f;      public float explorationEpsilon = .9f;      private float[][] q;       private int lastAction, lastState;      private int action;
  1. You can see that ...

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