Uploaded July 2023 | Updated December 2026, 3 hours ago
To improve the accuracy of our machine learning classifier, we'll implement another feature where we measure how elongated a shape is. We do this by first computing the convex hull, then finding which oriented bounding box has the smallest area and finally dividing it's width (the longest side) to the height (the shortest side). Then, we add this feature to create a 3 dimensional feature vector and use the KNN classifier using the Euclidean distance.
The Course: youtube.com/playlist?list=PLB0Tybl0UNfYe9aJXfWw-Dw_4VnFrqRC4
💻 Code
github.com/gniziemazity/ml-course-phase-2
✔️ Use P3 to follow along
✔️ P4 is the code after this lesson
💻Ilya's code: gist.github.com/id-ilych/8630fb273e5c5a0b64ca1dc080d68b63
Interpolation Video:
youtu.be/J_puRs40GhM
Euclidean Distance Video:
youtu.be/3rPwfmrCwVw
⭐️TIMESTAMPS⭐️
00:00 Course Introduction
02:05 Reviewing Ilya's Code
04:54 Debugging the Code
08:25 Elongation Feature
11:00 Euclidean Distance
16:08 Analysis and Discussion
To improve the accuracy of our machine learning classifier, we'll implement another feature where we measure how elongated a shape is. We do this by first computing the convex hull, then finding which oriented bounding box has the smallest area and finally dividing it's width (the longest side) to the height (the shortest side). Then, we add this feature to create a 3 dimensional feature vector and use the KNN classifier using the Euclidean distance.
The Course: youtube.com/playlist?list=PLB0Tybl0UNfYe9aJXfWw-Dw_4VnFrqRC4
💻 Code
github.com/gniziemazity/ml-course-phase-2
✔️ Use P3 to follow along
✔️ P4 is the code after this lesson
💻Ilya's code: gist.github.com/id-ilych/8630fb273e5c5a0b64ca1dc080d68b63
Interpolation Video:
youtu.be/J_puRs40GhM
Euclidean Distance Video:
youtu.be/3rPwfmrCwVw
⭐️TIMESTAMPS⭐️
00:00 Course Introduction
02:05 Reviewing Ilya's Code
04:54 Debugging the Code
08:25 Elongation Feature
11:00 Euclidean Distance
16:08 Analysis and Discussion










![Tilt Control for JavaScript Games [Understanding AI - Lesson 12 / 15]
PLAYLIST: https://www.youtube.com/playlist?list=PLB0Tybl0UNfYbL1vDNrfHoYOKf1Sn0A81
Remember those early mobile games where you could steer by tilting the phone? In this video, Ill guide you through using the device orientation sensor to capture tilt movements. Its a fantastic technique that opens up a world of possibilities for game control.
Lets explore the potential of this feature not just for games, but for other applications too. Ill share my friends creation, Jazzman vs. Metalheadz, which showcases the versatility of tilt controls.
The applications extend beyond gaming – think about measuring tree heights or distances to distant objects. If youre interested, I have tutorials on those topics as well. Towards the end of the video, Ill demonstrate how to integrate tilt controls into our racing game, tying it back to the Understanding AI course.
So, let me steer you in the right direction for implementing device orientation in your projects. And by the way, did I mention well be doing some nononooooo again? You wont want to miss it! Like, share, and subscribe for more exciting tutorials on AI, game development, and innovative programming techniques!
💻CODE FOR THE RACING GAME PART💻
https://github.com/gniziemazity/understanding_ai
Follow Along: 7. Camera Part 2
Code After This Lesson: 8. Phone Input
💬DISCORD💬
discord.gg/gJFcF5XVn9
⭐LINKS⭐
TEST on My Website: https://radufromfinland.com/projects/phoneRacer
Self-driving Car Course: https://www.youtube.com/playlist?list=PLB0Tybl0UNfYoJE7ZwsBQoDIG4YN9ptyY
Measuring Tree Height Tutorial: https://youtu.be/0hxNFuo5Ncc
Measuring Distance Tutorial: https://youtu.be/qjuQYFdcSxw
Jazzman vs. Metalheadz: https://play.google.com/store/apps/details?id=com.matti.mononen.jazzman
#RacingGame #RacingGameJavaScript #OrientationSensorJavaScript #JavaScriptDeviceOrientation #LearnJavaScript
⭐TIMESTAMPS⭐
00:00 Introduction
01:29 Basic Project Setup
08:15 Using Device Orientation
15:47 Using Gravity
20:25 Integrating with the Racing Game Tilt Control for JavaScript Games [Understanding AI - Lesson 12 / 15]](https://i.ytimg.com/vi/ZgjDeO_EzY4/mqdefault.jpg)