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

แชร์
ฝัง

ความคิดเห็น • 1K

  • @freecodecamp
    @freecodecamp  6 หลายเดือนก่อน +16

    After this course, learn from Radu how to make your self-driving cars drive in a virtual world! th-cam.com/video/V_C7L7zelz8/w-d-xo.html

    • @sdexstarlord
      @sdexstarlord 6 หลายเดือนก่อน +1

      is there any part 2 for this video?

    • @Radu
      @Radu 5 หลายเดือนก่อน +1

      @@sdexstarlord Yes, the playlist linked in the first comment.

  • @and-ant984
    @and-ant984 ปีที่แล้ว +105

    no way he really did it in *javascript* with 0 libraries
    i am definitely watching this video multiple times, thanks for the video yall

  • @shira158
    @shira158 ปีที่แล้ว +88

    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.

    • @Radu
      @Radu ปีที่แล้ว +19

      You noticed :-) I tried a different approach for this one (also did a lot of takes to minimize the typos :-D)

    • @paschalasobirionwu1183
      @paschalasobirionwu1183 ปีที่แล้ว +2

      @@Radu 100% worth it its just feels so smooth to follow

  • @santiagomoebio
    @santiagomoebio ปีที่แล้ว +42

    "going infinitely far but also going nowhere" that's life for you. Loved this tutorial, full of substance!

    • @Radu
      @Radu ปีที่แล้ว +2

      Thanks :-)

  • @saicherishpotluri1419
    @saicherishpotluri1419 ปีที่แล้ว +23

    This is by far one of the best videos in terms of neural networks and their real-time implementation

    • @Radu
      @Radu ปีที่แล้ว +2

      Thank you :-) glad you like it!

  • @assasssin5328
    @assasssin5328 ปีที่แล้ว +555

    Great! Now I can change my Tesla’s default self driving software to my own

    • @Afashi-vo4vz
      @Afashi-vo4vz ปีที่แล้ว +23

      😂😂😂😂

    • @Tyrone-Ward
      @Tyrone-Ward ปีที่แล้ว +23

      This is nowhere near as sophisticated as Tesla’s Full Self Driving software.

    • @matthewisikhuemen8907
      @matthewisikhuemen8907 ปีที่แล้ว +16

      Lol haha... I will join you in your mission 😁😁

    • @daniele5692
      @daniele5692 ปีที่แล้ว +8

      Would be funny if your implementation is better then 🤣

    • @motivator8586
      @motivator8586 ปีที่แล้ว +2

      Yaaa U can 😁

  • @camerinfigueroa7875
    @camerinfigueroa7875 ปีที่แล้ว +98

    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

    • @Radu
      @Radu ปีที่แล้ว +4

      Great to hear :-)

    • @MrThatguy333
      @MrThatguy333 ปีที่แล้ว +4

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

    • @eileenchoong6175
      @eileenchoong6175 ปีที่แล้ว

      @@MrThatguy333 aaaaaaàaàààaaààààaaàààààààààààààààààaàaàààààààaààaaaa

    • @Audionic1
      @Audionic1 6 หลายเดือนก่อน +1

      ​@@Raduyou've generated only some traffic I want to generate infinite traffic how can i do that?

    • @Radu
      @Radu 6 หลายเดือนก่อน

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

  • @HristoKolevMayvena
    @HristoKolevMayvena ปีที่แล้ว +25

    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.

    • @Radu
      @Radu ปีที่แล้ว +4

      That sounds like a great plan. Good luck experimenting and learning :-)

  • @NavyaVedachala
    @NavyaVedachala ปีที่แล้ว +29

    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.

    • @Radu
      @Radu ปีที่แล้ว +5

      Thank you for making things even clearer :-)

  • @___d3p1
    @___d3p1 ปีที่แล้ว +62

    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!

    • @Radu
      @Radu ปีที่แล้ว +2

      Thanks again for the feedback :-)

    • @creatorcode96
      @creatorcode96 4 หลายเดือนก่อน

      Yes Bro this man is a genius!

  • @superrazer3643
    @superrazer3643 ปีที่แล้ว +4

    This is the First time ever I saw implementing a Neural Network with Coding! Thank You for Bringing this to US!!

    • @Radu
      @Radu ปีที่แล้ว

      Congratulations :-)

  • @migdress
    @migdress หลายเดือนก่อน +2

    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

    • @Radu
      @Radu หลายเดือนก่อน +1

      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 TH-cam because it's so easy for people to follow along (no need to install anything).

    • @migdress
      @migdress หลายเดือนก่อน +2

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

    • @Radu
      @Radu หลายเดือนก่อน +1

      @@migdress thanks for motivating me like that :-)

  • @vicyoslinuxofficial2607
    @vicyoslinuxofficial2607 ปีที่แล้ว +22

    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.

    • @Radu
      @Radu ปีที่แล้ว +2

      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 :-)

    • @vicyoslinuxofficial2607
      @vicyoslinuxofficial2607 ปีที่แล้ว +2

      @@Radu I will take a look at them. :)

    • @Radu
      @Radu ปีที่แล้ว +1

      @@vicyoslinuxofficial2607 Cool :-)

  • @markeyboi6545
    @markeyboi6545 ปีที่แล้ว +57

    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!

    • @Radu
      @Radu ปีที่แล้ว +8

      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.

  • @Atzanteol1
    @Atzanteol1 ปีที่แล้ว +9

    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!

    • @Radu
      @Radu ปีที่แล้ว

      Thank you. Glad you liked it :-)

    • @PTS1337
      @PTS1337 ปีที่แล้ว +1

      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.

    • @Radu
      @Radu ปีที่แล้ว

      @@PTS1337 Thanks for the tip!

  • @bkosimi
    @bkosimi ปีที่แล้ว +10

    Amazing course and great teaching methods, Radu! Appreciate FCC sharing another excellent resource. 100%!!!

    • @Radu
      @Radu ปีที่แล้ว +1

      Thank you, Botur!

  • @TheFenny
    @TheFenny ปีที่แล้ว +10

    Thanks so much ! You guys are helping me make my portfolio a lot better

  • @mathhack8647
    @mathhack8647 ปีที่แล้ว +6

    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)

    • @Radu
      @Radu ปีที่แล้ว

      Thank you for all the nice words :-)

  • @ccamerini8679
    @ccamerini8679 ปีที่แล้ว +3

    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

    • @Radu
      @Radu ปีที่แล้ว +2

      I'm planning different extensions to this course. Let's see what I come up with :-)

  • @JasonDask
    @JasonDask ปีที่แล้ว +10

    Clear, calm and informative
    10/10
    Thanks a lot!

    • @Radu
      @Radu ปีที่แล้ว

      Thanks for watching!

  • @kosuke5570
    @kosuke5570 ปีที่แล้ว

    just finished making my first track! thanks bro for all the help with learning soft soft. much love

  • @prabhuofficial6072
    @prabhuofficial6072 ปีที่แล้ว +4

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

    • @Radu
      @Radu ปีที่แล้ว

      Thank you :-)

  • @mirshodoripov1035
    @mirshodoripov1035 ปีที่แล้ว +4

    This chanel is the best code chanel in the youtube. thank you for everything

  • @caseyvollan8558
    @caseyvollan8558 ปีที่แล้ว +10

    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!

    • @mainlinemitch
      @mainlinemitch ปีที่แล้ว +1

      Im almost 39....its never too late! I actually have better study habits now than i ever had in High School or College

  • @darkensgaming2649
    @darkensgaming2649 ปีที่แล้ว +6

    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

  • @runtimejpp
    @runtimejpp 6 หลายเดือนก่อน +5

    Man among boys in JS. Coolest thing about no libs is that that courses will last forever

    • @Radu
      @Radu 5 หลายเดือนก่อน +1

      😎 Thanks!

  • @scientificshiv
    @scientificshiv 11 หลายเดือนก่อน +1

    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!

    • @Radu
      @Radu 11 หลายเดือนก่อน

      Thanks for subscribing :-)

  • @DJ29Joesph
    @DJ29Joesph ปีที่แล้ว +2

    Love it. "Naturally, I want the car to explode on impact" 🤣

    • @Radu
      @Radu ปีที่แล้ว

      :-))

  • @mrh3956
    @mrh3956 ปีที่แล้ว +3

    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.

    • @Radu
      @Radu ปีที่แล้ว +1

      You're welcome!

  • @aitorplaza2560
    @aitorplaza2560 ปีที่แล้ว +11

    It's a very good channel, it's worth subscribing and watching his other tutorials in vanilla JS.

    • @Radu
      @Radu ปีที่แล้ว +5

      Thanks, Aitor :-) for recommending my content!

  • @rajanpoudel7980
    @rajanpoudel7980 ปีที่แล้ว +2

    Omg I was looking for ml course using Js and when I opened TH-cam I was recommended this gem. Thanks alot

  • @jeanaimarre8605
    @jeanaimarre8605 2 หลายเดือนก่อน +1

    Exceptional training course with coding in real time with crystal clear explanations during work. Never seen such a valuable video.

    • @Radu
      @Radu หลายเดือนก่อน

      Really happy to hear this :-) Thanks for watching!

  • @paulwong7224
    @paulwong7224 ปีที่แล้ว +3

    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!

    • @Radu
      @Radu ปีที่แล้ว

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

    • @tanmaypanadi1414
      @tanmaypanadi1414 ปีที่แล้ว

      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

    • @Radu
      @Radu ปีที่แล้ว

      @@tanmaypanadi1414 haha :-)

    • @Radu
      @Radu ปีที่แล้ว

      @@tanmaypanadi1414 thank you!

  • @ofirfr4804
    @ofirfr4804 ปีที่แล้ว +4

    This video was so good! Yes I would LOVE the suggested course, PLEASE!!!

    • @Radu
      @Radu ปีที่แล้ว

      Cool :-) It's on my list and I'll make it someday.

  • @alirazzaq1541
    @alirazzaq1541 ปีที่แล้ว +2

    Amazing tutorial. Learned and enjoyed a ton from it. Thank you, Dr. Radu. You are an amazing teacher.

    • @Radu
      @Radu ปีที่แล้ว +1

      Thanks :-) glad you liked it!

  • @paxtonlenord8014
    @paxtonlenord8014 ปีที่แล้ว

    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

  • @williamikennanwosu
    @williamikennanwosu ปีที่แล้ว +11

    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!

    • @Radu
      @Radu ปีที่แล้ว +3

      Wow :-) glad to hear you learned so much and like my channel! thanks for watching!

  • @abdulrahmansaber9585
    @abdulrahmansaber9585 ปีที่แล้ว +3

    You're one of the greatest teachers i've ever seen so far! Thank you

    • @Radu
      @Radu ปีที่แล้ว +1

      Thank you!

  • @AngeloRandazzo
    @AngeloRandazzo ปีที่แล้ว +1

    this tutorial is simply GOLD! thank you man

  • @pravinsukumaran6080
    @pravinsukumaran6080 ปีที่แล้ว +1

    Thank you very much guys ......we need more ppl like yall on this earth

  • @robolson135
    @robolson135 ปีที่แล้ว +5

    This is such an extremely fun course, great teacher too!

    • @Radu
      @Radu ปีที่แล้ว

      Thank you.

  • @JoeGaffey
    @JoeGaffey ปีที่แล้ว +6

    One of the best code tutorials I've seen. Excellent work. Incredibly useful. Well done!

    • @Radu
      @Radu ปีที่แล้ว +2

      You're welcome :-)

  • @shira158
    @shira158 ปีที่แล้ว +1

    Mulțumim frumos, Radu! Ne faci mândri! 😊

    • @Radu
      @Radu ปีที่แล้ว

      Cu placere :-)

  • @Mr0izo84
    @Mr0izo84 ปีที่แล้ว +2

    Such a great content with a splendid professor,
    Thank you for the knowledge and the good mood !!!

    • @Radu
      @Radu ปีที่แล้ว

      Thanks :-)

  • @backstabba
    @backstabba 6 หลายเดือนก่อน +3

    Great course. I think that double localStorage call should be optimized, but other than that, absolutely great!

    • @Radu
      @Radu 5 หลายเดือนก่อน

      I think you're right!

  • @_flavio_silva
    @_flavio_silva ปีที่แล้ว +5

    I was really looking for a machine learning tutorial :)

  • @jlc-xr4hu
    @jlc-xr4hu ปีที่แล้ว +1

    Would love it if you continue this series...the best thing i ever saw on TH-cam❤️

    • @Radu
      @Radu ปีที่แล้ว

      Thanks :-) I will make more videos on top of these, but currently have other things in editing, so, it will still take a while.

  • @varswe
    @varswe 10 หลายเดือนก่อน +2

    this man is in a league of his own, marvelous video

    • @Radu
      @Radu 10 หลายเดือนก่อน +1

      Thank you :-)

    • @varswe
      @varswe 10 หลายเดือนก่อน +2

      @@Radusir, I'm trying to extend this project in a way that a human will drive this car for a while then sensor data will be used to train the neural network and thank you so much for providing knowledge is such a fun manner

    • @Radu
      @Radu 10 หลายเดือนก่อน +1

      @@varswe Hi, you may want to check my recent video on the Euclidean distance. I give an example doing what you want, but without a neural network. You can extend it of course...
      Thanks for watching! Let me know what you come up with :-)

    • @varswe
      @varswe 10 หลายเดือนก่อน

      @@Radu thanks for giving more resource, 😇

  • @Active-AI
    @Active-AI ปีที่แล้ว +12

    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!

  • @kruptworld
    @kruptworld ปีที่แล้ว +1

    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!

    • @Radu
      @Radu ปีที่แล้ว

      Cool :-) glad it helped!

  • @zohebahmad9633
    @zohebahmad9633 ปีที่แล้ว +2

    @1:47:58
    YES ABSOLUTELY READY!
    Loving the content so far and was quite intrigued by the use of biases.
    Cheers!

    • @Radu
      @Radu ปีที่แล้ว

      I'm planning some extensions to the course, but it will still take a while (looking for quality rather than quantity).

  • @bayedevilakazi6328
    @bayedevilakazi6328 ปีที่แล้ว +10

    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

    • @xaviermagnus8310
      @xaviermagnus8310 ปีที่แล้ว +2

      How well do you know C++?

    • @bayedevilakazi6328
      @bayedevilakazi6328 ปีที่แล้ว +1

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

    • @xaviermagnus8310
      @xaviermagnus8310 ปีที่แล้ว +1

      @@bayedevilakazi6328 The reason to use C++ would show up fast exposing this to harder tests.

    • @pimpc7984
      @pimpc7984 ปีที่แล้ว

      Lol c++ is all pointers and memory,

  • @lucasa8710
    @lucasa8710 ปีที่แล้ว +10

    You can tell it is a great video right in the first five minutes

    • @Radu
      @Radu ปีที่แล้ว +1

      Thank you, Lucas :-) hope you like the rest of it too!

  • @crefelder1
    @crefelder1 11 หลายเดือนก่อน +1

    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.

    • @Radu
      @Radu 11 หลายเดือนก่อน +1

      Glad to hear it helps :-)

  • @5skr0ll3r3
    @5skr0ll3r3 3 หลายเดือนก่อน +1

    Finally understood how machine learning works just thank you, wanted to start some projects but could not understand how

  • @jcmschott1895
    @jcmschott1895 ปีที่แล้ว +4

    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!

    • @Radu
      @Radu ปีที่แล้ว

      Thanks :-) Glad you liked the course!

  • @abdomzr6938
    @abdomzr6938 ปีที่แล้ว +130

    Time to make my own tesla

    • @priyanshukatuwal
      @priyanshukatuwal ปีที่แล้ว +1

      Nice one xD

    • @rajamohansankarapandian9092
      @rajamohansankarapandian9092 ปีที่แล้ว

      @@priyanshukatuwal பரோரரேமரோரேஏப

    • @unk9
      @unk9 5 หลายเดือนก่อน +4

      Elon Musk should fear us now 😂

    • @abdomzr6938
      @abdomzr6938 5 หลายเดือนก่อน +3

      @@unk9 he sure will brother

    • @gamingdude7959
      @gamingdude7959 3 หลายเดือนก่อน +2

      **This is ELON MUSK**

  • @auliyaramdini2964
    @auliyaramdini2964 ปีที่แล้ว

    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

  • @PainRUify
    @PainRUify 25 วันที่ผ่านมา +1

    This is really cool! This is the first time I felt like I understood neural networks!

    • @Radu
      @Radu 17 วันที่ผ่านมา

      You might understand them even better if you watch my 'understanding AI playlist' ;-)

  • @zohebahmad9633
    @zohebahmad9633 ปีที่แล้ว +7

    @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 ปีที่แล้ว +3

      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);
      }

    • @Radu
      @Radu ปีที่แล้ว

      @@zohebahmad9633 Could you share your code on the Discord linked on my channel? Hard to say without seeing the whole thing.

    • @zohebahmad9633
      @zohebahmad9633 ปีที่แล้ว

      @@Radu sure

    • @zohebahmad9633
      @zohebahmad9633 ปีที่แล้ว +1

      @@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 ปีที่แล้ว +9

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

  • @kzdm5255
    @kzdm5255 ปีที่แล้ว +7

    This was an amazing tutorial! Though, I think the sensors are too short ranged!

    • @Radu
      @Radu ปีที่แล้ว +2

      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.

    • @user-zi2fv4df7v
      @user-zi2fv4df7v ปีที่แล้ว +1

      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!

    • @Radu
      @Radu ปีที่แล้ว +1

      @@user-zi2fv4df7v Can you be more specific, which Pollen you are referring to?

    • @kzdm5255
      @kzdm5255 ปีที่แล้ว

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

    • @Radu
      @Radu ปีที่แล้ว +1

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

  • @mynewgadget5128
    @mynewgadget5128 ปีที่แล้ว +1

    this is the first video of yours I watched You are a gem, you tried your best to recover his data. I had never watched a video like this before. I am glad to subscribe to your channel.

    • @Radu
      @Radu ปีที่แล้ว

      Glad you liked it :-)

  • @josediazperez9446
    @josediazperez9446 ปีที่แล้ว

    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.

  • @justfun591
    @justfun591 ปีที่แล้ว +5

    I had not believed AI can be implemented using JS. Sir, I wish I could be your student.

    • @Radu
      @Radu ปีที่แล้ว +5

      Well... since you're watching this, I guess you are :-)

  • @eslof
    @eslof ปีที่แล้ว +5

    "I want to get rid of that margin." - Every developer's first instinct.

    • @Radu
      @Radu ปีที่แล้ว +1

      Haha, true :-D

  • @CrazyFungusGaming
    @CrazyFungusGaming ปีที่แล้ว +1

    Great content, keep up the great work mate! Subscribed for more videos!
    I have been looking for something like this for a long time.

    • @Radu
      @Radu ปีที่แล้ว

      Glad you like it! See you around!

  • @jageshkoiri8990
    @jageshkoiri8990 ปีที่แล้ว

    It's so pleasing. The setuping and mastering softs amazing.

  • @MrGhosTRideRrR
    @MrGhosTRideRrR ปีที่แล้ว +10

    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

    • @Kenny-jw7fg
      @Kenny-jw7fg ปีที่แล้ว

      Thanks!

    • @anasalnatsheh9957
      @anasalnatsheh9957 ปีที่แล้ว

      Thank you!

    • @darkensgaming2649
      @darkensgaming2649 ปีที่แล้ว +1

      thank you so much I thought it was a browser not supporting setlinedash issue lol

    • @flipthecoin.
      @flipthecoin. 5 หลายเดือนก่อน

      thanks

    • @norinormich4663
      @norinormich4663 4 หลายเดือนก่อน

      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!

  • @markomwansa
    @markomwansa ปีที่แล้ว +4

    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

    • @Radu
      @Radu ปีที่แล้ว +1

      Hi! It would help if I could see the code somehow.

    • @akshatchouhan5199
      @akshatchouhan5199 ปีที่แล้ว +1

      I got the same error if you have the solution please send send it to me

    • @akshatchouhan5199
      @akshatchouhan5199 ปีที่แล้ว +1

      @@Radu I got the same error please help

    • @Radu
      @Radu ปีที่แล้ว +6

      @@akshatchouhan5199 You might have an extra car.draw(ctx) in main.js, above the animate function.

    • @akshatchouhan5199
      @akshatchouhan5199 ปีที่แล้ว

      @@Radu thanks the error is gone now

  • @AtNovember
    @AtNovember ปีที่แล้ว +2

    That is awesome man! I've started similar project two weeks ago, and got stack with it!
    Now I see what I did wrong )) Thanks for your manual

    • @Radu
      @Radu ปีที่แล้ว +1

      Wow, really? That's awesome!

  • @EinLinuus
    @EinLinuus ปีที่แล้ว +2

    Thank you for that great course! It's really interesting and your explanations are very good. Thanks :)

    • @Radu
      @Radu ปีที่แล้ว +1

      You're welcome! Thanks for watching :-)

  • @Afashi-vo4vz
    @Afashi-vo4vz ปีที่แล้ว +12

    I can’t watch the video. It says “No stream” any suggestions????

    • @riigel
      @riigel ปีที่แล้ว

      same here

    • @nicksharna
      @nicksharna ปีที่แล้ว +1

      Try vpn

    • @abdelrahmanhedia9483
      @abdelrahmanhedia9483 ปีที่แล้ว

      Same

    • @omarious
      @omarious ปีที่แล้ว

      Vpn to France worked

    • @zellergade2419
      @zellergade2419 ปีที่แล้ว

      Refresh the page, if doesn't work, clear browser cache. If on mobile app, completely stop it and restart it.

  • @azatgaripov2380
    @azatgaripov2380 ปีที่แล้ว +3

    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.

    • @Radu
      @Radu ปีที่แล้ว

      Hard to say without seeing the code. Are you using the 'this' keyword before height?

  • @AjarnSpencer
    @AjarnSpencer ปีที่แล้ว

    Explanation of arrow function in controls dot js was amazing!

    • @Radu
      @Radu ปีที่แล้ว

      Glad you liked it :-)

  • @vasiloconnell281
    @vasiloconnell281 ปีที่แล้ว +2

    Очень крутой курс. Огромное спасибо.

  • @zile8869
    @zile8869 ปีที่แล้ว +3

    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

    • @Radu
      @Radu ปีที่แล้ว

      Thanks!

  • @simplex56
    @simplex56 ปีที่แล้ว +3

    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?

    • @Radu
      @Radu ปีที่แล้ว +2

      Yeah, others complained about it too. Your constant for I infinity is probably too large.

    • @amitlevy3535
      @amitlevy3535 ปีที่แล้ว

      @@Radu That fixed it, thanks!
      can you explain why it happens?

    • @fatcat4162
      @fatcat4162 ปีที่แล้ว +1

      Thanks

    • @davidstefanc
      @davidstefanc 3 หลายเดือนก่อน

      @@Radu Multumesc! :D

  • @Shalve94
    @Shalve94 ปีที่แล้ว +1

    Amazing and very clear course! It helped me to start with Neural Networks.

    • @Radu
      @Radu ปีที่แล้ว

      Glad to hear!

  • @busraaslan7520
    @busraaslan7520 ปีที่แล้ว

    Now I understand how to make loops and export everytNice tutorialng really god bless you.. your way of explaining simply aweso I loved it

  • @liamconverse8950
    @liamconverse8950 ปีที่แล้ว +3

    Can't wait until the "code your own anime waifu bot in JavaScript" video drops

    • @Radu
      @Radu ปีที่แล้ว

      :-)) check the most recent video on my channel (close enough?)

  • @rafaelbustillo1308
    @rafaelbustillo1308 ปีที่แล้ว +4

    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

    • @Radu
      @Radu ปีที่แล้ว

      Could you share your whole code somehow? I can't say what the problem is from this error message.

    • @rafaelbustillo1308
      @rafaelbustillo1308 ปีที่แล้ว +3

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

    • @Radu
      @Radu ปีที่แล้ว

      @@rafaelbustillo1308 ah, OK. Makes sense!

  • @abdotarek4155
    @abdotarek4155 ปีที่แล้ว +1

    Okay best video out there! Straight to the point and crisp video. Thank you so much! Life Saver!

    • @Radu
      @Radu ปีที่แล้ว

      Thanks :-) Glad you liked it!

  • @fakefury1198
    @fakefury1198 ปีที่แล้ว +1

    What an awesome video! I'm so grateful that I'm in pre-calc right now so I understand all of the trig stuff :)

    • @Radu
      @Radu ปีที่แล้ว

      Great! :-)

  • @Coryu805
    @Coryu805 ปีที่แล้ว +5

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

    • @raidarkivistik
      @raidarkivistik ปีที่แล้ว +8

      If You left a copy of car.draw(ctx); in main.js outside animation loop, delete it and it should work fine

    • @Radu
      @Radu ปีที่แล้ว +2

      @@raidarkivistik Yeah... unfortunately I move that line down quite quickly in the video.

    • @Coryu805
      @Coryu805 ปีที่แล้ว

      @@raidarkivistik Thank you so much! It works perfectly now!

    • @zachc2105
      @zachc2105 ปีที่แล้ว

      @@raidarkivistik godsend

  • @benrogers8390
    @benrogers8390 ปีที่แล้ว +3

    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

    • @Radu
      @Radu ปีที่แล้ว +1

      Thanks for sharing this :-)

    • @benrogers8390
      @benrogers8390 ปีที่แล้ว +1

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

    • @Radu
      @Radu ปีที่แล้ว

      @@benrogers8390 would you prefer a python version? :-)

  • @georgiiperepechko9321
    @georgiiperepechko9321 ปีที่แล้ว +2

    This is a great course 👍 If you have a basic knowledge of JS you can follow the explanations and learn a lot.

    • @Radu
      @Radu ปีที่แล้ว +1

      Thank you! I'm happy to hear that :-)

  • @yakovkemer5062
    @yakovkemer5062 ปีที่แล้ว +2

    Bravo. Amazing lesson. Thank you very much. I had the best results with 3 layers. 10, 6 ,4

    • @Radu
      @Radu ปีที่แล้ว

      Cool :-)

  • @riju1956
    @riju1956 ปีที่แล้ว +3

    hi i am radu -> decode -> hi i am raju

    • @Radu
      @Radu ปีที่แล้ว +2

      Raju sounds cooler, though...

  • @Morteza_HH
    @Morteza_HH ปีที่แล้ว +3

    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🤦‍♂

    • @Radu
      @Radu ปีที่แล้ว

      If you can share the code somehow (like in the discord linked on my channel), I can have a look.

    • @lol51329
      @lol51329 ปีที่แล้ว

      same error, did you manage to figure it out?

    • @ericksasonet
      @ericksasonet 6 หลายเดือนก่อน

      @@lol51329 removing the car.draw(ctx) in main.js in line 7 worked for me.

  • @a0nmusic
    @a0nmusic ปีที่แล้ว +1

    this has been the most fun best interesting tutorial on youtube. well done!

    • @Radu
      @Radu ปีที่แล้ว

      Thank you. Glad you liked it :-)

  • @calebcadainoo
    @calebcadainoo ปีที่แล้ว +1

    Woooow this guy's a great teacher... I'm just watching and not coding but I'm really enjoying it 👏

    • @Radu
      @Radu ปีที่แล้ว

      Glad to hear :-)

  • @gireeshbhat4158
    @gireeshbhat4158 9 หลายเดือนก่อน +3

    Why the hell he needs vs code

    • @Radu
      @Radu 9 หลายเดือนก่อน +1

      What do you use?

    • @gireeshbhat4158
      @gireeshbhat4158 9 หลายเดือนก่อน +1

      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.

    • @Radu
      @Radu 9 หลายเดือนก่อน +1

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

  • @davidmurphy563
    @davidmurphy563 ปีที่แล้ว +4

    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.

    • @fus3n
      @fus3n ปีที่แล้ว +2

      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.

    • @rajanpoudel7980
      @rajanpoudel7980 ปีที่แล้ว +1

      But python is too slow

    • @davidmurphy563
      @davidmurphy563 ปีที่แล้ว +2

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

    • @Radu
      @Radu ปีที่แล้ว +4

      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.

    • @davidmurphy563
      @davidmurphy563 ปีที่แล้ว

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

  • @daveanderson8348
    @daveanderson8348 ปีที่แล้ว +2

    By far the best video and best teacher I've ever seen on TH-cam!

    • @Radu
      @Radu ปีที่แล้ว

      Thank you :-)

  • @elsa1246
    @elsa1246 ปีที่แล้ว +2

    for anyone who wants to know, there are lines of code in the final code, presented on GitHub, so be sure to reference that, I followed along with the tutorials, and my self driving car didn't work at all! I spent hour and hours re-watching the tutorial and rewriting my code to make sure I got it all right, it still didn't work! I eventually went to the source code on GitHub, I cut an paste it into my text editor, and it worked! finally! there are added lines of code that are not included in the live tutorial.

    • @elsa1246
      @elsa1246 ปีที่แล้ว

      But, as an after thought, I enjoyed the tutorial, and I think he's a great teacher! keep posting good content like this!

  • @samurai-capybara
    @samurai-capybara ปีที่แล้ว +1

    Awesome video... just what I was looking for! Thank you. And I love how you smirk every time you say 'lerp'... it is a funny word.

    • @Radu
      @Radu ปีที่แล้ว

      :-)) thanks for watching

  • @harishnaitanwar1162
    @harishnaitanwar1162 ปีที่แล้ว

    man I missed this kind of tutorials lol. Great work here, thanks!!!

  • @alexanderzelenkov6944
    @alexanderzelenkov6944 ปีที่แล้ว +1

    Great! I like your way of teaching - calm and thorough.

    • @Radu
      @Radu ปีที่แล้ว +1

      Thank you

  • @nofamilyreview8251
    @nofamilyreview8251 ปีที่แล้ว +1

    Love this tutorial keep them coming.

  • @runningwithscissors7715
    @runningwithscissors7715 ปีที่แล้ว +1

    this was an excellent tutorial..and i actually understood neural networks a bit more.....great teacher with an amazing mind...liked and subscribed

    • @Radu
      @Radu ปีที่แล้ว

      Happy to hear, thanks for watching :-)