Training an unbeatable AI in Trackmania

Поділитися
Вставка
  • Опубліковано 21 лис 2024

КОМЕНТАРІ • 6 тис.

  • @culleng.1653
    @culleng.1653 Рік тому +31262

    Showing the AI's multiple training runs simultaneously and color coded is one of the most gorgeous and elegant depictions of machine learning I've ever seen. Thank you for this video!!

    • @kossboss
      @kossboss Рік тому +81

      Yeah about that. @yosh how did you do that just curious. Is it part of the game?

    • @ifyoustaywithmeyouwillneve1678
      @ifyoustaywithmeyouwillneve1678 Рік тому +63

      @@kossboss i think the game comes With a tool or there's popular plugins for it (it has a huges player base) to show a lot of 'ghost' laps, there's lots and lots o vids outhere of videos showing that. For the coloring, i guees is what the previous comment said, anyway the game allows to make your own liverys and some people use mod the models. To look like something else, so probably is a middle point.

    • @bcbble
      @bcbble Рік тому +6

      ​@@kossbosschanging the car skin based on how far it gets into the track.

    • @Todesschleicher
      @Todesschleicher Рік тому +34

      ​@@kossboss at 20:31 he thanks "Alyssia" for helping automate the car skin changes, so I guess there's some sort of script involved

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

      ​@@kossbossin 😊ppol

  • @One_Stale_Donut
    @One_Stale_Donut Рік тому +15680

    Insane production value, the editing that went into this, and the time it must have taken.

    • @fluffsquirrel
      @fluffsquirrel Рік тому +92

      Ai still can't beat that! (hopefully)

    • @principeSZN
      @principeSZN Рік тому +98

      it took 3 years

    • @fluffsquirrel
      @fluffsquirrel Рік тому +44

      @@principeSZN But the thinking, planning, learning up to that point played a huge role in shaping how he figured these procedures out and how to best interest and reach the audience. This is the culmination of all his hard work. His legacy began 3 years ago, and he's still going!

    • @SorakaOTP462
      @SorakaOTP462 Рік тому +7

      It's not like he's doing these videos for free, genius. You don't need to appreciate him for something that he got the money off of viewers like you.

    • @tophmyster
      @tophmyster Рік тому +3

      @@SorakaOTP462 L take bozo

  • @florrex4136
    @florrex4136 Рік тому +4321

    That drift-overtraining and then training off the excess is a really interesting approach to let the Ai discover new mechanics👍🏻

    • @SumGuyLovesVideos
      @SumGuyLovesVideos 11 місяців тому +126

      this is what coaches do when they train a new skill for humans, it's interesting to see it applied here, and then removed

    • @nemou4985
      @nemou4985 11 місяців тому +44

      Similar pedagogical approach to human learning in general

    • @teakfreeman3543
      @teakfreeman3543 11 місяців тому +4

      @@SumGuyLovesVideoswhat do you mean that’s what coaches do? I’m not following

    • @SumGuyLovesVideos
      @SumGuyLovesVideos 11 місяців тому +74

      @@teakfreeman3543 take basketball for example, the coach doesn't just have the players play the game and hope they discover all the different skills, he sets up drills

    • @SumGuyLovesVideos
      @SumGuyLovesVideos 11 місяців тому +70

      @@teakfreeman3543 each drill focuses on developing a certain skill, like thousands of jump shots, then later in the game it's another option the player can use

  • @cliftonsargent1572
    @cliftonsargent1572 11 місяців тому +42

    This was amazing, like watching a child start to walk then slowly just full sprint. I’m subbed from this video alone

  • @Bassalicious
    @Bassalicious Рік тому +959

    This is nuts. The sheer amount of work involved boggles the mind. Such a well paced and chill presentation too, love it!

    • @c-ameliaa
      @c-ameliaa Рік тому +2

      Really like the video!

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

      just like a mouse experiment :)

  • @darkranger116
    @darkranger116 Рік тому +1165

    I always love these training AI videos. Its like the "wizard knows his apprentice will be more powerful than him one day, but only if he is guided there" vibe

    • @AtticusKarpenter
      @AtticusKarpenter Рік тому +31

      Like shonen training montage, but protagonist is mentor. Its cute in some way.

    • @joklu6257
      @joklu6257 Рік тому +11

      I also recognized that I find this type of video extremly satisfiying and I think you perfectly described the vibe of it

  • @PaulOsbornesChannel
    @PaulOsbornesChannel Рік тому +851

    The way you taught it to drift, then taught it to use drifting to go faster was brilliant

    • @JMurph2015
      @JMurph2015 Рік тому +38

      The AI got a whole _training_ arc if you follow my drift.

    • @nemou4985
      @nemou4985 11 місяців тому +8

      @@JMurph2015 The topic is drifting from training to puns so fast that I can't catch up

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

      Give me a brake from these puns!

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

      Can we steer this conversation back to its normal path?

    • @zizazaplayz3992
      @zizazaplayz3992 8 місяців тому +5

      These puns simply TIRE me

  • @aldufour2624
    @aldufour2624 11 місяців тому +9

    J'ai examen d'introduction à l'IA demain matin, je viens de te regarder expliquer toutes les étapes de reinforcement learning et les illustrer en faisant du TM, c'est parfait. Merci, je comprends et visualise beaucoup mieux cette technique d'apprentissage et ça permet de se rendre compte de la beauté de cette méthode

  • @RacetasClub
    @RacetasClub Рік тому +864

    What a magnificent video and what an incredible journey. This got me excited all over again. You sir took quality to a whole new level, you & the AI should both be very proud :)

    • @LavaCreeperPeople
      @LavaCreeperPeople Рік тому +4

      incredible journey

    • @yoshtm
      @yoshtm  Рік тому +18

      Thanks Racetas!! I remember you played one of the maps (level 2) last year, I hope you will try again, I just posted all maps on tmx ;)

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

      oh y I remember, definitely viewed it as beatable but painful to a degree hehe, although now clearly... not so easy. The last one now seems very beatable as mentioned but as for the first two... hats off, I don't see anyone beating it anytime soon@@yoshtm

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

      ​@@yoshtmAre you familiar with the "micromouse" competitions where they train a mini computerised car to zip through a maze. Could the algorithms there be benefit this project?

  • @apocalypselemon2209
    @apocalypselemon2209 Рік тому +494

    I absolutely love the part where it becomes the drift king for optimal rewards. Just styling by doing micro drifts constantly.

    • @TheTorbjoern
      @TheTorbjoern Рік тому +44

      Car was presented with a carrot and it went "bet"
      I honestly laughed out loud when it did it

    • @Sagerz
      @Sagerz Рік тому +6

      Suddenly started playing Mario kart xD

  • @plebiain
    @plebiain Рік тому +1488

    I would unironically watch hours of you facing off against this AI on different maps to see what it does, please make more!

    • @Lee-One
      @Lee-One Рік тому +14

      Same, this production value is insane too, I would love to see more of ai in video games, it’s really fun to watch.

    • @saddlebag
      @saddlebag Рік тому +8

      Yeah, maybe with some tracks that change elevation and tilt.

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

      Please stop using the word 'unironically'.

    • @plebiain
      @plebiain Рік тому +14

      @@ZeddisDead How about please stop policing other people's words :P

    • @佹
      @佹 Рік тому +4

      @@ZeddisDead why would someone need to stop using a word that is used by many?

  • @UnrivaledPiercer
    @UnrivaledPiercer 8 місяців тому +4

    This is fascinating... I loved how you taught the AI to drift and then once it learned how it kept doing it without the rewards applied to the action. It shows that it was still focused on the end goal but using skills it was taught when they would help it achieve a faster time. Really amazing to watch.

  • @johnbrooks6243
    @johnbrooks6243 Рік тому +536

    Watching your own creation grown and outperform you has such a paternal feeling its amazing.

    • @ewaldlatreider5127
      @ewaldlatreider5127 Рік тому +10

      Father of the AI uprising 😂

    • @BigBoycashh
      @BigBoycashh Рік тому +4

      i know right well your dad wouldnt feel that tho

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

      ...future generations of humans, if any, are fucked lol

    • @sav22rem22
      @sav22rem22 8 місяців тому +7

      @@BigBoycashhSounds like projection

  • @kevineina6454
    @kevineina6454 Рік тому +1393

    This project is still (I followed it for a long time) one of the most interesting projects of UA-cam. It is indeed fascinating what a smart guy with a laptop can do at home… I’m an engineer and passionate about gaming, I couldn’t even think of how to accomplish such thing. Congrats to the author! 👏🏻

  • @Ell355ar
    @Ell355ar Рік тому +1892

    Looking forward to seeing the AI take a shot at Deep Fear one day

    • @mifluffy5196
      @mifluffy5196 Рік тому +94

      Its crazy with enough practice really think it has a good shot of completing it. I mean with like a toonn practice

    • @inthefade
      @inthefade Рік тому +95

      @@mifluffy5196 The trick would be to run the simulations faster than real time on a server farm. I know it can be slowed (Riolu!) so I'm sure it can be sped up as well? It would be amazing to see where this could go.

    • @MrMeasaftw
      @MrMeasaftw Рік тому +122

      @@inthefade The true challenge would be the pathfinding. An untrained AI would take billions(if not many factors of 10 more than billions) of simulated years to figure out how to drive the map. So you would either have to start the ai with a reinforced path like Muddas run. Or have a godly pathfinding algorithm. Otherwise the AI would just start driving the wrong way.

    • @ChuckSploder
      @ChuckSploder Рік тому +3

      @@MrMeasaftw There's ways of doing it

    • @Ivan.Wright
      @Ivan.Wright Рік тому +8

      ​@@ChuckSploder My first thought was to structure the layers in a way to take location data. This way the network will respond differently depending on where it is in the map.

  • @shiftery2k
    @shiftery2k 11 місяців тому +6

    Seeing this project come to fruition after three years is incredible to me. I watched from the very beginning and thought it was amazing how you could teach an AI to be the human, and now that we actually get to see it put into play is amazing. Love your work so much, and I guarantee that it will only improve itself from here! I have tried to beat the AI myself and it really has progressed so much. I cant wait to see pro players actually holding a challenge to this AI after such a long dream. ❤

  • @wesb9546
    @wesb9546 Рік тому +84

    Your meticulous dedication pays so many dividends. Keep doing what you're doing, it's insanely entertaining and informative. I guarantee you're persuading millions to become programmers, AI experts, ect

  • @Spingus_Rongong_III
    @Spingus_Rongong_III Рік тому +419

    The sheer work and talent this must have taken is insane. Good job, and congratulations!

  • @brigbrizz
    @brigbrizz Рік тому +566

    This was so much fun to watch! Thank you for putting it together, and posting it for us to enjoy!

  • @refragerator
    @refragerator Місяць тому +2

    Well done with this video, dude! So much work must've gone in and you present it so nice and calmly and... Dunno. I haven't played TM for a decade but what a fun watch!

  • @rafaelnubile
    @rafaelnubile Рік тому +2811

    Now we want a race between programmers to see who makes the fastest AI!

    • @zalmarzalmar3835
      @zalmarzalmar3835 11 місяців тому +61

      You mean between AIs who makes fastest AI?😂

    • @SumGuyLovesVideos
      @SumGuyLovesVideos 11 місяців тому +34

      there's several different robotics competitions that do this :D

    • @KekoBit
      @KekoBit 11 місяців тому +12

      @@zalmarzalmar3835 I think he meant a general purpose AI which makes programming AIs that produce advanced driving AIs :)

    • @vladimirslavik5230
      @vladimirslavik5230 11 місяців тому +7

      It would be cool on real tracks with real cars.

    • @vsoriginalpoetry6696
      @vsoriginalpoetry6696 11 місяців тому +3

      Should we put people in them?

  • @hockypockies
    @hockypockies Рік тому +216

    i'm glad you're back man
    this is genuinely so impressive

  • @svk_zoltan
    @svk_zoltan Рік тому +502

    Cant even imagine how painful and time consuming it must have been to create this amazing video. Crazy good stuff!

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

      And imagine how long it must've taken to create the AI

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

    This is easily one of my most favourite videos on the entire UA-cam. The topic, the storytelling, the editing, everything is awesome. Well done!

  • @holyyoghurtman1952
    @holyyoghurtman1952 Рік тому +514

    Shoutout to the one iteration of the AI that managed to fuck up so spectacularly it went over the railings at 2:33

  • @lenovoleader
    @lenovoleader Рік тому +1413

    this the channels that really need to be awarded for the amount of hard work put in

    • @arcanum3882
      @arcanum3882 Рік тому +2

      It’s called views

    • @azultarmizi
      @azultarmizi Рік тому +15

      how the hell does this channel below 100k subs with this level of dedication, nice editing, and beautiful data display? This feels like 1M subs kinda level

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

      mainly due to its a game that has had a total of about 10million players over the last 20years , and not a major title like CSGO etc. . and about 36% of those have seen this video ! @@azultarmizi

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

      Three years of struggle

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

      AI edited it

  • @adkh2112
    @adkh2112 Рік тому +366

    As a an AI engineer who played lots of trackmania growing up i thoroughly enjoyed this video. Great editting too and great to follow your journey and thought process!

  • @vishweshpanda2807
    @vishweshpanda2807 3 місяці тому +1

    The video production is just best. Appreciate the amount of work you have put over the years.

  • @benslater4997
    @benslater4997 Рік тому +660

    16:19 I love how the Ai found a way to abuse the crap out of the reward system 😂

    • @useless8695
      @useless8695 Рік тому +41

      it got too smart we gotta disable the breaks again

    • @rushi7312
      @rushi7312 Рік тому +53

      it was to be expected. When you ask an algorithm to find the best way, it always will according to its capabilities and limitations. Not limitations = problems^^

    • @benknoodling3683
      @benknoodling3683 Рік тому +42

      It's how humans approach problems too. Like in teaching jobs that incentivize pass rate over anything else, teachers will prioritize passing students over making sure they actually understand the material.

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

      Same with support centers. You award the agents on number of tickets closed, you will get tons of closed tickets, but the quality will suffer. @@benknoodling3683

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

      so true XD

  • @Olodus
    @Olodus Рік тому +101

    Really interesting approach to have the AI train with a "wrong" reward for a while to overcome a local maxima hard to find ways out of otherwise. That feels like it has some really good parallels to human learning, where a good teacher can help you immensely in how quick you learn something new. Or how athletes sometimes train using special limitations or disadvantages to improve their ability in specific cases in their sport - all to be better when they go into a normal competition. Awesome video.

    • @Kyrazlan
      @Kyrazlan Рік тому +2

      Same principle in life. You can learn from mistakes and failures and take away positives from them. A full technique may not work but partial techniques can be applied in certain situations.
      It's the foundation of bruce lee's martial arts. Learn as much as you can, use what works best. There's not really any downsides on iteration.

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

      There are many cool approaches to fix local maxima problems, usually inspired by real life processes. For example one method is inspired by how a heated metal cools down and the excitation of the particles, the algorithm has a large chance of picking a random option instead of trained one and that chance decreases logarithmically as time goes on, to not get stuck at first but expecting to settle as time goes on

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

      it's precisely the définition of training

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

      Simulated Annealing yes but that is a very basic algorithm. @@xXErr4rXx

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

      Yeah, it's basically what we do when we practise a specific skill that doesn't grant satisfying results on its own, but will help improve the bigger work.

  • @apocryphgaming9995
    @apocryphgaming9995 Рік тому +55

    The AI journey feels like a lesson in consistency. It was kicking your ass even without the brakes, and that was purely through being so thoroughly consistent in the corners. The final version with the neo-drifting was even drifting much cleaner than you were, too. It was a joy to watch.

  • @rplgrime8006
    @rplgrime8006 4 місяці тому +1

    This is absolutely fascinating. Well done, sir. We thank you for your 3 years of service!

  • @fffaaa8371
    @fffaaa8371 Рік тому +92

    definitely subscribing. Ive seen a few of your other videos but i figured training the ai was going to be a one off thing but the fact you plan on teaching it more (hopefully a lot more) is super exciting. Ill be counting the days :)

  • @halliwedge
    @halliwedge Рік тому +97

    The fact that on the endurance, the AI clipped the back wheels to turn sharper is very cool.

  • @stevenwolfe591
    @stevenwolfe591 Рік тому +65

    Color shading the cars and the training progress bar is a really nice edit! It's not always exciting to see an AI drive badly, but watching the yellow to green is pretty great anticipation.

  • @gurur4406
    @gurur4406 11 місяців тому +3

    The editing and the video is very nice man thanks

  • @primescoreredstonetutorials
    @primescoreredstonetutorials Рік тому +125

    The editing is amazing and I LOVE the animation renders to show the ai's many attempts

  • @Kram1032
    @Kram1032 Рік тому +202

    To make it more robust, it could be interesting to add a variety of extra conditions:
    - you are already spawning in random spots but you can also spawn in random states, i.e. in different orientations and speeds, possibly including upside down so it has to learn to turtle and recover (where that is possible)
    - in addition to the lateral motion reward, you can try somewhat randomized state rewards (reach weird parts of the state space)
    - or even exploration rewards (you can basically do a coarse histogram of all possible internal states and then reward it for even coverage of that histogram. Rather than as fast as possible, it should be driving in a way that finds as many states as possible while still finishing the map.)
    - or action constraints (disable breaking from time to time. Disable *forward* from time to time so it has to learn to deal with backward driving. Maybe occasionally even disable left or right. It's also possible to do "sticky actions" where you just randomly make it commit to an action for a few frames rather than being able to change the action every frame)
    - or senses (disable some of its inputs either by zeroing them out or by sending random noise through them)
    - or road conditions (you already mentioned those so I'm guessing your next video is gonna tackle that)
    - or physics (you also mentioned this as well)
    People have also experimented with a very weird robustness strategy where you basically add spurious inputs (they just get noise as input) but then *shuffle around which input corresponds to which value* so the AI has to learn to spot patterns in the inputs to figure out what those inputs likely mean before actually acting upon them.
    All of these together, or even just a solid subset, should make for a really robust and multitalented AI that can theoretically achieve just about anything that can be achieved in the game. Like, in terms of finding the state. Not necessarily yet in terms of beating world records. And then, once you have that, you just finetune that basic broadly capable AI without any of these constraints on any map you like. It'd basically be what you did with the drifting here but training it towards much broader capabilities as a starting point.

    • @Amelia_Scp_and_Halo_fan
      @Amelia_Scp_and_Halo_fan Рік тому +4

      good idea

    • @owendeheer5893
      @owendeheer5893 Рік тому +2

      Can you explain the spurious inputs strategy further please?

    • @Kram1032
      @Kram1032 Рік тому +18

      ​@@owendeheer5893 So I don't remember what particular network style they chose for this. I think it was a recurrent neural network? But anyways, the basic idea is pretty simple:
      In addition to all the inputs that already are there, you add a bunch more. (Say, three more neurons or whatever)
      Those extra inputs simply get fed random noise, so they aren't going to be meaningful to the training what so ever.
      But the twist is, that you then ever so often (after, say, a second) *randomly swap the order* of those inputs so the layer after doesn't know for sure which input is which. It has to figure that out based on the received signals.
      That way it learns not only to relate input patterns to output actions, but necessarily also what typical input patterns look like. It has to work way harder and "pay way more attention" if you will, to still get a meaningful result.
      IIRC the idea was, that you can use this to make it possible to extend the network after training. Like, instead of noisy inputs, you can then add additional actually meaningful ones, and there is a chance the network manages to generalize over those additional inputs.
      To be clear, I don't actually think that particular augmentation would be useful here. Most likely, it *could* be, but it would require a larger network just to allow for the overhead of internally swapping around the data to be routed correctly. IMO the most powerful ones I mentioned are likely to be the road conditions and physics tweaks alongside the histogram over state space (that's somewhat related to Map Elites, although that's an evolutionary algorithm so not quite the same. I think there is a variation of that which is meant to work in this setting though. Differential Map Elites or something?)
      Simply increasing diversity (i.e. training over multiple maps at the same time) is also likely to give rise to gains, especially paired with a curriculum so easier maps are experienced earlier and more challenging ones later. (Very challenging maps initially will only cause a lot of noise slowing progress even on easier maps, until the AI acquires some basic skills. Definitely don't train it on Kacky maps right away lol)

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

      ​@@Kram1032 "But the twist is, that you then ever so often (after, say, a second) randomly swap the order of those inputs so the layer after doesn't know for sure which input is which. It has to figure that out based on the received signals.": This sounds like an attempt to force location invariance (it doesn't matter where the signal comes from just the relative strength between the signals as a whole). Which seems only usefull in cases where you want the network to learn statistical things, or you want to force the network to encode information in certain "interesting" ways.

    • @Kram1032
      @Kram1032 Рік тому +2

      @@someonespotatohmm9513 yeah, as said, I don't think it'd be particularly useful here. I just thought it's a fascinating idea.

  • @MazyHadz
    @MazyHadz Рік тому +289

    it's so fascinating to see people with such skill and passion do something like that

  • @Simply_Insane_
    @Simply_Insane_ 11 місяців тому +1

    Impressive.
    I'd be interested in the feeling you had when you finished this video and uploaded it. After so much time, tries and struggle.
    Congratulations.
    You did awesome!

  • @imjody
    @imjody Рік тому +161

    Absolutely incredible story telling, topic and editing, Yosh!!! 🔥

  • @theF_Zone
    @theF_Zone Рік тому +71

    i have been waiting for this video for a year now and i must say im more then surprised by how good it is! Incredible editing, voice over and content!!

  • @L4Bomb4
    @L4Bomb4 Рік тому +301

    I hope this goes viral hard!

    • @ecks0n
      @ecks0n Рік тому +2

      labonba

    • @Blue-vd1pb
      @Blue-vd1pb Рік тому +1

      real

    • @yoshtm
      @yoshtm  Рік тому +6

      Hey thanks Labomba! I've always been very inspired by the Trackmania k-projects of a few years ago, to make these videos. I've watched the one on your channel several times so I'm glad you saw this video ;)

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

      ​@@yoshtmHope we finish the 100k this century haha

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

      @@L4Bomb4 Can't wait to see that!!

  • @tedzzgamerofc
    @tedzzgamerofc Місяць тому +5

    I feel so sad about that one who fell off at 9:01

  • @JeffreyBoles
    @JeffreyBoles Рік тому +257

    This is the third Trackmania documentary I've watched on UA-cam. I have never played Trackmania. I do not play racing games at all. Yet these docs are incredible!

    • @RobMedellin
      @RobMedellin 4 місяці тому +5

      I also haven't ever played but have watched like 6 or 7 videos that are over 20 mins long. It's fascinating.

  • @Arcalynt
    @Arcalynt Рік тому +102

    This editing has addiction potential and Your work might change trackmania forever.
    Round. Of. Applause!

  • @Emile50
    @Emile50 Рік тому +551

    I hope Wirtual does a followup. Would also be fun if the devs release an AI medal on each map

    • @goldenwarrior1186
      @goldenwarrior1186 Рік тому +23

      Wirtual should talk about how huge the implications are in speedrunning. It could be used as a new cheating method that could potentially be harder to detect than TASes if it gets advanced enough (actually now that I think about it its tells are probs similar if not the same as TASes’ tells)

    • @Falcodrin
      @Falcodrin Рік тому +12

      ​@@goldenwarrior1186antagonist AIs can be trained that detect a certain probability of it being AI driven. Kinda similar to all the online apps that tell you if a photo is AI generated. I think those need the training model though to work right.

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

      Since you reminded him, now I'm sure that for now AI couldn't beat speedrunners, because they used so many complex tricks, like a bug jump from a nose, etc. To make AI even learn that this is not a mistake, but a feature would be very hard.

    • @codexed-i
      @codexed-i Рік тому

      @@XCanG About this, if you want the AIs to do anything, you give them some reward, then, save the ones with a higher reward and scrap the others.

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

      @@XCanG true but not many maps can make use of those "features" I don't think

  • @MarisaLindsay
    @MarisaLindsay 3 місяці тому +1

    THX FOR ALL THE DETERMINATION OVER 3.. WHOLE.. YEARS to make this video

  • @SuperNexus14
    @SuperNexus14 Рік тому +32

    At the end of the AI training, it always seems like you just did a few logical changes and then it worked. Coming up with these logical changes is the really hard part. Great work!

  • @KJMTurbo
    @KJMTurbo Рік тому +160

    Seeing the AI plan it’s most efficient routes was like watching a fluid dynamics simulation, in fact it probably literally is a more accurate representation of such than a lot of CGI engines can perform or “animate”.

  • @smirnov-robotics
    @smirnov-robotics Рік тому +145

    Amazing description of how complicated, difficult and challenging is to be an AI engineer. Appreciate that you shared all ups and downs (especially) of such journey. Complicated things take years to be made, but in the end it pays off.

  • @1by110
    @1by110 8 місяців тому +1

    hooked till the end. Amazing work explanation and visuals man

  • @Hacks-rx2jc
    @Hacks-rx2jc Рік тому +510

    This is the spirit of coding, and CS in general. Trying new things that you aren't certain about. Learning by doing. Thank you for putting in over 3 years to make this masterpiece.
    BTW can we -steal- *borrow* the training data pls?

    • @sahajramachandran348
      @sahajramachandran348 Рік тому +9

      You could say he did a bit of reinforcement learning himself

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

      Good catch!@@sahajramachandran348

  • @yayer_27
    @yayer_27 Рік тому +113

    This is fantastic! The editing, effort, and time put into this are amazing. Congratulations.

  • @kootenpv
    @kootenpv Рік тому +592

    The main problem with the final test is that this part of the map was still contained in the training data, and for that it means it likely doesn't generalize and instead was over fit at least slightly

    • @falinoluiz5962
      @falinoluiz5962 Рік тому +69

      Slightly? Bro the whole thing is overfit lmao

    • @jolemackerel
      @jolemackerel Рік тому +86

      It doesn't seem like a problem, just a known constraint on this solution.
      Technically speaking: say the AI trains thousands of times on each track in existence. It has the capacity to store track-specific data and total, general experience training data. Would it be over fit or appropriately generalized for its purpose?
      Philosophically, is it that much different than a human player with "favorite" tracks, ones that gave the brain the best feelings to repeat and learn?

    • @jsanchez23
      @jsanchez23 11 місяців тому +41

      Pretty sure that wasn't the point of the final test, as proving generalized success was already determined to be a much harder task. The final test appears solely to prove if the ai truly was driving/performing faster than him or if it was just its consistency giving it an edge due to all the human errors and mistakes a person would make in such a long track.
      So the final test was realistically just meant to be the exact same test as the full map, but with the potential variable being changed being himself as the player. As it seemed more likely a scenario to further "perfect" or at least minimize as many mistakes from their own times on a smaller snippet of map..
      Which wasn't exactly a viable option to avoid so many mistakes on such a long track, with many opportunities for mistakes. Which is also likely why he mentioned that there are surely far better players that could beat the ai on the final smaller track snippet, but he had doubts they could beat the ai on the full size track. As on a track that long any human is bound to slip up and make mistakes with that longer frame to go so far without any mistakes, giving the ai a chance to catch up.
      While still possible, it would take a lot more practice and luck.
      So the task of further generalizing and making the ai successful on any track, is a task and test he hasn't actually truly delved into and realized was fully beyond the scope of this video and will likely be tackled in the future.
      So the final test really did just serve to further demonstrate the ais biggest advantage was consistency and before training it to drift, it wasn't actually driving faster or "better" at all, it just wasn't making the countless human error based mistakes that a player would. Since once transferring to the snippet map and practicing out as many mistakes as he could, it began to close the gap and was being outpaced/raced by him.
      Then the drift training proved to again close the gap towards actually driving more effectively, but still appears could be outpaced if a player was able to pull off their best version of a perfect or no mistake run.
      Since like in speedrunning, its easy to have an incredibly skilled player that is well practiced and capable of playing the game quite well, but runners will often have countless attempts, given the numerous frame perfect or otherwise precise moves needed and they have to make all of these numerous separate and precise moves all in the same run. So if you have an ai that can flawlessly and consistently pull of those specific frame perfect moves every time, you could say the ai is faster, but the speedrunner is still likely playing the game as a whole better and the gameplay between those moves is likely faster and better performed, but its easier to make those individual move based mistakes and if they were removed from the equation, the player would likely be faster than the ai with their overall gameplay.
      So the final test was just trying to remove that same mistake based advantage to the best of their ability, in hopes of improving overall fitness/skill over mere consistency.

    • @falinoluiz5962
      @falinoluiz5962 11 місяців тому +7

      @@jsanchez23 thanks bro gonna use this for my machine learning class essay

    • @jsanchez23
      @jsanchez23 11 місяців тому +2

      @@falinoluiz5962 Not sure if sincere or bait, as I do realize how long in the tooth it all was and I'm not sure if i really said anything of merit. If you are being sincere thats cool, if not, I get it.

  • @hipotenus6154
    @hipotenus6154 9 місяців тому +1

    amazing video, amazing editing

  • @astrovation3281
    @astrovation3281 Рік тому +199

    The drifting in particular was very smart, and not something I could've quickly thought of. Please make more, you're a great informative story teller.

  • @MrKyle700
    @MrKyle700 Рік тому +21

    I loved how you show exactly what a real, practical use of machine learning ai looks like and the pitfalls associated. the journey was very interesting. great video

  • @Just_Terrance
    @Just_Terrance 11 місяців тому +24

    your editing skills are outta this world man, what a fun experience this has been. Thank you for this video!

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

    I love how you depicted machine learning in this video. A lot of people think AI is this all powerful tool that as long as it has data it can do anything. I like how you demonstrated that AI is more like a baby and that you really need to hold it’s hand every step of the way to make it effective.

  • @ghostinng274
    @ghostinng274 Рік тому +111

    Seeing every single attempt made by the AI is so satisfying. And its all color coded too. I love it. Its also really cool watching it slowly understand exactly what its doing.

  • @anesthetized7053
    @anesthetized7053 Рік тому +33

    this is one of my favorite deep cut series on youtube. really impressive work

  • @jcorey333
    @jcorey333 Рік тому +174

    I like the color coding!
    Also, I think your idea to give it a specific reward for a certain skill, then taking that away once it mastered the skill, is really genius! Did you get that from a paper? It definitely belongs in one. Kudos to you!

    • @MorzakEV
      @MorzakEV Рік тому +10

      Yeah, I guess that’s like when humans break learning down in to specific skills for a period of time before putting it all together again later.

    • @TheShazMC22
      @TheShazMC22 Рік тому +13

      It’s like positive reinforcement when teaching children or a dog. You reward it for doing the right thing until it does it naturally. Pretty cool

  • @shashwatpranav2313
    @shashwatpranav2313 5 місяців тому +2

    That's why I like UA-cam, this video was just amazing, and Kudos to you for putting such an effort

  • @Nicodax84
    @Nicodax84 Рік тому +56

    Really insightful video ! What a comeback from the AI 😮

  • @InTehFace1
    @InTehFace1 Рік тому +44

    Really great work, and guys like you are going to be talked about in 10 years as the pioneers of training AI in various applications. Very inspiring

  • @LetsbeHonestOfficial
    @LetsbeHonestOfficial 11 місяців тому +254

    For the AI to be able to reintroduce its new isolated drift skill to its arsenal after the reward was removed is so cool to me. I feel like that is such a massive way to teach AI new skills. Doesn't that imply that you could isolate a thousand different skills, and then have the AI incorporate it all into something massive?

    • @haydentravis3348
      @haydentravis3348 11 місяців тому +33

      That is in fact how we learn. What I find interesting is we seem to be mapping out the process of learning in general, by having to create it from scratch with AI. Videos like this have taught me how to teach myself new skills, though creating a reward for random things is still not easy.

    • @LunarMoonPhase
      @LunarMoonPhase 6 місяців тому +2

      I really find things like these impressive and very Interesting how ai works when learning😊

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

      ❤❤😊❤😊😊🎉😊🎉🎉🎉🎉
      ❤Truly truly i say to you all Jesus is the only one who can save you from eternal death. If you just put all your trust in Him, you will find eternal life. But, you may be ashamed by the World as He was. But don't worry, because the Kingdom of Heaven is at hand, and it's up to you to choose this world or That / Heaven or Hell.
      I say these things for it is written:
      "Go therefore and make disciples of all nations, baptizing them in the name of the Father and of the Son and of the Holy Spirit, *teaching them* to observe all that I have commanded you; and behold, I am with you always, even to the end of seasonal". Amen."
      -Jesus
      -Matthew 28:19-20

  • @MalrusOSC
    @MalrusOSC День тому

    These are the ultimate UA-cam videos. Secretly educating you in some way disguised under a very entertaining video.

  • @nonso8647
    @nonso8647 Рік тому +37

    I loved everything about this. The story telling, the pace, the visualization, the editing, AI. Absolutely brilliant video. Keep up the good work

  • @archangel1730
    @archangel1730 Рік тому +49

    Excellente vidéo ! Ça fait plaisir de voir quelqu'un de passionné qui fait en plus un gros effort sur la forme ❤

  • @SimoneBigozzi1998
    @SimoneBigozzi1998 Рік тому +13

    I have been waiting 3 years for your update on jumps and generalized maps, I will be there in another 5 years.
    Congratulations on your great work, this is something I also tried to do in 2017, without any prior ML knowledge. I failed and abandoned the project, it's very hard to accept failures like you did in these 3 years, but the rewards are awesome!

  • @Rxspcttt
    @Rxspcttt 14 днів тому

    this is probably top 5 videos ive ever seen. ive never been so interested in something while watching. gg's dude

  • @dr.skillz77mgpl92
    @dr.skillz77mgpl92 Рік тому +10

    Very good video quality, very well explained,
    calm voice, insane skill, legendary editing, and high intelligence from this channel.
    One of the most qualitative videos on UA-cam, it really feels like you put A LOT of effort into this

  • @blackhole927
    @blackhole927 Рік тому +21

    As a non-trackmania player who’s been keeping an eye on this series over the past few years, it’s amazing to see the AI drive so well! Amazing work!

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

      same yeah trackmania seems cool but I've never played it much. I was super happy to see the ai was able to beat them after all these years tho!

  • @pr0hobo
    @pr0hobo Рік тому +305

    I cant wait to see generalization. I hope we can see a full ai playthrough of tmnf at some point if this keeps going.

    • @Pandize
      @Pandize Рік тому +13

      Yes. Beyond million view title.

    • @whirled_peas
      @whirled_peas Рік тому +5

      Just hope it doesn’t generalise too much or it will push us humans off the planet

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

      There's a streamer on twitch that already does this with the Name: PedroAITM

    • @timbraska6750
      @timbraska6750 Рік тому +15

      I don't know how well this approach works in terms of generalization. I have serious doubts on it working on any maps that are designed different from the twisty horizontal characteristics of his current test maps. And if he manages to get them working on different maps it will become much slower on the current ones.

    • @BigDBrian
      @BigDBrian Рік тому +13

      @@timbraska6750 I think for the AI to drive well on a variety of maps there needs to be some solid foundation to start off with, then some training on individual maps. This is also fair to human play since we play maps over and over to learn them specifically, while having a lot of experience in general to back that up.

  • @Mcali1984
    @Mcali1984 10 місяців тому +2

    This video must be seen by all. Just so people can get an idea of how AI works through trail and error. How much we can be at a disadvantage against AI. This video is insane. One of my faves of 2023.

    • @KallePihlajasaari
      @KallePihlajasaari 10 місяців тому

      Hmm, did you see an early release last year? :-)

    • @Calamity5
      @Calamity5 10 місяців тому

      oh its cool now, just wait till cute trackmania ai grows up and is chasing you around those corners IRL

  • @bredgefox1599
    @bredgefox1599 Рік тому +174

    Félicitations pour tout ce travail accompli. Je suis persuadé que si tu continue en cette voie tu finira par obtenir une IA performante sur n’importe quel type de map. Qui peut-être même que ça finirais par attirer l’attention de Nadeo ;)

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

      Un Français sur une vidéos américaine ? Étonnant !

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

      Qui est Nadeo ?

    • @lzjzj3jke90
      @lzjzj3jke90 Рік тому +7

      c'est parce que yosh est français

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

      Ah je savais pas@@lzjzj3jke90

    • @adbroussillon
      @adbroussillon Рік тому +9

      @@Ciboullete vu l'accent c'est un gars de chez nous

  • @chaseconnor1959
    @chaseconnor1959 Рік тому +65

    One of the best UA-cam videos I’ve ever watched. The time and effort this took is commendable to say the least

  • @younglife88
    @younglife88 Рік тому +11

    i don't know how I ran into this, but amazing way to showcase AI, how it works and a very passionate player going the 'extra-mile' to make things they love, even better. true mastery of a subject. well done!

  • @Doronoss
    @Doronoss 11 днів тому +1

    From my knowledge the input to the NN isn't nodes with "Distance to centerline" or "Next Curve Distance" it should be the pixels on the screen, the AI then take this input and extract the feature in a latent layer (if they are relevant) and the output of the AI is the input to the car controller (gas, breaks, steer left or steer right). The idea behind it is that some figures might not be reachable by the agent (if you want to make a fair agent that plays "as" a human), and some of the figures might not even be relevant to the agent.
    The actual input to these reinforcement learning is the pixels on the screen, from those the AI "learns" what works best in these situation, and then generalize it to "situation that looks like this" so if the AI sees pixels that look like a curve is ahead, it would learn to slow down if that feature (curve ahead) is relevant to its performance.
    About the AI "loves crashing into walls" you should define a new reward function to maximize, look at say 2 minutes period, make it max distance (on track) from start, and don't even look at "race finish" at all, so for example if a race should take 3 minutes if played perfectly, each training session would be 2 minutes and the best score would be the one that reached the furthest (that's how I'd train agent for a racing game).
    About the generalization, the "pixels as input" approach would be much better because like NN can be train to recognize things, it can recognize map's curvature, it's own orientation, and things that u wouldn't even think about adding as data, things that you wouldn't even think relevant. Also, a minimap is included so if it "decides" during training that the minimap data is relevant it will get the data as a feature in a latent layer. Also, pixels as input approach can be a general AI to any game, the only thing that you would change is the reward function to maximize.

  • @Known_as_The_Ghost
    @Known_as_The_Ghost Рік тому +7

    9:44 This editing was sick.
    10/10

  • @Etobio
    @Etobio Рік тому +5

    I’ve been following this saga since the beginning and I couldn’t be happier with the conclusion! I can’t believe I haven’t subbed until now, keep up the awesome work! 🎉

  • @2e4sY4U
    @2e4sY4U Рік тому +129

    Je sais pas comment t'as fait ce montage avec tous les différents passages de l'IA et leur dégradé de couleur...je salue la représentation que tu as donné du programme, c'est très graphique et ça permet de visualiser l'intérieur du programme. Très inspirant. Merci

    • @cdv_974fpsb3
      @cdv_974fpsb3 Рік тому +8

      il est francais non ??

    • @lommoez
      @lommoez Рік тому +13

      ​@@cdv_974fpsb3à l'accent on dirait

    • @jeangradel1159
      @jeangradel1159 Рік тому +4

      Il utilise aussi le drapeau français sur sa voiture

    • @INPUR3IFY
      @INPUR3IFY Рік тому +2

      The cars might represent colour based on how many reward points they acheive on average.

    • @coxykran7202
      @coxykran7202 Рік тому +4

      @@cdv_974fpsb3 il a un très bon anglais et un très bon accent mais on reconnait les touches de français 😁

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

    It’s really impressive how patiently you’ve tried to train the DRL agent at the highest level. Please make more videos about how you systematize your workouts.

  • @patriceducharme1144
    @patriceducharme1144 Рік тому +112

    Bravo pour ta détermination ! Quelle aventure. La narration et le montage sont dignes des plus grands. Encore une fois bravo pour ta persévérance. Ne lâche rien et les résultats viendront d'eux même !

  • @jonifed3676
    @jonifed3676 11 місяців тому +13

    This video was shown in the latest linus tech tips video about the LG Wing. Congrats dude

  • @metropolis10
    @metropolis10 Рік тому +10

    What an amazing effort, I was most blown away by the presentation and editing! Well done.

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

    Halfway through I just want to say I am thoroughly enjoying the quality of the video itself. Master fully made.

  • @petertorok7341
    @petertorok7341 Рік тому +8

    I am studying in the fields of deep learning, neural networks and this was one of the most well put together and well explained video I have ever seen. Incredible graphs, and explanation. Thank you

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

      How is this not just trying all options with mass computation? I don't think there's anything that can be considered AI.

  • @RickVegasGames
    @RickVegasGames Рік тому +7

    That’s incredible, it’s like watching your student grow and it’s at the point where it finally surpassed you.

  • @MrRubikraft
    @MrRubikraft Рік тому +85

    Chouette projet, bravo !

  • @chrissugg968
    @chrissugg968 5 місяців тому +1

    One area I can see this AI being really useful is looking at where you yourself can be faster. In the final part where you show it head-to-head with your own best run, there are a few places where it suddenly leaps ahead of you by several tenths of a second in a single corner. Analysing exactly what it does there could show you how you can avoid losing those 10ths yourself.

    • @sberc1
      @sberc1 5 місяців тому +1

      That is true. This is exactly how AI is being used to advance the top levels of competitive chess and go.

  • @GuillermoAa
    @GuillermoAa Рік тому +5

    Both the animations and the ideas are so beautiful and well exectuted, it managed to surprise me even after watching many ai-mastering-games-videos. Good job!

  • @remiblaise
    @remiblaise Рік тому +16

    Ça me donne des frissons... ça me rappelle mon projet de recherche de prépa, j'avais entraîné une IA à jouer à Mario Bros grâce à la théorie de l'évolution ! Des heures passionnantes...

  • @MitchsMisadventures
    @MitchsMisadventures Рік тому +6

    Absolutely amazing story telling! I loved the use of color to easily demonstrate progression. One of my favorite aspects about this video is that you actually used your AI on multiple tracks and introduced generalization. I feel like too often people will train an AI to only be good at one specific task while ignoring other scenarios. This is one of the few videos in which you're actually training your AI and having it *learn* how to do something instead of just having it memorize one set of instructions. Memorizing ≠ Learning and you did an *amazing* job having your AI learn. Kudos!

  • @chadmetcalf2876
    @chadmetcalf2876 10 місяців тому +1

    Amazing work man I cant wait to see the next installment

  • @faltice1314
    @faltice1314 Рік тому +103

    Je ne joue pas à Trackmania, mais le travail que tu as présenté est monstrueux. Félicitations

    • @fridaycaliforniaa236
      @fridaycaliforniaa236 Рік тому +2

      Idem =)

    • @cewla3348
      @cewla3348 Рік тому +9

      as a french beginner, i understood this (except for monstreux and félicitations) so im proud now

    • @vodcrach8479
      @vodcrach8479 Рік тому +4

      Un jolie accent français en plus de ça mdr

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

      félicitation = congratulations et monstrueux is like huge@@cewla3348

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

      @@cewla3348félicitations=congratulations monstrueux=monstruous but it means incredible

  • @hikushii3233
    @hikushii3233 Рік тому +12

    Dude!
    I'm so happy to see You back!
    I love your content and i can't wait to see AI trying campaign maps haha

  • @greenstonegecko
    @greenstonegecko Рік тому +8

    beautiful video! really combining both of my biggest interests: games and doing overly complicated stuff with computers

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

    I literally had my jaw on the floor when I saw it learn the neodrift. What a seriously impressive achievement you've done with this AI - well done