Self-Driving AI Car Simulation in Python

Ғылым және технология

In this video we simulate self-driving AI cars in Python. These cars learn driving using NEAT, which is a reinforcement learning technique.
◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚
💻 The Algorithm Bible Book: www.neuralnine.com/books/
🐍 The Python Bible Book: www.neuralnine.com/books/
👕 Programming Merch: www.neuralnine.com/shop
💻 Exclusive Content 💻
👥 Patreon: / neuralnine
🌐 Social Media & Contact 🌐
📱 Website: www.neuralnine.com/
📷 Instagram: / neuralnine
🐦 Twitter: / neuralnine
🤵 LinkedIn: / neuralnine
📁 GitHub: github.com/NeuralNine
🎵 Outro Music From: www.bensound.com/

Пікірлер: 131

  • @NeuralNine
    @NeuralNine3 жыл бұрын

    It is important that you install the module neat-python and not neat if you want this to work on your machine!

  • @culiynl

    @culiynl

    3 жыл бұрын

    This is a NEAT program

  • @RandomGuy-df1oy

    @RandomGuy-df1oy

    2 жыл бұрын

    How do you catch if a car crashes?

  • @Emmanuel-is7gm

    @Emmanuel-is7gm

    5 ай бұрын

    Does your book cover this kind of videos?

  • @amberniesalting9011
    @amberniesalting90113 жыл бұрын

    as a beginner in python these kind of things is the one I want to be able to do

  • @NeuralNine

    @NeuralNine

    3 жыл бұрын

    understandable! Just stick to it ^^

  • @joshcooke4201

    @joshcooke4201

    3 жыл бұрын

    @@NeuralNine Can you do a neat-python tutorial please?

  • @cadowyn735

    @cadowyn735

    3 жыл бұрын

    Work on problem solving and logic first. Learn how to break down the problem and the fundamentals of programming. Then extract that knowledge out to whatever you want to pursue.

  • @v-rdays7525

    @v-rdays7525

    3 жыл бұрын

    Where i can learn python for free? I really want to learn python

  • @cadowyn735

    @cadowyn735

    3 жыл бұрын

    @@v-rdays7525 This guy’s videos and Codecademy. But you should learn how to solve problems and think like a programmer before worrying about a specific language.

  • @philskz
    @philskz3 жыл бұрын

    This is such a cool programm! I downloaded it and tried it out and it worked perfectly good work!

  • @bassemgouty9840
    @bassemgouty98403 жыл бұрын

    you videos are just top quality tbh , always amazed by your work . Keep it up and i hope you make it big !

  • @NeuralNine

    @NeuralNine

    3 жыл бұрын

    thanks for your words brother :)

  • @rayoh2011
    @rayoh20113 жыл бұрын

    An eye-opener, thank you!

  • @flashbao1922
    @flashbao19223 жыл бұрын

    The Intro is cool!

  • @jlou888
    @jlou888 Жыл бұрын

    It would have been interesting to see how cars trained on one track can do on another, basically, how your model generalises. Otherwise, this is an exercise in overfitting.

  • @hello-my6ot
    @hello-my6ot3 жыл бұрын

    This is so impressive, you got my sub

  • @NeuralNine

    @NeuralNine

    3 жыл бұрын

    thanks ^^

  • @kulrajchavda9538
    @kulrajchavda95383 жыл бұрын

    You're absolutely legend, you are future big channel

  • @NeuralNine

    @NeuralNine

    3 жыл бұрын

    thanks brother ^^

  • @flashbao1922
    @flashbao19223 жыл бұрын

    Glad, I didnt bunk my Soft Computing Classes and I literally understood this video in the first time!

  • 3 жыл бұрын

    Great strategy to build the maps :)

  • @gamesucht2097
    @gamesucht20976 ай бұрын

    i think i have to say thanks for your videos. i did now understand how AIs do their training

  • @chriss3154
    @chriss31543 жыл бұрын

    When an AI video almost sounds like a interesting scary story too! More!

  • @bloodrubbish1667
    @bloodrubbish1667Ай бұрын

    Amazing vid!

  • @PlexAlanche
    @PlexAlanche3 жыл бұрын

    cant wait for ya to soar above where you belong, you really do the hardwork

  • @NeuralNine

    @NeuralNine

    3 жыл бұрын

    thanks brother ^^

  • @clamisland331
    @clamisland3313 жыл бұрын

    Wo this is awesome!!

  • @johnatasrabelo7088
    @johnatasrabelo70883 жыл бұрын

    Best Ones from KZread , thanks a lot !!

  • @shulymang
    @shulymang3 жыл бұрын

    its amazing video! thanks a lot

  • @neillunavat
    @neillunavat3 жыл бұрын

    Idk why people dislike this... Like... This is gold mahn. Gold

  • @justvolt
    @justvolt3 жыл бұрын

    this is quite a neat tutorial

  • @guilherme5094
    @guilherme50943 жыл бұрын

    Very good!

  • @ryanc.6613
    @ryanc.66133 жыл бұрын

    your channel is about to blow up bro

  • @NeuralNine

    @NeuralNine

    3 жыл бұрын

    I hope so brother :D

  • @achiyederi3622
    @achiyederi36223 жыл бұрын

    can you do a full depth tutorial?

  • @ishaandugar7896
    @ishaandugar78963 жыл бұрын

    Make a series on this pleaseeee!!

  • @ericstardust1
    @ericstardust13 жыл бұрын

    Cool, Thx

  • @tomas5970
    @tomas59703 жыл бұрын

    pretty NEAT video

  • @saadahmed2970
    @saadahmed29703 жыл бұрын

    Your channel is fabulous.

  • @NeuralNine

    @NeuralNine

    3 жыл бұрын

    thank you ^^

  • @__3093
    @__30933 жыл бұрын

    new intro let's gooooo

  • @kooshasangari2555
    @kooshasangari25552 жыл бұрын

    ⭐ Perfect! ⭐

  • @dungduong89
    @dungduong893 жыл бұрын

    thank you so much

  • @thomasgoodwin2648
    @thomasgoodwin26483 жыл бұрын

    I noticed that all of your examples were trained from scratch up on each track. Doesn't this lead to overfitting the bot to the track? In other words, shouldn't a network that generalizes well be able to go from track to track with no further training required? Would training go any faster if you used bot models from the previous tests as the starting point for more complex tracks? Great channel btw. Hard to find really good tutorials at this level, and your's are definitely among the best. You do tend to skip some details for the sake of brevity at times though, and I would love to get more detailed insight, even at the expense of longer videos. It's all about the content Baby! Keep it coming! I love it! ❤️❤️❤️

  • @AdamEarleArtist
    @AdamEarleArtist2 жыл бұрын

    i would love to see this run with some freactal noise on the edges of the track and taking up the parts of the track

  • @mangohar5642
    @mangohar56423 жыл бұрын

    Hello. I'm trying to work on this project myself, and I'm at the stage of enabling the car to move in various directions. However, when I rotate the car using pygame by an angle that is not a multiple of 90 degrees, the shape of the car sprite changes and it doesn't stay in the same position. Do you know how I can rotate the car sprite without moving it?

  • @CarlosMoreno-hu2me
    @CarlosMoreno-hu2me3 жыл бұрын

    Interesting. Thank you. Wondering if there is a way to save the learnt model and restart from the last training, without restarting from scratch?

  • @thomaskaridis2127
    @thomaskaridis21273 жыл бұрын

    Great video, if you could do an explanation on the code someday that would be great because i'm having some trouble when its running (new in python)

  • @neshamlani3264
    @neshamlani32644 күн бұрын

    Okay thats a great implementation and a great video, I only have 1 question, does this AI model remember the previous learning, like we trained it on a hard map, and the generation learned to navigate and completed the map, now the generate which was able to complete the map, can it run a single car through other maps, without training for that particular map?

  • @nikolavasic1947
    @nikolavasic19473 жыл бұрын

    You have awesome content

  • @NeuralNine

    @NeuralNine

    3 жыл бұрын

    appreciate it brother :)

  • @null3000
    @null30003 жыл бұрын

    Please make more NEAT tutorials!

  • @Gazzar19
    @Gazzar192 жыл бұрын

    I build a similar thing, also modifying / mutating the weights of the best agent. What would be the reinforcement way to improve the network with backprop?

  • @g.s.3389
    @g.s.33893 жыл бұрын

    very interesting, as far I understand from the code, the speed of the car is a constant it doesn't change during the circuit. is it right?

  • @kaihan5962
    @kaihan59623 жыл бұрын

    Hope to see the tutorials

  • @amberniesalting9011
    @amberniesalting90113 жыл бұрын

    amazing

  • @NeuralNine

    @NeuralNine

    3 жыл бұрын

    :)

  • @SagarKumar-fx4ew
    @SagarKumar-fx4ew3 жыл бұрын

    op 👌👌👌

  • @Rhaqim
    @Rhaqim3 жыл бұрын

    I love this video, I’m a Junior Data Scientist but studying this would help me with self driving drones.

  • @robss9363
    @robss93633 жыл бұрын

    yo, man, that's huge..

  • @philtoa334
    @philtoa334 Жыл бұрын

    Thx_Very_Nice.

  • @wullie1111
    @wullie11113 жыл бұрын

    neural networks are grate. there are so many implementations as well if it wasn't for there creation google's voice, amazon's alexa, apple's siri would not exist

  • @jayparmar7603
    @jayparmar76033 жыл бұрын

    One node joined your Neural Network

  • @BugsNRoses_
    @BugsNRoses_3 жыл бұрын

    I really wanted to learn advanced machine learning, but didn't find any tutorials, which has the way you describe ❤️, thank you so much, a fan, no a hugeeee fan of yours

  • @ahmetfarukbahat8334
    @ahmetfarukbahat83343 жыл бұрын

    Your videos are very good, I expect you to add source code

  • @fp-mirzariyasatali1985
    @fp-mirzariyasatali19853 жыл бұрын

    Can i get those Slides???? You use to convey your Point of view

  • @os_.mos_.m9346
    @os_.mos_.m93463 жыл бұрын

    What is the name of the song you are using in the intro?

  • @marshallhickey3746
    @marshallhickey37463 жыл бұрын

    I have an idea for a future idea you can use selenium to import webdriver open one of your videos and make it reload every 30 secs meaning you can get free views

  • @dynoagency1323
    @dynoagency13233 жыл бұрын

    I love your contents, can u make a chess game with a chess bot?

  • @thewhat4228
    @thewhat42283 жыл бұрын

    Can we get the code for the self replicating virus in python? Why is the video down I can't find it please help

  • @VinnieDreher
    @VinnieDreher2 жыл бұрын

    Do you think is possible import the track using a STL?

  • @hakancetinkaya8866
    @hakancetinkaya88663 жыл бұрын

    I am trying to watch ads but someone disturbing me with forcing couple cars to finish his path

  • @Serenelove520
    @Serenelove5202 жыл бұрын

    You are awesome. Can I ask you to work on a project?

  • @Lualt
    @Lualt3 жыл бұрын

    next vid coding a universe with self aware life

  • @srishrachamalla9607
    @srishrachamalla9607 Жыл бұрын

    Will it uses it knowledge to the new maps? Or it should learn on the new map..

  • @andreaspiening5424
    @andreaspiening54242 жыл бұрын

    Thank you very much! This one is very interesting. Please can you tell if, and if so where the learned data is persisted? I've started with map1.png again and in generation 1 I had one car passing the full course which is not possible without some knowledge / learnings I guess. I would like to control the neural network and "reset" it for my experiments.

  • @prajyotmane9067
    @prajyotmane9067 Жыл бұрын

    Can this model perform with same accuracy on maps it was not trained on ?

  • @yenumulavinuthna8083
    @yenumulavinuthna80833 ай бұрын

    May i know which environment you have used?

  • @lucky4the4turtle
    @lucky4the4turtle3 жыл бұрын

    Is lex named after lex fridman?

  • @shinymp7691
    @shinymp76913 жыл бұрын

    Hey, can you make tutorial video on this project. Pls

  • @amiralirezaei2108
    @amiralirezaei21083 жыл бұрын

    Can you make a course for ML?

  • @vijayrahulsivapu9523
    @vijayrahulsivapu952310 ай бұрын

    Hello, I need your help. I have installed all the necessary modules, but the problem is that the pygame window is not adjusting to my system display. I have tried several ways and I am able to toggle horizontally, but the vertical view is not complete. The horizontal view is also not adjusting but I can see completely when I move the pygame window.

  • @yenumulavinuthna8083

    @yenumulavinuthna8083

    3 ай бұрын

    Hey...even I am facing the same issue...how you solved it

  • @erictovbin4200
    @erictovbin42003 жыл бұрын

    Könntest du vielleicht eine Tensorflow-Serie starten? :)

  • @colgrolool1668

    @colgrolool1668

    3 жыл бұрын

    Solltest vielleicht auf Englisch schreiben, denke nicht dass er dich versteht lol

  • @NeuralNine

    @NeuralNine

    3 жыл бұрын

    @@colgrolool1668 ich denke schon ^^

  • @colgrolool1668

    @colgrolool1668

    3 жыл бұрын

    @@NeuralNine :O

  • @avadhutpatil6755
    @avadhutpatil6755 Жыл бұрын

    Hi I am unable to run this code, could you please help me with this ??

  • @fabrizioantonazzo3113
    @fabrizioantonazzo31132 жыл бұрын

    bene , maa non avete commentato il listato di python grazie

  • @joenelespejo4082
    @joenelespejo40823 жыл бұрын

    Where to run it? What IDE? Beginner in python. 🙏

  • @chetansai1478
    @chetansai14783 жыл бұрын

    sir how to run a simulation after downloading the file

  • @redamo1248
    @redamo12483 жыл бұрын

    1st comment love ur vids

  • @NeuralNine

    @NeuralNine

    3 жыл бұрын

    thank you ^^

  • @marshallhickey3746
    @marshallhickey37463 жыл бұрын

    I have downloaded this but when I try to run it, it says neat has no attribute to config in line 248

  • @NeuralNine

    @NeuralNine

    3 жыл бұрын

    you need to install neat-python and not neat ^^

  • @rverm1000
    @rverm1000 Жыл бұрын

    im having trouble with the screen the race track is way bigger than the screen. cant move it or adjust it in any way. Got any suggestions?

  • @muyzaf

    @muyzaf

    Жыл бұрын

    same, i need help as well

  • @rachitjasoria9041
    @rachitjasoria90413 жыл бұрын

    its working vey well!!! but how to resize it?? i changed WIDTH and HEIGHT here: screen = pygame.display.set_mode((WIDTH, HEIGHT), pygame.FULLSCREEN) but then it doesnt work...

  • @aryan.civilization

    @aryan.civilization

    Жыл бұрын

    same problem here. did you find a solution?

  • @muyzaf

    @muyzaf

    Жыл бұрын

    same problem here as well

  • @softwhere07
    @softwhere074 ай бұрын

    From 2:50 to 3:35 it seems to talk about my origins. Lol.

  • @alexanderwilluweit6689
    @alexanderwilluweit66893 жыл бұрын

    I got an error: config = neat.config.Config(neat.DefaultGenome, module 'neat' has no attribute 'config' any ideas? thx

  • @alexanderwilluweit6689

    @alexanderwilluweit6689

    3 жыл бұрын

    Got it sorry - my fault. Did not installed neat in the correct way.

  • @daveraccliff6422
    @daveraccliff64223 жыл бұрын

    plz make a tutorial on this

  • @aurorusidk
    @aurorusidk3 жыл бұрын

    great video but i kinda miss seeing your face

  • @NeuralNine

    @NeuralNine

    3 жыл бұрын

    Hahahaha it will be there again in the next video :D

  • @AidenEllis
    @AidenEllis3 жыл бұрын

    *So you wanna be a software engineer at Google?*

  • @flaksick
    @flaksick2 жыл бұрын

    It doesn’t properly fit my screen

  • @nawid1687
    @nawid16873 жыл бұрын

    It kinda sucks that you removed the subdomain video

  • @NeuralNine

    @NeuralNine

    3 жыл бұрын

    Had to. It is on Patreon though.

  • @darksnaper
    @darksnaper Жыл бұрын

    Привет из России, ты лучший!

  • @hencexperfect
    @hencexperfect3 жыл бұрын

    CoollLLLLllLlLl

  • @bbgoesblop
    @bbgoesblop2 ай бұрын

    Hello, i want to change maps, but i dont want to reset my progress, how?

  • @Abdelrhman_karam

    @Abdelrhman_karam

    Ай бұрын

    save the weights of the model and reuse them

  • @bbgoesblop

    @bbgoesblop

    Ай бұрын

    @@Abdelrhman_karam how

  • @vanshkumar3445
    @vanshkumar34459 ай бұрын

    ai is best technology self driving car ai games vice city gta 5,ai drones,

  • @b07x
    @b07x3 жыл бұрын

    New version of Tesla...

  • @NeuralNine

    @NeuralNine

    3 жыл бұрын

    2D Tesla :D

  • @volcano3864
    @volcano38642 жыл бұрын

    i want a tutorial

  • @bilelsaghrouchni977
    @bilelsaghrouchni9773 жыл бұрын

    tuto pls :)

  • @princekrampah3313
    @princekrampah33133 жыл бұрын

    First one

  • @NeuralNine

    @NeuralNine

    3 жыл бұрын

    :)

  • @georgialeksiev8056
    @georgialeksiev80563 жыл бұрын

    early

  • @NeuralNine

    @NeuralNine

    3 жыл бұрын

    awesome :)

  • @DogoOrtodoxo
    @DogoOrtodoxo4 ай бұрын

    Man... watching this i notice this is not how humans learns to drive well, it would be nicier if the module take a turn mapping the road, and then calculate the best velocity to each part, instead of looking for what is 5 meters ahead.

  • @antalervin19-
    @antalervin19-9 ай бұрын

    Hey! Can we have a talk in Discord Or Email?

  • @anonfourtyfive
    @anonfourtyfive Жыл бұрын

    Short... Neet. LMFAO"