How to use Machine Learning AI in Unity! (ML-Agents)

How to use Machine Learning AI in Unity! (ML-Agents)

Let’s learn how to get started unlocking the POWER of Machine Learning AI in Unity!
Unity Machine Learning Playlist:
Get my Complete Courses!
Learn to make awesome games step-by-step from start to finish.

ML-Agents GitHub

Give your feedback on the forums:

00:00 What is Machine Learning, ML-Agents
01:22 Installation (Python, PyTorch, CUDA, ML-Agents)
10:10 New Unity Project

12:00 Create Agent

13:35 Agent Actions

17:21 Test Training

19:46 Agent Observations

24:10 Agent Reward

27:57 Heuristics Testing

29:38 Training

34:22 Use Trained Brain Model
40:04 Improve Brain Model
40:55 TensorBoard Visualization
43:25 Final Result

Teach your AI! Imitation Learning with Unity ML-Agents!

Get Code Monkey on Steam!
Interactive Tutorials, Complete Games and More!

If you have any questions post them in the comments and I’ll do my best to answer them.

Subscribe for more Unity Tutorials

See you next time!

Support on Patreon
🤖 Join the Community Discord
Grab the Game Bundle at
Get the Code Monkey Utilities at

#unitytutorial #unity3d #unity2d


Hello and welcome, I am your Code Monkey and here you will learn everything about Game Development in Unity 2D using C#.

I’ve been developing games for several years with 7 published games on Steam and now I’m sharing my knowledge to help you on your own game development journey.

You can see my games at


– Website:
– Twitter:
– Facebook:

NASA depot banner for NASA merge NASA hoodies NASA T-shirts and NASA accessories