Self-Driving AI Car Simulation in Python

Поділитися
Вставка
  • Опубліковано 6 вер 2024
  • 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...
    🐍 The Python Bible Book: www.neuralnine...
    👕 Programming Merch: www.neuralnine...
    💻 Exclusive Content 💻
    👥 Patreon: / neuralnine
    🌐 Social Media & Contact 🌐
    📱 Website: www.neuralnine...
    📷 Instagram: / neuralnine
    🐦 Twitter: / neuralnine
    🤵 LinkedIn: / neuralnine
    📁 GitHub: github.com/Neu...
    🎵 Outro Music From: www.bensound.com/

КОМЕНТАРІ • 136

  • @NeuralNine
    @NeuralNine  3 роки тому +70

    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 роки тому +5

      This is a NEAT program

    • @RandomGuy-df1oy
      @RandomGuy-df1oy 3 роки тому +2

      How do you catch if a car crashes?

    • @Emmanuel-is7gm
      @Emmanuel-is7gm 8 місяців тому

      Does your book cover this kind of videos?

  • @amberniesalting9011
    @amberniesalting9011 3 роки тому +123

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

    • @NeuralNine
      @NeuralNine  3 роки тому +28

      understandable! Just stick to it ^^

    • @joshcooke4201
      @joshcooke4201 3 роки тому +6

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

    • @cadowyn735
      @cadowyn735 3 роки тому +1

      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 роки тому +2

      @@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.

  • @jlou888
    @jlou888 2 роки тому +11

    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.

  • @kulrajchavda9538
    @kulrajchavda9538 3 роки тому +24

    You're absolutely legend, you are future big channel

  • @PlexAlanche
    @PlexAlanche 3 роки тому +16

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

  • @impranave7776
    @impranave7776 Місяць тому

    I did an autonomous driving car project with the simplest trach but failed miserably . This idea of NEAT was very new to me and it is just very interesting . great video 👍🏿.

  • @chriss3154
    @chriss3154 3 роки тому +8

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

  • @bassemgouty9840
    @bassemgouty9840 3 роки тому +16

    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 роки тому +7

      thanks for your words brother :)

  • @flashbao1922
    @flashbao1922 3 роки тому +3

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

  • @achiyederi3622
    @achiyederi3622 3 роки тому +7

    can you do a full depth tutorial?

  • @philskz
    @philskz 3 роки тому +1

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

  • @flashbao1922
    @flashbao1922 3 роки тому +2

    The Intro is cool!

  • @hello-my6ot
    @hello-my6ot 3 роки тому +3

    This is so impressive, you got my sub

  • @thomasgoodwin2648
    @thomasgoodwin2648 3 роки тому +8

    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! ❤️❤️❤️

  • @neillunavat
    @neillunavat 3 роки тому

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

  • @johnatasrabelo7088
    @johnatasrabelo7088 3 роки тому +3

    Best Ones from UA-cam , thanks a lot !!

  • @neshamlani3264
    @neshamlani3264 2 місяці тому

    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?

  • @null3000
    @null3000 3 роки тому +6

    Please make more NEAT tutorials!

  • @gamesucht2097
    @gamesucht2097 8 місяців тому

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

  • @saadahmed2970
    @saadahmed2970 3 роки тому +2

    Your channel is fabulous.

  • @rayoh2011
    @rayoh2011 3 роки тому

    An eye-opener, thank you!

  • @ryanc.6613
    @ryanc.6613 3 роки тому

    your channel is about to blow up bro

  • @thomaskaridis2127
    @thomaskaridis2127 3 роки тому +4

    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)

  • @rachitjasoria9041
    @rachitjasoria9041 3 роки тому +2

    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...

    • @1nd0Aryan
      @1nd0Aryan Рік тому

      same problem here. did you find a solution?

    • @muyzaf
      @muyzaf Рік тому +1

      same problem here as well

  • @wullie1111
    @wullie1111 3 роки тому +1

    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

  • @Rhaqim
    @Rhaqim 3 роки тому

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

  •  3 роки тому

    Great strategy to build the maps :)

  • @CarlosMoreno-hu2me
    @CarlosMoreno-hu2me 3 роки тому +3

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

  • @bloodrubbish1667
    @bloodrubbish1667 4 місяці тому

    Amazing vid!

  • @ddbqu
    @ddbqu Місяць тому

    Sorry, can you do a full depth tutorial? I really don‘t know how to do…

  • @fp-mirzariyasatali1985
    @fp-mirzariyasatali1985 3 роки тому +1

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

  • @hakancetinkaya8866
    @hakancetinkaya8866 3 роки тому

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

  • @AdamEarleArtist
    @AdamEarleArtist 2 роки тому

    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
    @mangohar5642 3 роки тому +1

    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?

  • @ishaandugar7896
    @ishaandugar7896 3 роки тому +1

    Make a series on this pleaseeee!!

  • @lucky4the4turtle
    @lucky4the4turtle 3 роки тому +1

    Is lex named after lex fridman?

  • @yenumulavinuthna8083
    @yenumulavinuthna8083 5 місяців тому

    May i know which environment you have used?

  • @os_.mos_.m9346
    @os_.mos_.m9346 3 роки тому +1

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

  • @Gazzar19
    @Gazzar19 2 роки тому

    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?

  • @clamisland331
    @clamisland331 3 роки тому

    Wo this is awesome!!

  • @justvolt
    @justvolt 3 роки тому

    this is quite a neat tutorial

  • @nikolavasic1947
    @nikolavasic1947 3 роки тому +1

    You have awesome content

    • @NeuralNine
      @NeuralNine  3 роки тому +1

      appreciate it brother :)

  • @shulymang
    @shulymang 3 роки тому

    its amazing video! thanks a lot

  • @thewhat4228
    @thewhat4228 3 роки тому +1

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

  • @g.s.3389
    @g.s.3389 3 роки тому

    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?

  • @__3093
    @__3093 3 роки тому

    new intro let's gooooo

  • @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

  • @guilherme5094
    @guilherme5094 3 роки тому

    Very good!

  • @kaihan5962
    @kaihan5962 3 роки тому +1

    Hope to see the tutorials

  • @jayparmar7603
    @jayparmar7603 3 роки тому

    One node joined your Neural Network

  • @tomas5970
    @tomas5970 3 роки тому

    pretty NEAT video

  • @Jiyakathuria
    @Jiyakathuria Місяць тому

    please provide in depth tutorial.

  • @srishrachamalla9607
    @srishrachamalla9607 Рік тому

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

  • @dungduong89
    @dungduong89 3 роки тому

    thank you so much

  • @marshallhickey3746
    @marshallhickey3746 3 роки тому

    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

  • @robss9363
    @robss9363 3 роки тому +1

    yo, man, that's huge..

  • @dynoagency1323
    @dynoagency1323 3 роки тому +1

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

  • @vijayrahulsivapu9523
    @vijayrahulsivapu9523 Рік тому

    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 5 місяців тому

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

  • @ericstardust1
    @ericstardust1 3 роки тому

    Cool, Thx

  • @prajyotmane9067
    @prajyotmane9067 Рік тому

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

  • @softwhere07
    @softwhere07 6 місяців тому

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

  • @erictovbin4200
    @erictovbin4200 3 роки тому +1

    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 роки тому +2

      @@colgrolool1668 ich denke schon ^^

    • @colgrolool1668
      @colgrolool1668 3 роки тому

      @@NeuralNine :O

  • @kooshasangari2555
    @kooshasangari2555 2 роки тому

    ⭐ Perfect! ⭐

  • @VinnieDreher
    @VinnieDreher 2 роки тому

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

  • @ahmetfarukbahat8334
    @ahmetfarukbahat8334 3 роки тому +1

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

  • @MukeshDesiBhae
    @MukeshDesiBhae 7 днів тому

    Good Showcase, please share the code

  • @amberniesalting9011
    @amberniesalting9011 3 роки тому +1

    amazing

  • @redamo1248
    @redamo1248 3 роки тому +2

    1st comment love ur vids

  • @shinymp7691
    @shinymp7691 3 роки тому

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

  • @bbgoesblop
    @bbgoesblop 4 місяці тому

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

    • @Abdelrhman_karam
      @Abdelrhman_karam 3 місяці тому

      save the weights of the model and reuse them

    • @bbgoesblop
      @bbgoesblop 3 місяці тому

      @@Abdelrhman_karam how

  • @Serenelove520
    @Serenelove520 2 роки тому

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

  • @avadhutpatil6755
    @avadhutpatil6755 2 роки тому

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

  • @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

  • @marshallhickey3746
    @marshallhickey3746 3 роки тому

    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 роки тому +1

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

  • @Lualt
    @Lualt 3 роки тому

    next vid coding a universe with self aware life

  • @alexanderwilluweit6689
    @alexanderwilluweit6689 3 роки тому

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

  • @nawid1687
    @nawid1687 3 роки тому +1

    It kinda sucks that you removed the subdomain video

    • @NeuralNine
      @NeuralNine  3 роки тому

      Had to. It is on Patreon though.

  • @philtoa334
    @philtoa334 2 роки тому

    Thx_Very_Nice.

  • @amiralirezaei2108
    @amiralirezaei2108 3 роки тому

    Can you make a course for ML?

  • @aurorusidk
    @aurorusidk 3 роки тому +2

    great video but i kinda miss seeing your face

    • @NeuralNine
      @NeuralNine  3 роки тому

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

  • @flaksick
    @flaksick 2 роки тому

    It doesn’t properly fit my screen

  • @andreaspiening5424
    @andreaspiening5424 2 роки тому

    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.

  • @chetansai1478
    @chetansai1478 3 роки тому

    sir how to run a simulation after downloading the file

  • @joenelespejo4082
    @joenelespejo4082 3 роки тому

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

  • @fabrizioantonazzo3113
    @fabrizioantonazzo3113 2 роки тому

    bene , maa non avete commentato il listato di python grazie

  • @SagarKumar-fx4ew
    @SagarKumar-fx4ew 3 роки тому +1

    op 👌👌👌

  • @AidenEllis
    @AidenEllis 3 роки тому +2

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

  • @vanshkumar3445
    @vanshkumar3445 Рік тому

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

  • @darksnaper
    @darksnaper Рік тому

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

  • @daveraccliff6422
    @daveraccliff6422 3 роки тому

    plz make a tutorial on this

  • @volcano3864
    @volcano3864 2 роки тому

    i want a tutorial

  • @b07x
    @b07x 3 роки тому +2

    New version of Tesla...

  • @bilelsaghrouchni977
    @bilelsaghrouchni977 3 роки тому

    tuto pls :)

  • @hencexperfect
    @hencexperfect 3 роки тому +1

    CoollLLLLllLlLl

  • @DogoOrtodoxo
    @DogoOrtodoxo 7 місяців тому

    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.

  • @georgialeksiev8056
    @georgialeksiev8056 3 роки тому +1

    early

  • @princekrampah3313
    @princekrampah3313 3 роки тому

    First one

  • @antalervin19-
    @antalervin19- 11 місяців тому

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

  • @anonfourtyfive
    @anonfourtyfive Рік тому

    Short... Neet.
    LMFAO"