Self-Driving Car with JavaScript Course - Neural Networks and Machine Learning

2024 ж. 24 Сәу.
2 079 695 Рет қаралды

Learn how to create a neural network using JavaScript with no libraries. In this course you will learn to make a self-driving car simulation by implementing every component step-by-step. You will learn how to implement the car driving mechanics, how to define the environment, how to simulate some sensors, how to detect collisions, and how to make the car control itself using a neural network.
The course covers how artificial neural networks work, by comparing them with the real neural networks in our brain. You will learn how to implement a neural network and how to visualize it so we can see it in action.
✏️ Dr. Radu Mariescu-Istodor created this course. Check out his channel: / @radu
💻 Code: github.com/gniziemazity/Self-...
⭐️ Course Contents ⭐️
⌨️ (0:00:00) Intro
⌨️ (0:03:44) Car driving mechanics
⌨️ (0:32:26) Defining the road
⌨️ (0:50:50) Artificial sensors
⌨️ (1:10:07) Collision detection
⌨️ (1:23:20) Simulating traffic
⌨️ (1:34:57) Neural network
⌨️ (2:03:10) Parallelization
⌨️ (2:18:31) Genetic algorithm
⌨️ (2:29:40) Ending
⭐️ Links ⭐️
🔗 Radu's website (with enhanced version of code): radufromfinland.com
🔗 Radu's workplace (consider applying): karelia.fi/en/front-page
🔗 Segment intersection (Math and JavaScript code): • Segment intersection f...
🔗 Visualizing a neural network in JavaScript: • Self-driving car - No ...
🔗 Visualizer code: radufromfinland.com/projects/...
🔗 Drawing random color cars in JavaScript: • Self-driving car - No ...
🎉 Thanks to our Champion and Sponsor supporters:
👾 Raymond Odero
👾 Agustín Kussrow
👾 aldo ferretti
👾 Otis Morgan
👾 DeezMaster
--
Learn to code for free and get a developer job: www.freecodecamp.org
Read hundreds of articles on programming: freecodecamp.org/news

Пікірлер
  • After this course, learn from Radu how to make your self-driving cars drive in a virtual world! kzhead.info/sun/icN8Z7BvsZeirXA/bejne.html

    @freecodecamp@freecodecamp6 ай бұрын
    • is there any part 2 for this video?

      @sdexstarlord@sdexstarlord6 ай бұрын
    • @@sdexstarlord Yes, the playlist linked in the first comment.

      @Radu@Radu5 ай бұрын
  • no way he really did it in *javascript* with 0 libraries i am definitely watching this video multiple times, thanks for the video yall

    @and-ant984@and-ant984 Жыл бұрын
    • Wow

      @Rppiano@Rppiano Жыл бұрын
    • Wow

      @techtime3125@techtime3125 Жыл бұрын
    • Wow

      @_laxman_vijay@_laxman_vijay Жыл бұрын
    • Wow

      @mr.fluffyham@mr.fluffyham Жыл бұрын
    • Bogus!

      @juandager5220@juandager52203 ай бұрын
  • I love how he types each character at the same speed, even if it's not necessary fast, it's so mesmerizing to watch such consistency.

    @shira158@shira158 Жыл бұрын
    • You noticed :-) I tried a different approach for this one (also did a lot of takes to minimize the typos :-D)

      @Radu@Radu Жыл бұрын
    • @@Radu 100% worth it its just feels so smooth to follow

      @paschalasobirionwu1183@paschalasobirionwu1183 Жыл бұрын
  • "going infinitely far but also going nowhere" that's life for you. Loved this tutorial, full of substance!

    @santiagomoebio@santiagomoebio Жыл бұрын
    • Thanks :-)

      @Radu@Radu Жыл бұрын
  • This is by far one of the best videos in terms of neural networks and their real-time implementation

    @saicherishpotluri1419@saicherishpotluri1419 Жыл бұрын
    • Thank you :-) glad you like it!

      @Radu@Radu Жыл бұрын
  • I'm a relatively experienced programmer and JS is perhaps my strongest side. I haven't played with machine learning before (except for reading a couple articles) and this video served as a great introduction. I'm planning to expand on the example code by adding a random traffic generator, design a fitness function (perhaps use the number of dummy vehicles passed as a success metric) and automate the iterations.

    @HristoKolevMayvena@HristoKolevMayvena Жыл бұрын
    • That sounds like a great plan. Good luck experimenting and learning :-)

      @Radu@Radu Жыл бұрын
  • The way he explains things feels like he's just describing the code in the very simple way things are! When he is coding, it feels like he's telling a story while he writes the code! If this is the way he thinks while coding, he is a genius!!!! I love the way he describes and explains things! 10/10! It's as if we coders/programmers were just talking to the machine/code.

    @vicyoslinuxofficial2607@vicyoslinuxofficial2607 Жыл бұрын
    • Thank you. This is very scripted, of course and edited (I had multiple takes). But if curious, I do have some unscripted (even live) coding videos on my channel :-)

      @Radu@Radu Жыл бұрын
    • @@Radu I will take a look at them. :)

      @vicyoslinuxofficial2607@vicyoslinuxofficial2607 Жыл бұрын
    • @@vicyoslinuxofficial2607 Cool :-)

      @Radu@Radu Жыл бұрын
  • This tutorial is absolutely amazing. I've done some tutorials with tensorflow, but this really helps me understand better, and I love the end result. Very cool

    @camerinfigueroa7875@camerinfigueroa7875 Жыл бұрын
    • Great to hear :-)

      @Radu@Radu Жыл бұрын
    • @@Radu I know this is old but I'm trying to understand this code better what is happening with #addKeyboardListeners(); under the constructor, why the #? I can't find it through googling and need a little direction if you don't mind helping. edit: never mind I think I figured it out, its "private class fields" right? wow that took me way to long to figure out, assuming thats correct. absolutly beautiful coding and I learned so much! thank you!

      @MrThatguy333@MrThatguy333 Жыл бұрын
    • @@MrThatguy333 aaaaaaàaàààaaààààaaàààààààààààààààààaàaàààààààaààaaaa

      @eileenchoong6175@eileenchoong6175 Жыл бұрын
    • ​@@Raduyou've generated only some traffic I want to generate infinite traffic how can i do that?

      @Audionic1@Audionic16 ай бұрын
    • @@Audionic1 infinite won't fit in memory, but an object pool where you repurpose cars so they appear again is possible. Some people did it on my Discord... can't really explain such a thing in a YT comment.

      @Radu@Radu6 ай бұрын
  • One of the best courses of this channel! This man is a genius! He structured all the implementation and its improvements in a way that makes you feel inspired. Great content!

    @___d3p1@___d3p1 Жыл бұрын
    • Thanks again for the feedback :-)

      @Radu@Radu Жыл бұрын
    • Yes Bro this man is a genius!

      @creatorcode96@creatorcode964 ай бұрын
  • 16:50 important tip about using arrow functions instead of function declaration within classes. Arrow functions mean that this.left refer to controls as the context. If we did function declaration, this would refer to the function as the context and as there is no this.left within functions, it would lead to errors.

    @NavyaVedachala@NavyaVedachala Жыл бұрын
    • Thank you for making things even clearer :-)

      @Radu@Radu Жыл бұрын
  • debug tip: if you can't get the console.table(this) working at 15:00 or so (aka controls.js does not work) make sure you have added the line "this.controls = new Controls();" in car.js constructor

    @darkensgaming2649@darkensgaming2649 Жыл бұрын
  • This chanel is the best code chanel in the youtube. thank you for everything

    @mirshodoripov1035@mirshodoripov1035 Жыл бұрын
  • This is the First time ever I saw implementing a Neural Network with Coding! Thank You for Bringing this to US!!

    @superrazer3643@superrazer3643 Жыл бұрын
    • Congratulations :-)

      @Radu@Radu Жыл бұрын
  • Amazing course and great teaching methods, Radu! Appreciate FCC sharing another excellent resource. 100%!!!

    @bkosimi@bkosimi Жыл бұрын
    • Thank you, Botur!

      @Radu@Radu Жыл бұрын
  • Clear, calm and informative 10/10 Thanks a lot!

    @JasonDask@JasonDask Жыл бұрын
    • Thanks for watching!

      @Radu@Radu Жыл бұрын
  • I loved this video. I know a lot of JS and some ML basics, but this video put them together in a very cohesive way such that I still learned a lot! You mentioned at the end considering making a follow up course, I would love to see that! Please do, I would be very interested in that. I subbed to your channel and will be watching for new videos, thanks a lot for making this video Radu!

    @markeyboi6545@markeyboi6545 Жыл бұрын
    • Really happy to hear you learned something from this. I'm quite sure I'll do the follow up course someday (maybe this year). Meanwhile, I'll post some lighter content.

      @Radu@Radu Жыл бұрын
  • Thanks so much ! You guys are helping me make my portfolio a lot better

    @TheFenny@TheFenny Жыл бұрын
  • Man among boys in JS. Coolest thing about no libs is that that courses will last forever

    @runtimejpp@runtimejpp6 ай бұрын
    • 😎 Thanks!

      @Radu@Radu5 ай бұрын
  • Great! Now I can change my Tesla’s default self driving software to my own

    @assasssin5328@assasssin5328 Жыл бұрын
    • 😂😂😂😂

      @Afashi-vo4vz@Afashi-vo4vz Жыл бұрын
    • This is nowhere near as sophisticated as Tesla’s Full Self Driving software.

      @Tyrone-Ward@Tyrone-Ward Жыл бұрын
    • Lol haha... I will join you in your mission 😁😁

      @matthewisikhuemen8907@matthewisikhuemen8907 Жыл бұрын
    • Would be funny if your implementation is better then 🤣

      @daniele5692@daniele5692 Жыл бұрын
    • Yaaa U can 😁

      @motivator8586@motivator8586 Жыл бұрын
  • Love it. "Naturally, I want the car to explode on impact" 🤣

    @DJ29Joesph@DJ29Joesph Жыл бұрын
    • :-))

      @Radu@Radu Жыл бұрын
  • This is the best video I've ever seen on youtube in my entire life. The level of this man is so high, he's got javascript, math and ai tattooed in his mind like it is the ability of breathing for any human being

    @migdress@migdress2 ай бұрын
    • I'm flattered to read a comment like this :-) I guess it's what you get with many (>20) years of practice... JavaScript is not my forte, though... I like to use it on KZhead because it's so easy for people to follow along (no need to install anything).

      @Radu@RaduАй бұрын
    • @@Radu you got it, it is so easy to follow because its live coding, but really? You are live coding a videogame with NPCs powered by AI living in an abstracted physical world, from scratch. In 2.5 hours. Thats just alien bro, I have never seen such a thing, I am following you forever.

      @migdress@migdressАй бұрын
    • @@migdress thanks for motivating me like that :-)

      @Radu@RaduАй бұрын
  • This is very well done. The typing is smooth as butter so you're not distracted by typos, corrections, or a very slow typist. The pace is about perfect for somebody who knows how to code but wants to build a model and learn to train an AI. I often find "intro" courses absurdly slow but this was great! I translated your code to Kotlin but my results were about the same. I've been trying to find a good "how does a neural network work" video for some time and this was just perfect. Thanks!

    @Atzanteol1@Atzanteol1 Жыл бұрын
    • Thank you. Glad you liked it :-)

      @Radu@Radu Жыл бұрын
    • For more great visualizations, look at Sebastian Lague on youtube. He has a series on neural networks where he also goes more into the mathematical functions behind "teaching" a network.

      @PTS1337@PTS1337 Жыл бұрын
    • @@PTS1337 Thanks for the tip!

      @Radu@Radu Жыл бұрын
  • Why buy a Tesla when you can build it for free and drive it at no risk? What a fantastic course, thanks for making this available!

    @Active-AI@Active-AI Жыл бұрын
    • Your too tapped.

      @Siddhesh1123@Siddhesh1123 Жыл бұрын
  • just finished making my first track! thanks bro for all the help with learning soft soft. much love

    @kosuke5570@kosuke5570 Жыл бұрын
  • this tutorial is simply GOLD! thank you man

    @AngeloRandazzo@AngeloRandazzo Жыл бұрын
  • many thanks and please do follow-up with more material! we need more guys like you, Dr Mariescu-Istodor i'd like to understand how to add more layers, and delve deeper into it

    @ccamerini8679@ccamerini8679 Жыл бұрын
    • I'm planning different extensions to this course. Let's see what I come up with :-)

      @Radu@Radu Жыл бұрын
  • One of the best code tutorials I've seen. Excellent work. Incredibly useful. Well done!

    @JoeGaffey@JoeGaffey Жыл бұрын
    • You're welcome :-)

      @Radu@Radu Жыл бұрын
  • Очень крутой курс. Огромное спасибо.

    @vasiloconnell281@vasiloconnell281 Жыл бұрын
  • Thank you very much guys ......we need more ppl like yall on this earth

    @pravinsukumaran6080@pravinsukumaran6080 Жыл бұрын
  • One of the best coder and the best teacher to teach programming. Would love to learn more from you bro . Radu , you are really great man ..

    @prabhuofficial6072@prabhuofficial6072 Жыл бұрын
    • Thank you :-)

      @Radu@Radu Жыл бұрын
  • awesome video! im so very noob but i love watching all these videos on coding and what not. it amazes me. i am 35 and just getting into tech now. i wish i would have been more eager with learning as a youth but, better late than never! thank you so much for your info videos! keep them coming!

    @caseyvollan8558@caseyvollan8558 Жыл бұрын
    • Im almost 39....its never too late! I actually have better study habits now than i ever had in High School or College

      @mainlinemitch@mainlinemitch Жыл бұрын
  • Omg I was looking for ml course using Js and when I opened KZhead I was recommended this gem. Thanks alot

    @rajanpoudel7980@rajanpoudel7980 Жыл бұрын
  • It's so pleasing. The setuping and mastering softs amazing.

    @jageshkoiri8990@jageshkoiri8990 Жыл бұрын
  • AMAZING TUTORIAL. I really had a great pleasure following all project steps. The developper here, has a genuine pedagogical approach that makes everything easy for learners . Thanks. (btw, your calm voice made the knowledge flow confortable for the audience)

    @mathhack8647@mathhack8647 Жыл бұрын
    • Thank you for all the nice words :-)

      @Radu@Radu Жыл бұрын
  • I was just checking around but ended up watching the entire thing.As a person who knows only C++, I have to say Javascript looks superior

    @bayedevilakazi6328@bayedevilakazi6328 Жыл бұрын
    • How well do you know C++?

      @xaviermagnus8310@xaviermagnus8310 Жыл бұрын
    • @@xaviermagnus8310 not much,I'm still a beginner but I know it better than any other language.i just don't like it having a separate graphics library

      @bayedevilakazi6328@bayedevilakazi6328 Жыл бұрын
    • @@bayedevilakazi6328 The reason to use C++ would show up fast exposing this to harder tests.

      @xaviermagnus8310@xaviermagnus8310 Жыл бұрын
    • Lol c++ is all pointers and memory,

      @pimpc7984@pimpc7984 Жыл бұрын
  • Exceptional training course with coding in real time with crystal clear explanations during work. Never seen such a valuable video.

    @jeanaimarre8605@jeanaimarre86052 ай бұрын
    • Really happy to hear this :-) Thanks for watching!

      @Radu@RaduАй бұрын
  • Finally understood how machine learning works just thank you, wanted to start some projects but could not understand how

    @5skr0ll3r3@5skr0ll3r33 ай бұрын
  • It's a very good channel, it's worth subscribing and watching his other tutorials in vanilla JS.

    @aitorplaza2560@aitorplaza2560 Жыл бұрын
    • Thanks, Aitor :-) for recommending my content!

      @Radu@Radu Жыл бұрын
  • This is such an extremely fun course, great teacher too!

    @robolson135@robolson135 Жыл бұрын
    • Thank you.

      @Radu@Radu Жыл бұрын
  • Perfectly. I am glad that there are people who are ready to help and promote young talents. Beginner streamers. I can say that you are a hero, brother. Do not listen to idiots.

    @josediazperez9446@josediazperez9446 Жыл бұрын
  • Now I understand how to make loops and export everytNice tutorialng really god bless you.. your way of explaining simply aweso I loved it

    @busraaslan7520@busraaslan7520 Жыл бұрын
  • This video was so good! Yes I would LOVE the suggested course, PLEASE!!!

    @ofirfr4804@ofirfr4804 Жыл бұрын
    • Cool :-) It's on my list and I'll make it someday.

      @Radu@Radu Жыл бұрын
  • Thank you, Radu this was a good lesson. I'm a beginner in Java-script and this kept me motivated to do more complex tasks.

    @mrh3956@mrh3956 Жыл бұрын
    • You're welcome!

      @Radu@Radu Жыл бұрын
  • This is working for real!!!everyone should try this tutorial!!thankyou somuch

    @hapham4788@hapham4788 Жыл бұрын
  • @1:47:58 YES ABSOLUTELY READY! Loving the content so far and was quite intrigued by the use of biases. Cheers!

    @zohebahmad9633@zohebahmad9633 Жыл бұрын
    • I'm planning some extensions to the course, but it will still take a while (looking for quality rather than quantity).

      @Radu@Radu Жыл бұрын
  • You're one of the greatest teachers i've ever seen so far! Thank you

    @abdulrahmansaber9585@abdulrahmansaber9585 Жыл бұрын
    • Thank you!

      @Radu@Radu Жыл бұрын
  • I was really looking for a machine learning tutorial :)

    @_flavio_silva@_flavio_silva Жыл бұрын
  • definitely diving into your videos. Thank you so much for taking the ti to teach us that are green in the field. Have a great day

    @auliyaramdini2964@auliyaramdini2964 Жыл бұрын
  • He codes without errors and has all the data in his mind so he can just write code without console logging... what a dangerous man! In other words... wow you are very smart and such a talented developer. I am very amazed! Thanks for this tutorial!

    @paulwong7224@paulwong7224 Жыл бұрын
    • I practiced a lot to teach this course... it's not how I code in real :-P if curious, you can check the Avatar video I published recently :-D it's 12 hours of normal coding (unscripted).

      @Radu@Radu Жыл бұрын
    • he also has the power of editing and multiple takes.

      @tanmaypanadi1414@tanmaypanadi1414 Жыл бұрын
    • i am amazed too . I don't mind if it has edits. its still incredible skill

      @tanmaypanadi1414@tanmaypanadi1414 Жыл бұрын
    • @@tanmaypanadi1414 haha :-)

      @Radu@Radu Жыл бұрын
    • @@tanmaypanadi1414 thank you!

      @Radu@Radu Жыл бұрын
  • You can tell it is a great video right in the first five minutes

    @lucasa8710@lucasa8710 Жыл бұрын
    • Thank you, Lucas :-) hope you like the rest of it too!

      @Radu@Radu Жыл бұрын
  • Thanks for the kind words, I'm always happy to help! Let know if you'd like any videos on specific topics in the future. I wish you all the

    @paxtonlenord8014@paxtonlenord8014 Жыл бұрын
  • Such a great content with a splendid professor, Thank you for the knowledge and the good mood !!!

    @Mr0izo84@Mr0izo84 Жыл бұрын
    • Thanks :-)

      @Radu@Radu Жыл бұрын
  • You did a great job Radu. I just went through the whole course and I am really happy with the results and learning outcomes. I feel like I have taken my programming skills up to a new level. I liked and subscribed so I will check out your other content. I would be interested in any follow-ups to this course like you mentioned at the end of the video. Overall, I feel confident that I can take it from here with developing this program further thanks to your thorough explanations and consistent typing speed. Coding with Radu 👨‍💻👩‍💻 for the win!

    @williamikennanwosu@williamikennanwosu Жыл бұрын
    • Wow :-) glad to hear you learned so much and like my channel! thanks for watching!

      @Radu@Radu Жыл бұрын
  • Great course. I think that double localStorage call should be optimized, but other than that, absolutely great!

    @backstabba@backstabba6 ай бұрын
    • I think you're right!

      @Radu@Radu5 ай бұрын
  • I've been trying to wrap my head around AI and ML since a long time, but this is by far the simplest way to understand how it works, without learning any additional language. I know Javascript. You just got a subscriber. Keep it coming!

    @scientificshiv@scientificshiv11 ай бұрын
    • Thanks for subscribing :-)

      @Radu@Radu11 ай бұрын
  • Amazing tutorial. Learned and enjoyed a ton from it. Thank you, Dr. Radu. You are an amazing teacher.

    @alirazzaq1541@alirazzaq1541 Жыл бұрын
    • Thanks :-) glad you liked it!

      @Radu@Radu Жыл бұрын
  • @57:48 Even after fixing the curly braces, the sensor lines don't show up for me. The error reads "Uncaught TypeError: Cannot read properties of undefined (reading '0') at Sensor.draw (sensor.js:42:29) at Car.draw (car.js:77:21) at main.js:7:5". If I console.log the start and end of each ray in the update method of the Sensor class (instead of the draw method), the console logs out what look like correct pixel values. What am I doing wrong? How do I fix this?

    @zohebahmad9633@zohebahmad9633 Жыл бұрын
    • For some reason, the this.rays.size is 0 when calling the draw method... I have written the following condition in the draw method and nothing logs out. if (this.rays.size > 0) { console.log(this.rays[i][0].x); console.log(this.rays[i][1].y); }

      @zohebahmad9633@zohebahmad9633 Жыл бұрын
    • @@zohebahmad9633 Could you share your code on the Discord linked on my channel? Hard to say without seeing the whole thing.

      @Radu@Radu Жыл бұрын
    • @@Radu sure

      @zohebahmad9633@zohebahmad9633 Жыл бұрын
    • @@Radu Somehow changing the this.rayCount in the for loop in the draw method to this.rays.length fixes the error... Now my sensors work perfectly! However, only inside the for loop (ensuring the for loop uses this.rays.length and nothing else... not even a constant integer)

      @zohebahmad9633@zohebahmad9633 Жыл бұрын
    • OMG IT'S THE "car.draw(ctx)" BEFORE THE animate() IN main.js THAT WAS CAUSING ALL THIS TROUBLE!!! DON'T KNOW HOW ANY OF THIS WORKS BUT THAT WAS THE PROBLEM!!!

      @zohebahmad9633@zohebahmad9633 Жыл бұрын
  • I cannot believe what I am seeing it with my eyes! LOOL TY SO MUCH!

    @sneadidol6909@sneadidol6909 Жыл бұрын
  • Love this tutorial keep them coming.

    @nofamilyreview8251@nofamilyreview8251 Жыл бұрын
  • Time to make my own tesla

    @abdomzr6938@abdomzr6938 Жыл бұрын
    • Nice one xD

      @priyanshukatuwal@priyanshukatuwal Жыл бұрын
    • @@priyanshukatuwal பரோரரேமரோரேஏப

      @rajamohansankarapandian9092@rajamohansankarapandian9092 Жыл бұрын
    • Elon Musk should fear us now 😂

      @unk9@unk95 ай бұрын
    • @@unk9 he sure will brother

      @abdomzr6938@abdomzr69385 ай бұрын
    • **This is ELON MUSK**

      @gamingdude7959@gamingdude79593 ай бұрын
  • Thanks freeCodeCamp for bringing that amazing content! I've been watching this video since yesterday afternoon, pausing, writing the code and sometimes my own versions of some snippets of code. After playing again, I always realized that Radu did the same thing in a more elegant way and with much less lines of code! A huge thanks, Radu!!! Following your channel, too!

    @jcmschott1895@jcmschott1895 Жыл бұрын
    • Thanks :-) Glad you liked the course!

      @Radu@Radu Жыл бұрын
  • You are a life saver! Kudos to you! You rock!!

    @jezreelquijano6528@jezreelquijano6528 Жыл бұрын
  • I love those coding ads you get before the video that go "I used to work in ______ industry, now I have a six-figure job [but I can't be bothered to get a decent camera, sound, or lighting]"

    @Jay_in_Japan@Jay_in_Japan Жыл бұрын
  • "I want to get rid of that margin." - Every developer's first instinct.

    @eslof@eslof Жыл бұрын
    • Haha, true :-D

      @Radu@Radu Жыл бұрын
  • I had not believed AI can be implemented using JS. Sir, I wish I could be your student.

    @justfun591@justfun591 Жыл бұрын
    • Well... since you're watching this, I guess you are :-)

      @Radu@Radu Жыл бұрын
  • The best video on KZhead! Thank you so much for this.

    @satishgoda@satishgoda Жыл бұрын
  • Great tutorial, links and program worked fine for me. Thanks for sharing.

    @giannidedrijver3339@giannidedrijver3339 Жыл бұрын
  • This was an amazing tutorial! Though, I think the sensors are too short ranged!

    @kzdm5255@kzdm5255 Жыл бұрын
    • You can experiment :-) the code is available. I think long range means that the car can see further ahead, but it also increases the resolution of the sensors, meaning that training the neural network will become harder. Our optimization method is quite simple and the possibility space grows with longer rays.

      @Radu@Radu Жыл бұрын
    • OMG, you seem to be an professional! So can ya also share your opinions about Pollen? I'm in deep love with their project. It's simple to use and makes a massive profit!

      @user-zi2fv4df7v@user-zi2fv4df7v Жыл бұрын
    • @@user-zi2fv4df7v Can you be more specific, which Pollen you are referring to?

      @Radu@Radu Жыл бұрын
    • @@Radu Yeah it was just an observation I made while watching at the airport. I'm also new to JavaScript and machine learning so I will be going through this tutorial again while hands on to learn more about it. I said the sensors were too short jokingly because I thought giving the car more time to detect traffic may result in the car learning to avoid traffic quicker. I shall experiment on that. I appreciate this tutorial by the way.

      @kzdm5255@kzdm5255 Жыл бұрын
    • @@kzdm5255 :-) sure. I actually had longer sensors at first. But it was challenging to find the right parameter values so that I can get the behavior I needed when making the video.

      @Radu@Radu Жыл бұрын
  • Thank you for the great tutorial, Radu! I had a quick js question. I am stuck however at the artificial sensor section. My code produces an error running "this.rays[i][1].x". It's a TypeError that tells me that "undefined" doesn't have "x" property. When I replaced line "this.rays[i][*]" with numbers the code runs and the rays are drawn. But I noticed that the when I console.logged "this.rays", the first term is "undefined." I was wondering if this is something you encountered when coding this project? If so, how did you fix it? Thanks

    @markomwansa@markomwansa Жыл бұрын
    • Hi! It would help if I could see the code somehow.

      @Radu@Radu Жыл бұрын
    • I got the same error if you have the solution please send send it to me

      @akshatchouhan5199@akshatchouhan5199 Жыл бұрын
    • @@Radu I got the same error please help

      @akshatchouhan5199@akshatchouhan5199 Жыл бұрын
    • @@akshatchouhan5199 You might have an extra car.draw(ctx) in main.js, above the animate function.

      @Radu@Radu Жыл бұрын
    • @@Radu thanks the error is gone now

      @akshatchouhan5199@akshatchouhan5199 Жыл бұрын
  • BROTHER, YOU ARE THE BEST!!! You oooh really helped me!! THANK YOU VERY MUCH!

    @endikovaqi7794@endikovaqi7794 Жыл бұрын
  • Thank you for the highly educational content :)

    @obelix247@obelix247 Жыл бұрын
  • In case someone runs in the issue where the lines(lanes) disappear from the middle when setting setLineDash([20,20]) -- the problem is that your infinity number is too high. Change it to something like const infinity = 10000000; and it should fix the problem for you

    @MrGhosTRideRrR@MrGhosTRideRrR Жыл бұрын
    • Thanks!

      @Kenny-jw7fg@Kenny-jw7fg Жыл бұрын
    • Thank you!

      @anasalnatsheh9957@anasalnatsheh9957 Жыл бұрын
    • thank you so much I thought it was a browser not supporting setlinedash issue lol

      @darkensgaming2649@darkensgaming2649 Жыл бұрын
    • thanks

      @flipthecoin.@flipthecoin.5 ай бұрын
    • omg, how does this even work. why is everything ok with a regular line, but not with a dashed line? I spent a lot of time trying to figure out what I was doing wrong, huge thanks!

      @norinormich4663@norinormich46634 ай бұрын
  • I can’t watch the video. It says “No stream” any suggestions????

    @Afashi-vo4vz@Afashi-vo4vz Жыл бұрын
    • same here

      @riigel@riigel Жыл бұрын
    • Try vpn

      @nicksharna@nicksharna Жыл бұрын
    • Same

      @abdelrahmanhedia9483@abdelrahmanhedia9483 Жыл бұрын
    • Vpn to France worked

      @omarious@omarious Жыл бұрын
    • Refresh the page, if doesn't work, clear browser cache. If on mobile app, completely stop it and restart it.

      @zellergade2419@zellergade2419 Жыл бұрын
  • man I missed this kind of tutorials lol. Great work here, thanks!!!

    @harishnaitanwar1162@harishnaitanwar1162 Жыл бұрын
  • This is really cool! This is the first time I felt like I understood neural networks!

    @PainRUify@PainRUify26 күн бұрын
    • You might understand them even better if you watch my 'understanding AI playlist' ;-)

      @Radu@Radu17 күн бұрын
  • At 11:30. I have completely followed the coding. Though after saving the files and refreshing the page, I have the following error: *Uncaught ReferenceError: height is not defined* *at new Car (car.js:6:15)* *at main.js:6:11* Could someone explain what might be the issue please? Thanks in advance.

    @azatgaripov2380@azatgaripov2380 Жыл бұрын
    • Hard to say without seeing the code. Are you using the 'this' keyword before height?

      @Radu@Radu Жыл бұрын
  • Can't wait until the "code your own anime waifu bot in JavaScript" video drops

    @liamconverse8950@liamconverse8950 Жыл бұрын
    • :-)) check the most recent video on my channel (close enough?)

      @Radu@Radu Жыл бұрын
  • I love you man! just from the fact that you took a quick second to explain the arrow function at 16:00 made me really happy!

    @kruptworld@kruptworld Жыл бұрын
    • Cool :-) glad it helped!

      @Radu@Radu Жыл бұрын
  • Would love it if you continue this series...the best thing i ever saw on KZhead❤️

    @jlc-xr4hu@jlc-xr4hu Жыл бұрын
    • Thanks :-) I will make more videos on top of these, but currently have other things in editing, so, it will still take a while.

      @Radu@Radu Жыл бұрын
  • 1:09:50 function getIntersection(A,B,C,D){ const tTop=(D.x-C.x)*(A.y-C.y)-(D.y-C.y)*(A.x-C.x); const uTop=(C.y-A.y)*(A.x-B.x)-(C.x-A.x)*(A.y-B.y); const bottom=(D.y-C.y)*(B.x-A.x)-(D.x-C.x)*(B.y-A.y); if(bottom!=0){ const t=tTop/bottom; const u=uTop/bottom; if(t>=0 && t=0 && u

    @zile8869@zile8869 Жыл бұрын
    • Thanks!

      @Radu@Radu Жыл бұрын
  • At 57:50 I get a "Uncaught TypeError: Cannot read properties of undefined (reading '0') at Sensor.draw (sensor.js:37:29) at Car.draw (car.js:77:21) at main.js:7:5" error. Any help would be appreciated!!!

    @Coryu805@Coryu805 Жыл бұрын
    • If You left a copy of car.draw(ctx); in main.js outside animation loop, delete it and it should work fine

      @raidarkivistik@raidarkivistik Жыл бұрын
    • @@raidarkivistik Yeah... unfortunately I move that line down quite quickly in the video.

      @Radu@Radu Жыл бұрын
    • @@raidarkivistik Thank you so much! It works perfectly now!

      @Coryu805@Coryu805 Жыл бұрын
    • @@raidarkivistik godsend

      @zachc2105@zachc2105 Жыл бұрын
  • Okay best video out there! Straight to the point and crisp video. Thank you so much! Life Saver!

    @abdotarek4155@abdotarek4155 Жыл бұрын
    • Thanks :-) Glad you liked it!

      @Radu@Radu Жыл бұрын
  • All what i need for game. Including collision detection, movement physics, raycasting and so on in one course. The best! Also crazy you explained me the spreat operator in two sentences. Before my brain was so in stuck.

    @crefelder1@crefelder111 ай бұрын
    • Glad to hear it helps :-)

      @Radu@Radu11 ай бұрын
  • At about 42:00 when adding ctx.setLineDash([20, 20]) it instead just removed the middle lines completely. I couldn't figure out where I went wrong. Anyone else have this issue?

    @simplex56@simplex56 Жыл бұрын
    • Yeah, others complained about it too. Your constant for I infinity is probably too large.

      @Radu@Radu Жыл бұрын
    • @@Radu That fixed it, thanks! can you explain why it happens?

      @amitlevy3535@amitlevy3535 Жыл бұрын
    • Thanks

      @fatcat4162@fatcat4162 Жыл бұрын
    • @@Radu Multumesc! :D

      @davidstefanc@davidstefanc3 ай бұрын
  • I have been following the code and I don't know how to fix the error: "Uncaught ReferenceError: Car is not defined at main.js:7:11" can someone help me please

    @rafaelbustillo1308@rafaelbustillo1308 Жыл бұрын
    • Could you share your whole code somehow? I can't say what the problem is from this error message.

      @Radu@Radu Жыл бұрын
    • @@Radu I got it figureed out. the problem is that in the index.html file I had the scripts in a different order so main.js was getting called before car.js. thank you!

      @rafaelbustillo1308@rafaelbustillo1308 Жыл бұрын
    • @@rafaelbustillo1308 ah, OK. Makes sense!

      @Radu@Radu Жыл бұрын
  • well understood. Thank you you are the best teacher.

    @joenelgallego1111@joenelgallego1111 Жыл бұрын
  • This video really helped me. Thank you very much!

    @sudhanvasm2428@sudhanvasm2428 Жыл бұрын
  • for all those too lazy to copy the intersect function function lerp(A, B, t) { return A + (B - A) * t; } function getIntersection(A, B, C, D) { const tTop = (D.x - C.x) * (A.y - C.y) - (D.y - C.y) * (A.x - C.x); const uTop = (C.y - A.y) * (A.x - B.x) - (C.x - A.x) * (A.y - B.y); const bottom = (D.y - C.y) * (B.x - A.x) - (D.x - C.x) * (B.y - A.y); if (bottom != 0) { const t = tTop / bottom; const u = uTop / bottom; if (t >= 0 && t = 0 && u

    @benrogers8390@benrogers8390 Жыл бұрын
    • Thanks for sharing this :-)

      @Radu@Radu Жыл бұрын
    • @@Radu No worries! Loved the course ;) but I don't know how I feel about you calling me out for using JS oveer Python hahah

      @benrogers8390@benrogers8390 Жыл бұрын
    • @@benrogers8390 would you prefer a python version? :-)

      @Radu@Radu Жыл бұрын
  • hi i am radu -> decode -> hi i am raju

    @riju1956@riju1956 Жыл бұрын
    • Raju sounds cooler, though...

      @Radu@Radu Жыл бұрын
  • Amazing and very clear course! It helped me to start with Neural Networks.

    @Shalve94@Shalve94 Жыл бұрын
    • Glad to hear!

      @Radu@Radu Жыл бұрын
  • Thank u for being a great human being and taking ti to help all of us noobs out cheers

    @cadenshafer9838@cadenshafer9838 Жыл бұрын
  • I have a problem in 57:48 . it gives me: Uncaught TypeError: Cannot read properties of undefined (reading '0') at Sensor.draw (sensor.js:34:40) at Car.draw (car.js:51:21) at main.js:7:5 I tried removing car.draw(ctx) in main.js file in line 7 as there were said in comments but I can't see rays that way. Help please🤦‍♂

    @Morteza_HH@Morteza_HH Жыл бұрын
    • If you can share the code somehow (like in the discord linked on my channel), I can have a look.

      @Radu@Radu Жыл бұрын
    • same error, did you manage to figure it out?

      @lol51329@lol51329 Жыл бұрын
    • @@lol51329 removing the car.draw(ctx) in main.js in line 7 worked for me.

      @ericksasonet@ericksasonet6 ай бұрын
  • Why the hell he needs vs code

    @gireeshbhat4158@gireeshbhat41589 ай бұрын
    • What do you use?

      @Radu@Radu9 ай бұрын
    • Iam glad to see your reply ☺️ I also use VS code but as you are not using any syntax highlighting or auto suggestions, I just commented why you use vs code you can use notepad for that.

      @gireeshbhat4158@gireeshbhat41589 ай бұрын
    • @@gireeshbhat4158 :-)) ah, ok, I get it now. Well, I like the themes in VS Code and the fonts look nice. There's some anti-aliasing there, I think. I use highlighting and suggestions when coding normally :-P but when making tutorials I like the focus to be in one place (the cursor) as much as possible... Not a bunch of windows jumping all over the place and sometimes covering parts of code that others are still looking at.

      @Radu@Radu9 ай бұрын
  • Bravo. Amazing lesson. Thank you very much. I had the best results with 3 layers. 10, 6 ,4

    @yakovkemer5062@yakovkemer5062 Жыл бұрын
    • Cool :-)

      @Radu@Radu Жыл бұрын
  • Really a highly rated work, sir.

    @georgidimov4110@georgidimov4110 Жыл бұрын
  • Hmm. Why did they go with JavaScript... I know js - everyone does - but Python is so much nicer to code. I follow the "avoid js if at all possible" route. It's slow though, I'll grant. I suppose it would be easy enough to watch and do it in Python.

    @davidmurphy563@davidmurphy563 Жыл бұрын
    • i suppose because its easier to code the game and an easy api so people can focus on the neural network part more the algorithm should be same no matter the language if you understand js then you should be able to apply it in python with pygame so i think its worth it.

      @fus3n@fus3n Жыл бұрын
    • But python is too slow

      @rajanpoudel7980@rajanpoudel7980 Жыл бұрын
    • @@rajanpoudel7980 Yeah, like I said, it is slow. I might use the open source Godot game engine. It uses a pythonesque script but it'll run something like this at hundreds of FPS. Plus, it has all the convenient methods for this sort of thing. Yeah, I'll do that.

      @davidmurphy563@davidmurphy563 Жыл бұрын
    • It's because JS is popular, so many people know it already, but JS is not well known for machine learning, so... I want to introduce AI related concepts to JS coders. At work I teach this same thing in Python as well. Since I don't use libraries, it doesn't really matter what you use to follow along if you're comfortable with some other language. Most of the things will be compatible.

      @Radu@Radu Жыл бұрын
    • @@fus3n I'm going to try it in Godot. That's basically python and is the lazy man's choice being a dedicated games engine.

      @davidmurphy563@davidmurphy563 Жыл бұрын
  • Thank you for that great course! It's really interesting and your explanations are very good. Thanks :)

    @EinLinuus@EinLinuus Жыл бұрын
    • You're welcome! Thanks for watching :-)

      @Radu@Radu Жыл бұрын
  • thank you men!!! you are really helping us

    @prospect8843@prospect8843 Жыл бұрын
  • Absolute legend!!! Thanks 😊👍

    @mubafaw@mubafaw Жыл бұрын
  • Thank you. TNice tutorials is really helpful. Much respect

    @RuztomLamundao@RuztomLamundao Жыл бұрын
KZhead