How To Use MACHINE LEARNING In Unity MLAgents Setup & Basic Environment - Pellet Grabber Tutorial #1

preview_player
Показать описание
Hi all! In this series we will be exploring the Unity MLAgents library. We are using reinforcement learning to develop a neural network for our AI to use to solve problem environments that we create for it.

In this video we walk through the setup of MLAgents and craft a basic Unity environment for the Agent to learn in.

Channels I recommend checking out for more MLAgents content:

- Time Stamps -
0:00 - Intro
0:11 - Unity Setup
2:32 - Python
6:25 - Create Virtual Environment
9:43 - Install Dependencies
14:00 - Unity Environment
24:09 - OnActionReceived
27:38 - CollectObservations
30:44 - Create Target
32:49 - OnTriggerEnter
36:13 - OnEpisodeBegin
40:37 - Changes to Agent
41:38 - Heuristic
44:12 - Bug Fix
51:21 - Real Time Training Session
53:12 - Sped Up Training
53:20 - Improve Training Time
54:32 - Sped Up Training
54:41 - Fixing Reward Issue
55:59 - Proper Training Run
57:18 - Using Neural Network
Рекомендации по теме
Комментарии
Автор

Between 44:10 and 44:15 you went off-screen to find the issue causing the agent to fall, the "isTrigger" being checked on the agent instead of the pellet, and while you were off-screen you also changed the "Space Size" under "Behavior Parameters" of the agent from 1 to 6, which fixed the "More observations (6) made than vector observation size (1). The observations will be truncated." warning. I had to re-watch a few times to figure out why I was getting the warning and you weren't.

Great tutorial, thanks!

emirsahin
Автор

You're my hero bro. I've gone thru several tutorials and your video was the most well explained video and my project actually worked. I really appreciate your time and effort you put into this video. Now, I've done a similar project like for my class project and hope to get a decent grade for that!

jkscsgo
Автор

this is the first mlagents tutorial i got to work! 10/10

HappyDucklingAndFriends
Автор

very useful tutorial, the python part was hell but after I got all of the stuff working its been really cool learning how to use this. Thank you!

aeroperea
Автор

Bro is doing God's work out here, best Mlagents tutorial rn, he doesn't skip steps like other tutorials. Great vid!!

Minoraties_In_My_WaterPark
Автор

Bruv you've just inspired me to take this up. And I have absolutely zero coding experience. Keep making these videos, you might not realise it, but you're making an impact in many lives.. thanks

dhengey
Автор

I tried to follow Unity's official getting started guide to start with mlagents and ended up wasting 3 days trying to figure out what was going on because I got several errors when installing the python libraries. It worked like a charm for the first time I tried to do so following this video. I can't thank you enough for that, I hope you have so much success because you deserve it!

brunogattai
Автор

The latest version of python you can use with the latest mlagents build is 3.10.12, but not 3.10.13 or anything over as of today.

ShinichiKudoQatnip
Автор

Amazing video.

Little tip for people wanting to test this out... Add a Z Axis Vertical control to the Agent, then train it until it learns to not even bother using the Z axis :D it's fun to watch it slowly to stop using Z. really paints how slow it takes to perfect it

amazing video thankyou. ive always wanted to learn this >< now my CPU is burning up tho

artlover
Автор

What a great video, thank you a lot, was about to give up but this video helped me a ton !

eliasnaha
Автор

23:00 behavior parameters are not showing could you please help me ?

miplo
Автор

Hey man amazing tutorial! worked with no issues on the first try. you shouldn't feel like you need to turn off the auto complete though its very useful and helps you spell, but amazing tutorial!

imchase
Автор

Maybe I missed something, but how did you stoped the learning? Because if I stop it from Unity, in console it still waiting, until UnityTimeOutException
EDITED: I found, "ctrl" + "C"

OlekandrAntonesku
Автор

More observations (6) made than vector observation size (1). The observations will be truncated.
(string, object[]) help what should i do pls i love you but help me pls pls

thekiler
Автор

its a very very good video thank you so much i dont know how to thank you but i hope its enough THANKS!

EliaE
Автор

Can someone please help me why I can't move manually my agent?

MaryYush
Автор

My agents are learning to stay still, not sure what you did to fix that issue, could you help me out?

melonman
Автор

You’re the first person I’ve ever seen who prefers to have autocomplete turned off. Here in the web dev world some people, myself included, chooses to go to the extra length of having AI autocomplete as well haha. Just thought that was kinda funny. Anyways, great video. I learned a lot. You definitely earned a sub

tutorialsandgaminghelp
Автор

I found the agent during training found that it stays in place neither gaining lr loosing points decreasing the mean rewards with time, how doi fix this??

moonknight
Автор

Hi! Thanks for the video. When i try to attach my script to the "add component" in agents, the "behaviour parameter" does not show up. If I try to add it manually, I am not able to change the name of the behaviour. Any idea as to why unity Is not doing this automatically, as it should. I am a beginner. Any help would be much appreciated.

AdityaRoyChowdhury-vi