Inteligência Artificial aprendendo a DIRIGIR!! (Deep Cars)

1.46M views1283 WordsCopy TextShare
Universo Programado
Seja muito bem vindo ao Universo Programado! Neste vídeo você verá como a Inteligência Artificial ap...
Video Transcript:
Be very, very welcome to the channel My name is Victor Dias and you are watching Universo Programado In today's video, the AI will learn to do something that I don't even know- how to drive. Grab some popcorn and fasten your seatbelt because this is gonna be fast Are you serious? Are you really going to be doing these jokes until the end of the video?
What is the problem? Oh my god. Your jokes are terrible.
Feeling sassy huh? Go learn how to drive. Before we start, don't forget to subscribe to the channel and leave your like This is critical for me to keep making these videos.
If you would like more information about how this algorithm works, I recommend you watch my last two videos. First Dinosaur and then Flappy Bird. Because in them I explain how the algorithm works and show you why artificial intelligence is sensational!
The links are in the description. So let's go. The first thing you have to do is pick a track.
I chose this one. Look how cool it is. After we have to create the collision matrix.
It's what indicates where the car may or may not ride. Only in the elements that we put the value equal to one- Is that the car will be able to drive. Now we have to fill it.
So we will go through the whole image, checking which pixels are gray If the pixel is gray, it's because it's part of the track. And if it's part of the track the car can drive So we put value one in the collision matrix Anything other than gray, we set to zero And this is the result. Each point is a possible position that the car can occupy Now that we have mapped the track, we need to think of a way to send this information to the neural network, the car needs to somehow collect this information.
An interesting way I found was to install twelve sensors around the car. Each sensor will measure the distance from the car to the nearest wall in that direction. This distance is measured in pixels, and then we'll send it to the neural network.
In addition to distance, I am also sending speed. So that the AI knows at what speed it is and with that be able to execute more accurate movements. In the end, the algorithm will decide what action it will take.
Depending on the sensor configuration at that time. From there we just let the natural selection act and select the best car. But there is still a problem: How will the algorithm know which car is the best?
Because we know the best car is the one that managed to get closer to the finish line. But we cannot use Euclidean distance as the criterion. Because this will happen: When calculating the distance of a straight line, the green dot is closer to the finish line than the blue dot If we use this kind of distance, the algorithm will not work.
Because cars that never moved will be considered better than those that have moved away from the finish line So to solve this, I'll use another algorithm to map the distances on the track Its name is Wavefront Algorithm and there is a video of him here on the channel called ''Algoritimo Térmico'' which shows a little bit about its behavior. The thermal algorithm is very simple. We will need another matrix to map these distances.
At the finish line we set a zero because it has zero distance to itself. And from there we start to propagate this distance always increasing a value in the neighboring units. After the algorithm is finished, the matrix will look something like this.
So here is the zero of the finish line It will increase according to the distance from point zero. These -1, means they are off-track points and should not be calculated Each point now has the value of its distance to the finish line Now we can evaluate the cars the right way Because now the car that stops at the green dot will be considered worse than the car that stops at the blue dot But the problems are not over, even after that this can happen. .
. As car behavior is partially random. .
. it may happen that they stand still or go around in circles. So they won't hit, and if they don't hit the generation never ends and the algorithm can't go on.
To solve this we can even add a timer, but this is not a good solution I preferred to create a laser that will move and destroy the cars as it goes. So enough talk and let's see the network learning to drive. Remember that during the race the weights of the neural network never change, only the inputs will change because they depend on the sensors, and as the car is moving the sensors are always changing the value.
LET'S GO! *celebration sounds* Hey! I managed to learn, now what?
And now what? Ran out of arguments? You don't even know what an argument is.
I still drive better than you. Oh my dear. My brain has eighty-six billion neurons, yours at most has twenty Put your little weights down.
Okay, let's wait for a few more years. Hmm hmm, don't hold your breath. Since you're so good, may I make it harder?
Of course you can! So, I'll add some obstacles and I'll be back in 3,2,1. Ok, so I added some obstacles.
Those that are spinning the car can't touch I added a turbo zone, if the car goes over it accelerates and I added a mud zone if the car goes over it will slow down I changed the track a bit, and now the laser accelerates over time As the track got harder, I had to put more sensors in the car's front. So I decided to take all the sensors that were behind the car and placed them in the front. Because the car almost never backed up, so they were unnecessary The idea now is that the natural selection of the cars, prioritize the cars that pass through the turbo and discard the cars that pass through the mud.
Because cars that pass through the mud will be destroyed by the laser. I'll accelerate the beginning a little bit, when it's better I'll be back. One thing that strikes me a lot about I.
A is its accuracy, it can get into that narrow part at an impressive speed. Hey! I also would like to give my opinion.
Okay darling, you can talk. Getting in there is not difficult. I don't depend on my eyes or fingers to perform my movements.
My reflexes are instantaneous, the information comes to me in an exact and pure way. If my network is calibrated right, getting in there is the smallest of problems The hard part is when I need to act differently to- -very similar situations. Ok ok, thanks for explaining how you work, but now focus on your goal.
Now that the AI learned how to run the track, let's take a closer look at the moves it makes. Finally we will see how the sensors behave near the collision matrix. And for today that's it guys!
If you liked- Hey! Can I finish the video this time? Yes you can.
Thanks! You human being for watching me! If you enjoyed seeing me driving, give a like so my cousin here on YouTube will recommend the video to everyone I will be famous in the A.
I family! Thanks my pardner!
Related Videos
Inteligência Artificial ESTACIONANDO carros!
15:38
Inteligência Artificial ESTACIONANDO carros!
Universo Programado
2,955,878 views
Inteligência Artificial jogando Batatinha Frita 1,2,3 (Round 6)
25:37
Inteligência Artificial jogando Batatinha ...
Universo Programado
634,176 views
Artificial intelligence playing the World's Hardest Game!
13:01
Artificial intelligence playing the World'...
Universo Programado
1,336,597 views
Inteligência Artificial ZERANDO o jogo mais difícil do mundo!
18:40
Inteligência Artificial ZERANDO o jogo mai...
Universo Programado
1,809,549 views
GPT 5 O que Esperar do Próximo Salto em IA
7:59
GPT 5 O que Esperar do Próximo Salto em IA
Futuro Expresso
1,476 views
Inteligência Artificial brincando de Pique-Esconde
13:11
Inteligência Artificial brincando de Pique...
Universo Programado
1,936,712 views
Rede Neural aprendendo a jogar o jogo da cobrinha (SNAKE)
20:01
Rede Neural aprendendo a jogar o jogo da c...
Universo Programado
812,752 views
Programando um CANHÃO de Newton!!!
21:05
Programando um CANHÃO de Newton!!!
Universo Programado
452,287 views
Inteligência Artificial aprendendo a pilotar FOGUETES!!
24:00
Inteligência Artificial aprendendo a pilot...
Universo Programado
820,030 views
AI destroying the Google's Dinosaur game!
11:50
AI destroying the Google's Dinosaur game!
Universo Programado
4,368,496 views
Inteligência Artificial jogando 2048!!
16:10
Inteligência Artificial jogando 2048!!
Universo Programado
1,401,584 views
আর্টিফিশিয়াল ইন্টেলিজেন্স Artificial intelligence, Machine learning & Neural network Ep 135
18:58
আর্টিফিশিয়াল ইন্টেলিজেন্স Artificial inte...
BigganPiC
518,583 views
Os 7 jogos que eu criei durante a faculdade de Ciência da Computação
10:41
Os 7 jogos que eu criei durante a faculdad...
Universo Programado
602,086 views
AI Learns to Walk (deep reinforcement learning)
8:40
AI Learns to Walk (deep reinforcement lear...
AI Warehouse
8,925,348 views
Por que a Inteligência Artificial não é um bando de IF-ELSE?
10:22
Por que a Inteligência Artificial não é um...
Universo Programado
342,191 views
Making an atomic trampoline
58:01
Making an atomic trampoline
NileRed
3,775,041 views
Artificial intelligence playing Flappy Bird!
8:18
Artificial intelligence playing Flappy Bird!
Universo Programado
1,721,292 views
Much bigger simulation, AIs learn Phalanx
29:13
Much bigger simulation, AIs learn Phalanx
Pezzza's Work
2,774,217 views
Training an unbeatable AI in Trackmania
20:41
Training an unbeatable AI in Trackmania
Yosh
13,685,823 views
Inteligência Artificial ZERANDO o jogo da cobrinha (SNAKE)
16:10
Inteligência Artificial ZERANDO o jogo da ...
Universo Programado
867,790 views
Copyright © 2024. Made with ♥ in London by YTScribe.com