Тёмный

🚗 Neural Networks and Genetic Algorithms for a Self Driving Car in Unity [Part 2/3] 🚗 

AJTech
Подписаться 8 тыс.
Просмотров 13 тыс.
50% 1

A fully self driving car in Unity from scratch using Neural Networks and Genetic Algorithms! Yes I said from scratch, we will be coding everything ourselves so that you can understand from the base up how everything works. I have been working on this video for quite a while to make it the best I can for you ❤ Of course you can apply all of these concepts and techniques into your own games, research and simulations.
PROJECT FILES (PLUGINS & COURSE) :
☢ github.com/AJTech2002/Self-Dr...
* NEWS : Welcome to the community!! I want to congratulate everyone on reaching 2500 subscribers, this is a collective accomplishment and I thank you all for your support. *
Firstly I would like to apologise for the late upload times I know I announced this video a while ago, I really wanted to polish up the system before I shared with everyone :)
FIXES : So if you followed along from the last episode you won't have any of the issues that I mentioned on the video, however if you pulled from the Git Repository then those issues will exist. Also apologies for incorrect or unclear explanations of neural networks or genetic algorithms.
----- LETS TRY AND HIT : 25 LIKES ✌ ---------
★ Upcoming Videos :
- Open World Series Part 5 ❤
✄ LINKS MENTIONED IN VIDEO ✄ :
GENETIC ALGORITHM RESOURCES
☢ blog.sicara.com/getting-start...
FEED FORWARD NEURAL NETWORK RESOURCES
☢ towardsdatascience.com/a-gent...
NEAT ALGORITHM
☢ towardsdatascience.com/neat-a...
MATRIX MATH
☢ en.wikipedia.org/wiki/Matrix_...
☁ In this video we begin our journey by creating the first of the three scripts, the Car Controller which is a script that provides the inputs to the neural networks, calculates the fitness function for the genetic algorithm and does the most important job of moving the car itself.
◕‿◕ The next part is even better and in order for you to see it you have to subscribe and tap that bell icon to be notified :
►► ru-vid.com_... ◄◄
☾ Stay tuned for the next episode, I will be releasing new videos once every 5 to 6 weeks discussing what I have done over the course of the weeks, always giving you some good entertainment with some knowledge on how you can tackle complex challenges in your own games! (◕‿-)
I'll see you next time ✌
✄ IMPORTANT LINKS YOU SHOULD CHECK OUT ✄ :
DEV LOG PART 1
☢ • Video
DEV LOG PART 2
☢ • Video
DEV LOG PART 3
☢ • Video
CUSTOM CHARACTER CONTROLLER TUTORIAL
☢ • (01) Stealth Game - Cu...
INVERSE KINEMATICS SERIES
☢ • (05) Stealth Game - In...
♬ MUSIC ♬ :
☮ Wayr - Follow the light
► CORE VIDEOS ►:
✌ WOW Trailer
If any of these videos or music belong to you and you wish for them to be taken down, please email me at : ajays.workemail@gmail.com
Thank you, for watching guys :)
#unity #ai #neuralnetwork

Хобби

Опубликовано:

 

9 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 64   
@godofnoobs1597
@godofnoobs1597 3 года назад
I can't thank you enough dude... Thaught the stuff that even colleges dosent teach.Thanks plz make more videos on AI
@batchprogrammer108
@batchprogrammer108 4 года назад
Hey guys, sorry about the wait for this episode. One more episode to conclude this series; and that will be up in the next 2 days. In terms of the open world game, I am going to release a long awaited development log in 3-4 days. Also in the video; if you followed along from the last episode you won't have any of the issues that I mentioned at the start of the video, however if you pulled from the Git Repository then those issues will exist. You guys should definitely check out 3Blue1Brown's video on Neural Networks; it's very clear and comprehensive.
@blackfrogstudios6670
@blackfrogstudios6670 4 года назад
Oof
@akashgupta6287
@akashgupta6287 4 года назад
Can you please send the link of the paper that you were mentioning?
@sakithanavod9289
@sakithanavod9289 4 года назад
Can't wait for part 3! Trust me your doing a very good job!
@batchprogrammer108
@batchprogrammer108 4 года назад
Thank you very much :)
@amirmadjour9561
@amirmadjour9561 4 года назад
Cool man I was waiting for this
@TheTechpreneurs
@TheTechpreneurs 4 года назад
Cool waiting for the next one💪💪💪💪💪💪
@rokster98
@rokster98 4 года назад
Really good stuff mate!
@yigitgenc1734
@yigitgenc1734 4 года назад
Man this neural network script and how you made it flexible for many hidden layers is brilliant. Keep up the amazing work
@batchprogrammer108
@batchprogrammer108 4 года назад
Thank you very much, hope you enjoyed :]
@PESCADORSHOES
@PESCADORSHOES 3 года назад
This is a peace of tutorial. Thanks a lot!
@bigdickbee2189
@bigdickbee2189 3 года назад
That is a very good explanation. I got it immediately! Keep going!
@nilsiderallerechte5428
@nilsiderallerechte5428 4 года назад
Amazing Video and explanation!! Thank you very much this was the best tutorial I found and the only one I need ;- )
@floriangibault4700
@floriangibault4700 4 года назад
Oh thanks you very much for this episode, I was waiting for it happily
@batchprogrammer108
@batchprogrammer108 4 года назад
You are very welcome, I'll make sure to upload part 3 within the next few days :)
@ramitgrover4995
@ramitgrover4995 4 года назад
nice job dude. Happy to look at your progress :) keep going
@batchprogrammer108
@batchprogrammer108 4 года назад
Thanks bro :)
@erfanzandi1362
@erfanzandi1362 7 месяцев назад
Great Video thankx
@julianrockl4228
@julianrockl4228 4 года назад
Hope you keep your word and release the next episode the next few days :)
@mateusdsp6871
@mateusdsp6871 4 месяца назад
Good! :D Jesus is coming back, God bless!
@acropolise1319
@acropolise1319 4 года назад
Do the Cars able to drive in Slopes and Ramps? Please answer!
@papercolor8259
@papercolor8259 4 года назад
i like your vscode's coding code
@tomtomkowski7653
@tomtomkowski7653 Год назад
In new c# you can replace .count -1 to ^1 so instead of hiddenlayers[hiddenlayers.count -1] you can just write hiddenlayers[^1] 42:12 didn't watch till the end yet - but in line 48 shouldn't be there else statement?
@rocketwastaken
@rocketwastaken 3 года назад
Imagine walking up to some student at MIT and showing him the self driving car
@thecoone2797
@thecoone2797 3 года назад
Hey i have some questions and i hope u will answer them. I understood everything, until you started with the implementation. Pause the video at 43:15 and i'll ask some questions about that. correct me where i'm wrong 1. Why are we looping until i
@WhiteBeansYT
@WhiteBeansYT 2 года назад
I also was wondering about your Q3 - did you figure out why he was applying Tanh at each layer and not just the final layer like he said earlier? Thanks :)
@julianrockl4228
@julianrockl4228 4 года назад
Woldn't hire you as a designer but you know the gaps of the internet. As you said, there aren't much videos like this on RU-vid and your's is the best one for beginners. Thank you for the work, can't wait for Part3.
@batchprogrammer108
@batchprogrammer108 4 года назад
Hahaha yeah as you can tell my graphical abilities are subpar, I'm glad you're enjoying it. I'm recording Part 3 as I write this :)
@Serazai
@Serazai 3 года назад
Why do you reapply Math.tanh to the output[0,1] even though PointWiseTanh should already give you a value between (-1,1) when you applied it on the output layer ? That will give a different steering output value to the originally computed one right ?
@devacharya3892
@devacharya3892 4 года назад
Quick advice, with the neural networks you've got there, I reckon you should input the conditional to optimize the rays that beam of the car. This will help make it more realistic and additionally use up less code in the mesh.
@batchprogrammer108
@batchprogrammer108 4 года назад
Sounds good, you must be really smart
@devacharya3892
@devacharya3892 4 года назад
@@batchprogrammer108 I'm a professional batch coder and I cam across your channel. There are some issues in the code but overall it is satisfactory. Needs improvements in the aesthetics
@batchprogrammer108
@batchprogrammer108 4 года назад
@@devacharya3892 Oh wow, I am honoured to have a professional watch my videos. Please email me and we can discuss any improvements.
@pataQtasuxumuxu
@pataQtasuxumuxu 4 года назад
A silly question but how would you get this auto completion/suggestion feature in visual studio? I dont seem to have it or dont know hot to enable it :/
@SteamfriedShorts
@SteamfriedShorts 3 года назад
Hey man. I have a problem. I don´t know what the first operator is in MathNet. I have the same problem that op1 is 1x5 and op2 is 10x10. I can change op2 with the NEURONS variable but I cant change op1 with the LAYERS variable. Im confused
@rajinhossain9522
@rajinhossain9522 4 года назад
No fucking way. I clicked this shit so fast
@user-qh2vq6md2g
@user-qh2vq6md2g 4 года назад
i understood the explination but i very confused about the code do you have any totorials that will make me understand the matrix code?
@batchprogrammer108
@batchprogrammer108 4 года назад
It took me a very long time to understand as well, I hope this link helps you www.datasciencecentral.com/profiles/blogs/matrix-multiplication-in-neural-networks It's just a simple way of representing the network so that the computers can handle all the multiplication and stuff.
@sawomirkrynicki4492
@sawomirkrynicki4492 4 года назад
why dont use FANN ?
@TheTechpreneurs
@TheTechpreneurs 4 года назад
Can you tell how with just random values the car completed the course... Even though it had no training??????
@batchprogrammer108
@batchprogrammer108 4 года назад
Well actually I don't know, it's a complete coincidence that it finished it! It just goes to show that planning a network well in terms of the input value range, number of neurons and layers etc. pays off. Also the genetic algorithm is still useful because it will optimise for a faster, more efficient car. But it's pretty awesome it can do that.
@mmhansen1288
@mmhansen1288 4 года назад
can yuo make a video about save the ai
@mbiwantarh5613
@mbiwantarh5613 4 года назад
i would like to ask i your network can be used to train an agent in a constantly changing environment( constantly changing track)?
@batchprogrammer108
@batchprogrammer108 4 года назад
Absolutely can, I presume that you will need more layers and neurons and when you train you will have to train on a similar evolving track :)
@mbiwantarh5613
@mbiwantarh5613 4 года назад
@@batchprogrammer108 What do you mean by a similar evolving track? Actually what i am building is kind of an endless runner and would like to train the car to avoid obstacles by switching lanes, jumping and sliding. In such games, obstacles are spawned at random, hence my question if i could use you logic and modify the scripts to train the car to avoid obstacles?
@owendorsey5866
@owendorsey5866 4 года назад
I’m having a problem with applying this to another project so basically I have the same set up except I only need the Turning output so I changed all the output stuff so there’s only one output and basically what’s happening is the direction variable that I’m setting it too will start somewhere say 0.83234 and throughout its run the direction will only change slightly maybe by like 0.01 do you have any idea of why this might be happening i need the output to me a wider range and vary more from -1 to 1 so I can use it to make my cube thing go left or right
@batchprogrammer108
@batchprogrammer108 4 года назад
The issue probably is with your inputs, in the code I divide the distance of the rays by 20, this is to normalise the inputs between 0 and 1. You will have to do this in your new project as well.
@owendorsey5866
@owendorsey5866 4 года назад
AJTech just tried it and yep that fixed the problem thank you for the help
@kingbling7571
@kingbling7571 4 года назад
At line 33 of NNet script theres this for loop that runs the number of times you want a layer. My question is why do you have i < HiddenLayerCount + 1. As per my understanding if I chose 0 as my HiddenLayerCount, it will still iterate 1 time in for loop creating a hidden layer. Also when adding weights, during i = 0 i.e the first weight in the weightsList will be from the if condition as well as another weight since the lines of code below it arnt in ELSE condition thus resulting to HiddenLayerCount + 1 weights in total. For example I want one hidden layer, it will run for loop 2 times and give 3 weights in total, 2 from the first iteration ( from if condition and normally) and 1 from second iteration normally. Hope this isnt too much for you.
@kartynamelanz
@kartynamelanz 4 года назад
bump
@kingbling7571
@kingbling7571 4 года назад
@@kartynamelanz actually I think i understand why he adds an extra 1 in for loop, in case u put hidden layers to 0 the code gives an exception, he hasnt included the scenario with 0 hidden layers at all in his scripts. Also extra weights in a matrix dont matter since its not accessed. For eg if u have 3 hidden layers, the matrix multiplication will happen only 3 times so if u have more than 3 weights in a list of weight matrices , they wont be used.
@GraphicalBoss
@GraphicalBoss 2 года назад
Make videos more consistently. 👍
@shpoink5373
@shpoink5373 4 года назад
Yo, what happened to the open world game?
@batchprogrammer108
@batchprogrammer108 4 года назад
Oh I mentioned at the end of the video that an update is coming in the next 3 days. I've done heaps on it and can't wait to share
@kartynamelanz
@kartynamelanz 4 года назад
On line 45, i think it should be Dense(3,hiddenNueronCount), hmm ???
@PiedriXD
@PiedriXD 4 года назад
i thinks the same
@PiedriXD
@PiedriXD 4 года назад
For any one thinking the same he changes it on 1:02:45
@sabrango
@sabrango 4 года назад
XD!
@user-qh2vq6md2g
@user-qh2vq6md2g 4 года назад
can i have that paint pic XD (for real if you do have it put a link for it plz)
@HWGab125
@HWGab125 4 года назад
ok, now waiting for another 8 months 👍👍👍👍👍👍👍👍🏻👍🏻👍🏻👍🏻👍🏻👍🏻👍🏻👍🏻👍🏻👍🏻👍🏻👍🏻👍🏻👍🏻👍🏻😂🤣🤣🤣🤣🤣
@batchprogrammer108
@batchprogrammer108 4 года назад
Hahah no no, hopefully within 8 days.
Далее
How I created an evolving neural network ecosystem
10:09
когда мучает жажда // EVA mash
00:58
Просмотров 629 тыс.
I programmed some creatures. They Evolved.
56:10
Просмотров 4,1 млн
Genetic Algorithm C# - Generic Implementation
23:07
Просмотров 59 тыс.
A.I.  teaches itself to drive in Trackmania
15:04
Просмотров 4,8 млн
Neural Networks Explained from Scratch using Python
17:38
The Attention Mechanism in Large Language Models
21:02
Evolution Simulator with Neural Networks in Unity!
8:03
AI Learns to Park - Deep Reinforcement Learning
11:05
МОЖНО ЛИ ОДЕТЬСЯ ЗА 1000₽?
0:44
Просмотров 1,8 млн
KINDNESS ALWAYS COME BACK
0:59
Просмотров 127 млн
Как выходим с тройняшками 🙃
0:17