AI beats multiple World Records in Trackmania

2024 ж. 12 Нау.
2 522 422 Рет қаралды

I trained an AI in Trackmania with reinforcement learning, and made it compete against human World Records on 3 different pipe tracks.
Between research, programming and editing, these videos take a long time to produce. Any support on Patreon will help me to spend more time on that in the future :)
• Patreon : / yoshtm
Contact
• Discord: yosh_tm
• Twitter: yoshtm1
• Mail: yoshtm.yt@gmail.com
The maps shown in this video can be downloaded on TMX and played in Trackmania Nations Forever:
• 1) One Hella Long Pipe (It requires TMUnlimiter !) - tmnf.exchange/trackshow/8484272
• 2) Calm Down - tmnf.exchange/trackshow/1293088
• 3) Are You Serious ?! - tmnf.exchange/trackshow/5152869
Wirtual made a nice video about his world record on the track Calm Down, don’t hesitate to watch it : • How I Beat Trackmania'...
More generally, if you want to learn more about this game, check out his streams and videos, he makes fantastic content !
• twitch.tv/wirtual
• / @wirtual
You can find a list of the musics I used at the end of the video. Special thanks to Beik Poel for allowing me to use their song En aften ved svanefossen : • En aften ved svanefossen
Thanks to Donadigo, for TMInterface !
donadigo.com/tminterface/
All Trackmania Nations Forever tricks TIERLIST - Fliks.
• All Trackmania Nations...
Into The Breach vs. Karmine Corp | Semifinal 2 | World Championship 2023 - Trackmania World Tour
• Into The Breach vs. Ka...

Пікірлер
  • Thanks for watching! Some additional details not explained in the video, which might help to better understand the irregularities observed: - I didn't show all the AI inputs in the video to keep things simple. In reality it has access to more information, such as x,y,z velocity, velocity rates, roll-pitch-yaw rates, etc. But maybe it's still missing some crucial information, it's hard to know. - The irregularities observed are not due to hardware or framerate issues. All the things I'm showing in the video are made with a tool called TMinterface. This tool allows me to inject action commands into the game at precise timings, in a way that is 100% repeatable. The same sequence of action on the same map will aways lead to the same outcome, even on a different computer. It's completely deterministic. And it's used a lot for Tool Assisted Speedrun (TAS), you can find many examples of that on youtube. I have a bit of extra footage that I couldn't fit into this long video. I plan to post some of this extra content on my Patreon in the next weeks. Any support there is a great motivation to keep making these videos :) patreon.com/Yoshtm

    @yoshtm@yoshtm2 ай бұрын
    • Do you know if the inputs are completely deterministic independent to time? If you run the same set of inputs offset in time, will the result be identical?

      @andrewbrown2038@andrewbrown20382 ай бұрын
    • @@andrewbrown2038 If you are speaking of ingame time, it has an effect. Starting to accelerate at t=0.00s vs starting to accelerate at t=0.01s are two different inputs, which will have different outcomes, as shown in the video around 32:00. But it's still deterministic: starting to accelerate at t=0.01s will always have the same outcome in successive races.

      @yoshtm@yoshtm2 ай бұрын
    • Where to watch AI playing games i am sooooooooo boooooooooorrrrrrrrrreeeeeeeeeeeddddddddddd!!!!!!!! It plays in real time sometimes... Damn wish there was good AI to play with already :(

      @gofai274@gofai2742 ай бұрын
    • So from what I remember about neural networks, each neuron of a neural network takes the inputs as numbers multiplied by weights and passes them through a function to output another number to be taken as input once again. Now I don't know the specifics of your neural network such as what activation function you are using, but combining this with how your outputs of the network will affect the inputs after any amount of time, changing a specific input at any specific time, even slightly, would create a chain reaction that would get you your random variations after any period (usually 1 or 2 seconds) as seen at 18:44. Thus, the random variation is not necessarily a problem of incorrect inputs or anything but rather an aspect of neural networks. Perhaps I am misunderstanding some way, or maybe you had already answered this question, but I believe that is the cause of the random variation.

      @mattanderson5239@mattanderson52392 ай бұрын
    • @@mattanderson5239 a few seconds later, around 18:50, I show that even when I force all cars to use the exact same sequence of actions after the perturbation, the randomness is still there. Maybe the neural network is part of the problem, but according to this result, it can't be the only source of randomness

      @yoshtm@yoshtm2 ай бұрын
  • I came here to see AI destroy humans on Trackmania, but I got a 37 minute essay on how pipes in Trackmania are an exercise in chaos theory instead. 10/10

    @tylerlarsen1842@tylerlarsen18422 ай бұрын
    • While still seeing an AI smash the human WRs! I see it as a win-win scenario 😊

      @xenmaifirebringer552@xenmaifirebringer5522 ай бұрын
    • Dude took the most niche and least enjoyed playstyle ... to make a 10/10 documentary of his project. Easily best TM youtuber atm

      @wroomwroomboy123@wroomwroomboy1232 ай бұрын
    • thanks for the save

      @rank944@rank9442 ай бұрын
    • This is better than school 🤣

      @MaxwellCatAlphonk@MaxwellCatAlphonk2 ай бұрын
    • Metoo

      @peterluitze@peterluitze2 ай бұрын
  • So you’re saying my world record fails are actually the butterfly effect’s fault…

    @bettaTM@bettaTM2 ай бұрын
    • most certainly. it also means that all of thousands of times you failed were simply bad luck, and everyone to ever succeed at a world record simply got lucky, and this is not at all a skill issue

      @gabrielandradeferraz386@gabrielandradeferraz3862 ай бұрын
    • funny how there is some truth to the sarcasm@@gabrielandradeferraz386

      @shadowlord0162@shadowlord01622 ай бұрын
    • New coping mechanism just dropped

      @Vaaaaadim@Vaaaaadim2 ай бұрын
    • @@Vaaaaadim the most mecchy player. coping 100

      @winumoritribe8425@winumoritribe84252 ай бұрын
    • Or your successes...

      @_Ekaros@_Ekaros2 ай бұрын
  • The editing, the music choice, the compactness of the information while still remaining coherent, the pacing. This video is a masterpiece! Even small things like using the butterfly-shaped pinhole transition when bringing up that topic for the first-time, or how the hue of the cars match up with what generation they're from, so many little details that I could write up my own essay detailing every little thing you put extra effort into. I was enraptured the whole time. Bravo!

    @no-no-noku@no-no-nokuАй бұрын
    • i dont even play this game, this video is a masterpiece!

      @J3TL4GG@J3TL4GGАй бұрын
    • Your comment perfectly captures the things I noticed most. The continuous audio and visual cues where important concepts were being introduced and then the release of focus where it was ok to do so. This is just as interesting as the stuff I remained engaged enough to learn due to the editing and composition. A god damn MASTERCLASS!!!!

      @Xsiondu@Xsiondu26 күн бұрын
    • @@J3TL4GG neither do i yet i sat herre and watched the entire thing because it was just that entertaining!

      @dazeoliver@dazeoliver18 күн бұрын
    • @@dazeoliver this that perfect 3AM video to watch

      @J3TL4GG@J3TL4GG14 күн бұрын
  • I love your video style and how you're displaying the learning process. Thanks for the great video!

    @MinecraftSubi@MinecraftSubiАй бұрын
  • PhD Student in Deep RL here. The behavior at the end seems mathematically chaotic and might lead you to the conclusion that you cannot predict deterministically the behavior of the car. However, that does not mean you can't improve the performance by a long shot with a few simple tricks. You are doing model-free reinforcement learning, which basically means that you don't need to predict what is going to happen exactly (and extremely hard here), you just need to figure out what actions are the best in this situation. In most environments, this is actually much easier to do (and a reason why learning an accurate model is often harder than just straight up optimizing for performance with model-free). Second problem is that you are using an RL algorithm and RL assumes you are in a Markov Devision Process, ie that you have full observability of the world, ie that the probability of taking the next action ONLY depends on the current information that you have, and not the past, ie that adding information about the past does NOT help ou make better decisions. HOWEVER, you are NOT in an MDP (Markov Devision Process) here since you lack critical information about the state to take decision, as many pointed out. In practice, what you can do will most certainly improve performance: - either manually add all the missing info (speed, rotations, ...) - or more simply, create a concatenated vector of the previous N past states and inputs and use that as input to your NN (LSTM/RNN works too but is more complex and often not necessary when we are dealing with a few steps of history). - Use more layers (deeper network = more complex function can be learned by the network) - Sticky/random actions: introduce manually randomness in the action of the agent. For example repeat randomly the past action with a small probability. Do NOT decrease this probability with time. What this means is that the agent will have to learn the whole time in a now stochastic (ie random) environment and will have no choice but to cope with the inherent randomness that you added, making it largely more robust than an deterministic agent. This is a common flaw of fully deterministic agent in these kind of environment btw. - Look at extensions like Max Entropy RL (Soft Actor Critic for instance), where you both maximize reward and entropy of the policy. Some papers proved that it makes the learned policy more robust to out-Of-Distribution perturbations, ie perturbations that were never seen during training. In your case, this will help the agent lean "recovering behaviors" to recover from deviations caused by physics bugs/randomness/whatever. - Max Entropy RL will also help with exploration a lot, which might help the AI be more creative in finding solutions. - Look at other tricks that improve performance "for free". I don't know how much you implemented already, but a basic start is looking at Rainbow DQN, PPO.... But you are already using it probably..?

    @night0x453@night0x4532 ай бұрын
    • I am a PhD student myself but in Sexology and I have nothing to offer here.

      @raskreia8326@raskreia83262 ай бұрын
    • @night0x453 Hi do you have any course recommendations/ or youtube channel for beginners in ML/RL?

      @7dedlysins193@7dedlysins1932 ай бұрын
    • @@7dedlysins193 look at Sergey Levine course on Deep RL, it's one of the best out there to get started in deep RL/robot learning

      @night0x453@night0x4532 ай бұрын
    • lol@@raskreia8326

      @beingatliberty@beingatliberty2 ай бұрын
    • I'm not a PHD student in either sexology or Deep RL, but I can tell you that this wall of advice right here is sexy af.

      @FredDufresne@FredDufresne2 ай бұрын
  • Roboticist here. Some regions of configuration space are more chaotic than others; the demo you did where you perturbed a car that was about to fall off demonstrated a smooth increase in success rate as you moved the perturbation further away from the point at which outcomes diverged, suggesting that the failure was in a fairly narrow chaotic _region_ and moving out of that region made the system more stable and enabled more consistent success. This is what unnamed did to complete the jumps track: Found a strategy that consistently avoided highly-divergent regions of configuration space. One problem is that, if the display of the inputs is representative, the AI doesn't have the right sensors. Specifically, the AI has its position and speed but not its _velocity_; it doesn't know how much of its speedo reading is in each component of down the track vs. across the track vs. away from the track. More critically, it also doesn't have roll-pitch-yaw rates. It only knows its current orientation, not the rate at which its orientation is changing. I suspect that the car also needs to know the difference between a simple pipe elbow, a tee, and a cross. Even if the extra geometry isn't in the direction of its travel it'll almost certainly still interact. Finally, consider increasing the numerical precision of your network. This is one of those cases where running floats vs. doubles might actually matter.

    @sreynoldshaertle@sreynoldshaertle2 ай бұрын
    • Adding rate inputs, or more generally some memory of past frames (recurrent neural networks), should indeed improve the results. Unless Yosh is already using those and has just kept the narration simple. :)

      @granite_planet@granite_planet2 ай бұрын
    • I hadn't noticed that but that's a great point. If you think of the ai as trying to force configuration space into the few fast values where it doesn't fall off being able to actually see the full space can be a great help. Otherwise it becomes impossible to figure out the optimal action. Of course there might be performance and training concerns if you take it to the extreme but experimenting with adding more inputs could be a good way to see what improves consistancy.

      @solsystem1342@solsystem13422 ай бұрын
    • fully agree - the AI needs more information to make the right decision. And I don't think giving it all the information would solve all the problems. Because the game engine itself is just a simulation of real world physics. There also is a tick rate and some approximations/simplifications being done. Some things will be hardcoded like material coefficients for energy conservation during different types of bounces (side of the wheel against a wall is vastly different than bottom of the wheel to road/pipe surface you land on). Imo yosh needs a well trained model on the game engine itself. In a way that the AI is able to predict the result of each action it makes.

      @Bruellhusten123@Bruellhusten1232 ай бұрын
    • I think this is it. The inputs look like they are suited for a track with a 2D layout like in his last videos but these pipes need a better 3D understanding of angular momentum. The AI is doing the best it can with a blind spot in its vision.

      @asterpw@asterpw2 ай бұрын
    • In previous videos, Yosh explained he uses the last X frames in addition to the current frame as input, so I'd assume he's doing the same here. (At least I think Yosh does, it's hard to remember which AI video does what :E)

      @CouchPotator@CouchPotator2 ай бұрын
  • What an insanely good video! I haven't even played Trackmania in many years... but the way you explain the details and visualize everything just makes this soooo interesting! 😌👏👏👏

    @Hurricane6220@Hurricane6220Ай бұрын
  • That ending sequence was an absolute joy. Prefect syncing with the music

    @Arturius1987@Arturius1987Ай бұрын
  • The song that played when you showed Wirtual's WR was just peak video making lol

    @yuxufgVOD@yuxufgVOD2 ай бұрын
    • Haha I was looking for this comment 😂

      @bequerhernandez8487@bequerhernandez84872 ай бұрын
    • Time stamp?

      @jamport5973@jamport59732 ай бұрын
    • @@jamport59739:00

      @1BenPro@1BenPro2 ай бұрын
    • 9:03? you probably already seen it@@jamport5973

      @skydemon3423@skydemon34232 ай бұрын
    • Then the AI got this run,

      @TheChaos1123581321@TheChaos11235813212 ай бұрын
  • 22:48 "THE AI GOT THIS RUN" omg even the song, that's great man

    @wurrbm@wurrbm2 ай бұрын
    • but then, hefes... heu i mean the AI got this run...

      @theaypisamfpv@theaypisamfpv2 ай бұрын
    • @@theaypisamfpv but then AIHefest got this run:

      @wbrim@wbrim2 ай бұрын
    • "And then hefest got this run"

      @sahebiyasin6988@sahebiyasin6988Ай бұрын
    • Been looking for this comment

      @sca04245@sca04245Ай бұрын
    • 666 LIKES?????????? Every other comment has like 15!!

      @GameristicForce@GameristicForce13 күн бұрын
  • I’m not a TrackMania player but I love watching TrackMania videos. I also love game AI vids, and this video really did it for me. Being fascinated by chaos theory I’ve been screaming at my screen throughout the whole video ”bro it’s chaos theory”, and then you even mention it yourself. Top tier content, it’s what I’m here for. You just gained a new subscriber 😄

    @kirdow@kirdowАй бұрын
    • Haha same! I'm into chaos theory too, so the second he was like "it's deterministic, but it still feels so random...little differences in input..." I was yelling at my computer!

      @saturnhex9855@saturnhex9855Ай бұрын
  • This is one of the best videos I've ever seen. Amazing work!

    @tomepedro2560@tomepedro2560Ай бұрын
  • 28:50 “Now let’s have the AI drive upside down” had me rolling. For a hot second I really thought you were about to blow my mind once again 🤣

    @xardenas2636@xardenas26362 ай бұрын
    • Bro, i was like no fkn way he beats wirtual again upside down and then does that backwards just to show off that wirtual is just driving like a grandma on that track lol

      @dabestgrimmreaper4@dabestgrimmreaper42 ай бұрын
    • My stunned disbelief in that moment was at peak levels. I 100% thought it was going to happen haha

      @ArmageddonNerd@ArmageddonNerd2 ай бұрын
    • @@ArmageddonNerd I’m glad it wasn’t just me 🤣

      @xardenas2636@xardenas26362 ай бұрын
    • LOLL

      @haqtanefe@haqtanefe2 ай бұрын
    • HE EVEN HAD TRAINING PREPPED FOR IT 🤣

      @BLENDITE@BLENDITE2 ай бұрын
  • your visualizations are just amazing, thank you for all the editing!

    @BernhardMillauer@BernhardMillauerАй бұрын
    • Amazing video! Interesting work

      @itmsolver@itmsolverАй бұрын
    • Yeah, these 1000+ AI car attempt renders are just visual candy.

      @Controllerhead@ControllerheadАй бұрын
  • Apart from the excellent research, I'd just like to comment on how amazing the editing was for this! That kept it interesting AND funny!

    @AlmightyRawks@AlmightyRawksАй бұрын
  • Incredible video, one of the best I’ve seen in a long time, thank you !

    @gui6987@gui6987Ай бұрын
  • Your analysis about chaos theory is exactly what is going on. And TrackMania's chaotic physics are very familiar to me from another TrackMania project. The best way to control that chaos is by going slower, as the deviations caused by the bugs are less severe at lower speeds. Perhaps giving less reward for speed and more reward by having a high chance of getting far would help with consistency.

    @qweytr9964@qweytr99642 ай бұрын
    • In fact, that's probably why the backwards driving cars were much more consistent. There's not as much deviation in speed when they're going backwards, so any bug has less impact and the performance reward is more focused on getting far too.

      @BoxTM@BoxTM2 ай бұрын
    • I dealt with similar issues in some TAS work with Neon White - in that case, small variations in frametimes would lead to different interpolation of player movement (even with fixed tickrate physics, they still interpolated the actual player position based on frametimes), which would add up to significant positional desyncs occasionally. Vsync helped reduce the frequency of this (as it would better sync frametimes to monitor refreshes), but it still wouldn't fix it entirely. sometimes, it's just about the little things.

      @HECKATE@HECKATE2 ай бұрын
    • I dont wanna say one thing is the reason for the other without 100% confidence but going forward = more speed = more chaos, backwards = less speed = less chaos, coincidence?

      @iCrimzon@iCrimzon2 ай бұрын
    • @@BoxTMI'm only familiar with the basics of chaos theory, but I feel that trying to find the Lyapunov time of the system could be a good first step.

      @Bruno-cb5gk@Bruno-cb5gk2 ай бұрын
    • @@Bruno-cb5gk I think you will find such a calculation not only to be impractical, but next to impossible to perform… The Lyapunov time will only be a few frames/instances of the physics engine refreshing. Anyway, we know all the hidden variables here as he showed in the video, so there isn’t much point since it still is deterministic and we can actually view all the precise starting information right, why can’t we just let the ai view that data as well? Correct me if I am mistaken please.

      @kristofp2383@kristofp23832 ай бұрын
  • 28:40 was a comedic masterpiece, the editing, the pacing, incroyable!

    @MagicWazam@MagicWazam2 ай бұрын
    • Absolutely poetic.

      @evenleven9205@evenleven92052 ай бұрын
    • God, I wanted to see turtle on pipes so badly 😢

      @hairyrosette9642@hairyrosette96422 ай бұрын
    • "Ive Tried though" how many hours we're lost to these 3 words

      @96thelycan@96thelycan2 ай бұрын
    • 😂😂 I was laughing so hard at that point

      @camillaericajuliarandal332@camillaericajuliarandal3322 ай бұрын
    • Genuine comment though, if you give the ai full knowledge of the decimal precision you’re getting, it might actually be able to do something about it, give it the smallest of minute details, only then can it do something about it

      @ianweckhorst3200@ianweckhorst32002 ай бұрын
  • Amazing production, your videos are always such a treat!

    @merlinthelemurian3197@merlinthelemurian3197Ай бұрын
  • Thise video (and all of the other videos of yours) are a true masterpiece.

    @luigibeccali2840@luigibeccali28404 күн бұрын
  • Wow, this was not only informative and entertaining but a cinematic masterpiece with perfect pacing and music selection and everything, I didn’t even realise it was 40 minutes long until after I finished watching it!

    @NaThingSerious@NaThingSeriousАй бұрын
    • thats exactly what i thought too!

      @mooritzzLP@mooritzzLPАй бұрын
    • It was 40 minutes?!🫣

      @lobban2@lobban2Ай бұрын
  • Yosh: "I am going to lock your breaks and acceleration so you cant slow down" AI: "Pfft check this out"

    @happycryingcat3101@happycryingcat3101Ай бұрын
    • and that it still figured out how to manage its speed with airtime despite those limitations. and he says the AI isn't creative.

      @binz2056@binz2056Ай бұрын
    • @@binz2056 That is entirely deterministic. The increased airtime led to success. It is just maths masquerading as creativity.

      @bertram-raven@bertram-ravenАй бұрын
    • @@bertram-raven call it whatever you want. But it is an interesting workaround given the constraints.

      @binz2056@binz2056Ай бұрын
    • Yosh: "I am going to make you drive backwards then" AI: "Pfft check this out"

      @imoud47@imoud47Ай бұрын
    • @@bertram-ravenisn’t that true of all creativity that generates something that can be represented mathematically?

      @thedave1771@thedave1771Ай бұрын
  • Man, you have the best vidios on AI reinforcement learning on the whole internet, kudos!

    @Martin3559@Martin3559Ай бұрын
  • What an extremely high production value we have here. The edit, the music, the time and dedication oooozzzzee excellence in the art. Well done to all involved. This is a patrion worthy production for sure! Keep it up and hope to see more at this level. And yes it strengthens understandings in both chaos theory, and agnosticism lol. Mahalo

    @firepaint33@firepaint338 күн бұрын
  • I love how the AI on the 65km pipe track looks like it's just blissfully skipping along while the human records look like they're terrified. it's so silly.

    @George_vv@George_vv2 ай бұрын
  • Unironically one of the best track mania / AI beats things video I have ever seen, the visual representation of everything and your clear explanations made this so satisfying to watch. Like the showcase you did when explaining the randomness of tiny input changes was so well done and it is really clear how much time you put into this topic and video. Also your humor ist just amazing lmao

    @itsmethep_@itsmethep_2 ай бұрын
  • Thank you for the visuals, they are incredible! I understand AI and the process of learning a lot better now!

    @Lord_Walrus69@Lord_Walrus69Ай бұрын
  • Amazing video! I don't even watch or play track mania, but you managed to maintain my attention for the entire duration!!!

    @blorpgneezer8091@blorpgneezer8091Ай бұрын
  • Mathematician here, I fully agree with your chaos theoretic conclusions, and I think the pipe experiment at the end strongly supports this (as you realised). Why not give the ai control after a random amount of time has passed at the beginning? I think it is really interesting, I would like to see if the ai could somehow abuse the chaos theoretic nature of the situation - I remember a video about a Pokémon ai that figured out some elementary RNG manipulation so that it wouldn’t get grass encounters :D If you want to talk actual mathematics, then I think perhaps the KZhead comment section is inadequate - I cant answer every question either, I only took one chaos theory class as a grad student, but perhaps we can try to understand some things.

    @kristofp2383@kristofp23832 ай бұрын
    • I'm a mathematician specializing in Chaos theory, AMA

      @Life0@Life02 ай бұрын
    • @@Life0 does chaos theory apply to women because i never seem to understand what the hell is going on

      @axerity9212@axerity92122 ай бұрын
    • What I'm curious about as a programmer, thinking about this issue, is if for whatever reason the physics system is tied to a clock/tick rate that could potentially cause that bizarre result where a certain delay always means success. Like if you tried the sim on another machine would the delay carry over? Is it a processing limitation? There could also just be mathematical issues within the physics engine itself; e.g. If you hit the ground hard, and lets say it spikes the suspension values to some crazy number, maybe the engine tosses values over a certain threshold or under another. @Yosh I wonder if you could teach it what stability "means", and set a reward system up for "good angles" that it finds for drops that are more likely to produce consistent results.

      @phimuskapsi@phimuskapsi2 ай бұрын
    • This game is insane. I could never manage to complete it better than yellow maps

      @gabrielv.4358@gabrielv.43582 ай бұрын
    • ​@@Life0 what are your favorite examples of everyday phenomena that involves chaos theory?

      @VocalMabiMaple@VocalMabiMaple2 ай бұрын
  • Waiting for all the Trackmania KZheadrs to react to this.

    @TheWizardsOfOz@TheWizardsOfOz2 ай бұрын
    • sex update when?

      @shrimpscampi9320@shrimpscampi93202 ай бұрын
    • Yeah

      @Guy.1.@Guy.1.2 ай бұрын
    • Yeah

      @Guy.1.@Guy.1.2 ай бұрын
    • Yeah

      @peskybirb7217@peskybirb72172 ай бұрын
    • Yeah

      @Cyroxbtw@Cyroxbtw2 ай бұрын
  • This is the pure essence of youtube, why this platform is amazing. This video is an absolute master piece, I am forever impressed, congrats

    @asmkwo@asmkwoАй бұрын
  • This video and others are so well-made, Yosh! Bro WTH

    @joe-fc6be@joe-fc6beАй бұрын
  • Thanks for using my map :D I have heard people saying that Trackmania is a deterministic game hundreds of times. I think from now on I will prefer to use the word "chaotic" :D

    @EdgeTM@EdgeTM2 ай бұрын
    • Heeey cool to see you here, I had a lot of fun in the replay editor with this map :D And gg for finishing such a map, it must be painful ahah

      @yoshtm@yoshtmАй бұрын
    • I want to see a merger with the world of "micromouse"

      @yinyang2385@yinyang2385Ай бұрын
  • 16:32 and there he is, introducing brownian motion in a virtual world to isolate entropy. Good job!

    @dinoscheidt@dinoscheidt2 ай бұрын
  • Incroyable ta video, ca ta pris beaucoup de temps comme tu la dit bravo pour ton travail de fou

    @Forgivz@ForgivzАй бұрын
  • Fantastic study! Thank you so much for sharing.

    @michai333@michai333Ай бұрын
  • The butterfly transistion at 17:27 is a pure masterpiece! The many small things u do while editing dosen't get enough appreceation! Congrats on a beautiful video!

    @erikgaynard5607@erikgaynard56072 ай бұрын
    • Beat me to it.

      @Nexovus@NexovusАй бұрын
    • Me too, wanted to say the exact same thing 😊

      @rolandgeb9970@rolandgeb9970Ай бұрын
    • “Foreshadowing is a literary device in which a writer gives an advance hint of what is to come later in the story”

      @mr.raphael1507@mr.raphael1507Ай бұрын
    • I was so happy when I noticed it

      @paillat@paillatАй бұрын
    • What if it's linked to the Butterfly Effect in chaos theory? Nice detail!

      @katzo1558@katzo1558Ай бұрын
  • I like how yosh's attitude towards the learning model went from "We shouldn't have to sacrifice consistency for speed" to "Fuck it we ball"

    @ickystickynicky4620@ickystickynicky46202 ай бұрын
  • Possibly the best video I have ever watched on KZhead. Well done!

    @stephendubarry6260@stephendubarry626015 күн бұрын
  • Dude this was an amazing video bro well done

    @tokiwartooth6835@tokiwartooth6835Ай бұрын
  • Your humor with "the song" and "the AI got this run" is just too damn much man. On top of being a cinematic masterpiece, it's also funny as hell. Insane video, genuinely hope you blow up beyond belief.

    @Zenith-ly7pr@Zenith-ly7pr2 ай бұрын
  • yooo such an honor that you used my map for the 3rd part ♥really enjoying your AI videos :) keep up the great work!

    @CorzoTM@CorzoTM2 ай бұрын
    • Ooooh hey corzo nice to see you here!!! I remember playing with you on the tm2 rpg titlepack sever many years ago :) I'm glad you liked it!!

      @yoshtm@yoshtm2 ай бұрын
  • Amazing how complex the simulation in Trackmania is... Never knowed. And your work ist mind boggling to me... Purely wonderful work.

    @fudeldideldu@fudeldidelduАй бұрын
  • Thank you for including the music track list at the end, so many bangers in this!!!!!

    @nullandvoid7881@nullandvoid7881Ай бұрын
    • also just found out that Timothy Infinite released more new music TODAY 🥳🩵

      @nullandvoid7881@nullandvoid7881Ай бұрын
  • This is really stellar work. Not just the AIs but the videos. I'd equate these with the likes of Summoning Salt who are just very good at not only doing stellar work themselves (speed runs in his case) but also present it in an enjoyable and captivating fashion. I have not binged watched your material, but from the videos I have seen this is some of your best work. Keep em coming.

    @goffe2282@goffe2282Ай бұрын
    • Thanks a lot

      @yoshtm@yoshtmАй бұрын
  • I’ve never played track mania. Only watched a handful of these videos and all I have to say is WOW! this video was amazing! Please keep making them.

    @kennethpetronis2464@kennethpetronis2464Ай бұрын
  • RL in trackmania make it very visually interesting. Thanks for creating video of this quality followed by all your thoughts over the projects.

    @samygauquelin@samygauquelin8 күн бұрын
  • OMG i was litreally watching the previous ai video and this JUST DROPPED ive been BLESSED. Actually huge timing

    @youshallneverfindit8415@youshallneverfindit84152 ай бұрын
    • same!

      @dmsejin@dmsejin2 ай бұрын
    • Same!

      @pufferfishjiminimi4885@pufferfishjiminimi48852 ай бұрын
  • "In the Hall of the Mountain King" playing while all the cars rush to their demise like a cascade, is so fitting. Your videos are so interesting and it was worth every second spent.

    @PotatoRed148@PotatoRed148Ай бұрын
  • Incredible video. You have gained a fan. And I love maths and AI. So can't wait to start studying it

    @user-xq8np2to3y@user-xq8np2to3yАй бұрын
  • one of the most entertaining videos ive seen. good job!

    @FDGQQW@FDGQQWАй бұрын
  • Even deterministically chaotic systems can be controlled, in practice it is when Lyapunov exponent is small and the agent has quick enough reaction time (and steering capability) to keep control. But the touch at 34:06 looks similar to a landing bug. A sudden deviation from usual behavior. What you can do is to add another (part of the overall) deep neural network to act as a predictor. That would detect such "buggy surprises", and you can focus the score on surviving such surprises. As to making the competition with humans more fair, what you could do is to make AI commit to its actions some time (say 0.3 seconds) into future. This would lower its control, so it would have to drive slower in order not to lose control. (Edited typos.)

    @ariaden@ariaden2 ай бұрын
    • +1

      @Photo650D@Photo650D2 ай бұрын
    • +2

      @Schmogel92@Schmogel922 ай бұрын
    • 👍

      @Panimioul@Panimioul2 ай бұрын
    • Splitting the AI up into multiple smaller ones seems like the way to go. For example one for prediction, one for recovering from mistakes/bugs/chaos, one for just trying to go fast (pretty much what the AI in this video was) then a controller AI that decides when to switch between them. This approach would also make harder tracks more possible, if there would be a separate AI just for speedslides, bug slides and all the other techniques, a few prediction AIs and then a decision maker AI.

      @Bruno-cb5gk@Bruno-cb5gk2 ай бұрын
    • But landing bugs are deterministic. They are called bugs but if you execute the exact same inputs the landing bug will happen. That’s how trackmania saves replays in fact. I think what is nondeterministic is how long it takes the AI to compute an update, so it gets a slightly different view of the world at the next step.

      @trumpet43samurai@trumpet43samurai2 ай бұрын
  • I didn't expect there to be micro fluctuations in a still car, but its equally fascinating as it is frustrating to learn the game is so sensitive that milliseconds can, in niche scenarios, determine your success. It may not be truly random, but it's close enough that you can't account for it.

    @Evelaraevia@Evelaraevia2 ай бұрын
    • But that's actually what happens to a car IRL. A straight line is a mathematical convention with absolutely no correspondence to anything in the observable universe

      @0752756949@0752756949Ай бұрын
  • Amazing video! I love the editing

    @timvanlanen8868@timvanlanen886820 күн бұрын
  • Great video! Love the little homage to Wirtual with the sound track and "and then the AI got this run".

    @shailchoksi889@shailchoksi889Ай бұрын
  • What a wondeful video, the quality, the effort, the scripting, even the joke about driving turtle, totally got me, piece of art!

    @RacetasClub@RacetasClub2 ай бұрын
  • This definitely is your best video ever! I've enjoyed the previous ones a lot, but this is a masterpiece! Keep going at it; the humor, the theorycrafting, your thought processes... it's all just one giant jigsaw that fits together perfectly.

    @maxpoppe@maxpoppe2 ай бұрын
    • Thanks a lot

      @yoshtm@yoshtm2 ай бұрын
  • Vidéo très pédagogique, j'aime bien ! Merci pour ton travail

    @natjom@natjomАй бұрын
  • La vidéo est très clean, le taff est fou, c'est intéressant, fun, chapeau, c'ets du très beau taff

    @ThePlaylistGuy-TPG@ThePlaylistGuy-TPGАй бұрын
  • I have no idea what's going on but it was really satisfying watching huge cascades of race cars falling off pipes, thank you!

    @thevalarauka101@thevalarauka1012 ай бұрын
    • As a former kid, I concur. Watching cars fall off pipes is satisfying.

      @trucid2@trucid2Ай бұрын
  • 25:55 was the funniest part, no questions asked. Long but great set-up to a satisfying slapstick punchline.

    @btf_flotsam478@btf_flotsam4782 ай бұрын
    • Goosebumps indeed but I gotta the say the pun at the end that more patreon subscribers would be a great "reward" for him made me crack up even more 😂 suddenly the guy is just an AI himself 😅

      @lennibastert7445@lennibastert74452 ай бұрын
  • Your videos are so good that I make popcorn and then watch them on the living room TV 😊 they are pure poetry 🤓

    @didimoscardon@didimoscardonАй бұрын
  • Best video seen this year. i really enjoyed it thx

    @coolzeroh@coolzerohАй бұрын
  • Wow. The way you paint the picture between about 17:00 and 20:00 is so captivating, wonderfully done!

    @juliensauter@juliensauter2 ай бұрын
  • I loved how it just randomly turned to a Wirtual documentary for a while at 21:55, even the Norwegian flag is here.

    @matejvlcek6151@matejvlcek61512 ай бұрын
  • Intéressant, intriguant, étonnant, fascinant, et même émouvant... Quel travail d'immense qualité, merci de tout cœur !

    @bbrrrrr6553@bbrrrrr655314 күн бұрын
  • Great video, keep up the good work :)

    @LeonardoTaglialegne@LeonardoTaglialegneАй бұрын
  • Great video. Ive totally watched it after 44sec release

    @elidanielsimonrada1577@elidanielsimonrada15772 ай бұрын
  • You make the bestvideos on Reinforcement Learning! They inspired me a lot to want to learn how to do this, keep up the great work :)

    @juliensauter@juliensauter2 ай бұрын
  • The music editing at the end was excellent!

    @aaron159r2@aaron159r2Ай бұрын
  • This was fascinating in terms of both content and presentation. I studied chaos theory in detail through graduate school and think it's amazing that we've progressed so much in recent years that we're able to train models to control themselves with high degrees of freedom to achieve complicated objectives "with ease" like this. Your presentation was really well done and I'm frankly impressed that you introduced the ideas to us with such clarity. - I saw a comment mentioning precision of the network, where floats vs. doubles might matter. I might even raise that and say that using quadruple precision may be helpful, especially for very long tracks where the outcome of control decisions early on have more room to accumulate and "stabilize" before getting jostled around by typical double machine precision noise. - It's possible that Trackmania indeed has a deterministic physics engine, but the result of a floating point operation depends on computer hardware. I think it would be interesting to run the same models on different computers and race their best products against each other to see if there are any significant differences due to pure numerical error in carrying out the game's computations. This might also be able to prescribe a quantitative number telling us how chaotic a segment of the track actually is which could be interesting to know as well. For example, to be able to tell the model that *this* segment of track is actually easy and there's nothing to explore, or if in *this* segment it should expand on the way it learns by 1) using much finer controls to perfect the local extremum it has found, AND 2) using much broader controls to explore the control space more rapidly without burrowing itself in one particular local extremum. - The fact that the state fluctuates so wildly (to the 5th digit) when no controls are given seems to me like it implies that the state is also fluctuating while the car is being driven. Perturbations to the state in regular chaotic systems are normally way smaller (at least 100 or 1000 times less), but the fact that it's so large and is always changing (with zero mean) makes this seem like a stochastic system to me.

    @whalep@whalepАй бұрын
  • This was such a masterpiece video! I’ve been following you for a long time but it is incredible on how far you have come. I enjoyed every minute of this video. Thanks. ❤

    @nyghl@nyghl2 ай бұрын
  • Every time I see these videos appear, I can't help but watch. It's super interesting to see the steps required to train the model and the steps you take as you iterate. On top of that, the way you've visualised all of the attempts and with the use of colour to demonstrate how close the AI is to ideal for the scenario is just pure eye-candy. I love it!

    @ChaosCreations0@ChaosCreations0Ай бұрын
  • Amazing work. This was a great watch.

    @skullbasher0088@skullbasher0088Ай бұрын
  • Chaque vidéo je suis comme un dingue, alors que je ne joue pas au jeu de base. Continue c'est très fort 💪

    @Dextyy1_-@Dextyy1_-Ай бұрын
  • babe wake up, new trackmania ai video

    @NorthTM@NorthTM2 ай бұрын
    • ... just dropped

      @sHootR450@sHootR4502 ай бұрын
  • Software Developer with focus on ML here. Just from 32:03 you can see a lot of variance in the game engine physics calculations. This is most likely due to floating point precision error over time. To a human player, this variance isn't preceptable. Eg. one hundred thousandth of a velocity change looks the same in reality, but the different input may cause the AI to make a different decision. The AI may be over fitting into the region of noise in the signal. To make the AI more consistent and human like, I think you need to actually DECREASE the precision of these values fed into the model. That should help reduce the chaos being injected into the system. This is a balance because reducing the precision too far is bad too. A simple trick to try is to convert inputs to int8 or int16. That will give lower precision input and perform faster with aimpler math calculations. Or you can just truncate the float to the first 4-5 significant digits.

    @andrewbrown2038@andrewbrown20382 ай бұрын
  • what an informative and interesting video. Thanks !

    @overtonesnteatime198@overtonesnteatime198Ай бұрын
  • Editing this video must have been insane. Nice job!

    @Merq_v1@Merq_v1Ай бұрын
  • Fellow NN dabbler here, I have a few thoughts / suggestions: There's a degree of unpredictability from floating point bit precision and, as it's obvious to all, the system is inherently unstable. But I don't think this is insurmountable. Firstly, there's a limit to what you can achieve with just two hidden layers and no temporal context. The lack of layers will translate into a lack of abstraction. All you'll get is "this high, that low" kind of reaction. Worse still, the NN is meeting decisions based on the instantaneous state when the most important thing is momentum which has a time component. Therefore you've given it an unsolvable problem, like trying to play chess without knowing where your opponent's pieces are. You can test this hypothesis by calculating angular and linear momentum and feeding it in as an input. If I'm right, you'll see an instant improvement. Much better though is to allow access to the past. Try a simple recurrent NN first to see if it improves matters. Although you'll have to watch the expense. Finally, just like the pipe it rides, the instability of the system becomes critical when you approach loss of control circumstances. Right now that's not being trained for, the change in the input just alters which corner fails. So the loss is not factored into the reward meeting that you stay in the same position in latent space. You need to find the bell curve before the failure is most recoverable. Say it's 3 secs before the fall. Find a failure point and mass spawn there with a random time variable of say 0.5 seconds. Train the AI that, on average, has the least falls. Fundamentally though, an input / reaction AI is insufficient. I would probably look at using an attention vector where I'd look to get it to recognise certain situations and contextualise its response. Just a thought. Very fun vid btw!

    @davidmurphy563@davidmurphy5632 ай бұрын
    • Great comment! 👍 With a lot of effort and sophisticated methods I don't think it would be unfeasible to train a model to the point where it never "bugs", i.e. it avoids and/or works around situations where the chaotic nature of the simulation surfaces. Maybe even an AI that could uber at will... 👀

      @granite_planet@granite_planet2 ай бұрын
    • What's worrying about the floating point imprecision is that some of the car's parameters change by an order of magnitude even when it's at rest (32:02) which seems to indicate the game engine doesn't really try to limit fp error propagation.

      @JerehmiaBoaz@JerehmiaBoaz2 ай бұрын
    • @@JerehmiaBoaz That's just the physics engine implementation. There's a "gravitational" acceleration and then a hit box on the wheels which counteracts it. Obviously it doesn't quite return the body to the same place but it's imperceptible so nobody is going to worry about it. These things are an art not a science, they'll be "suspension" on the car and "friction" so they'll mess with the settings until the car feels right. Bit precision on these tiny effects just scrambles the numbers a little, it's not the cause as such. If you run the same computer programme twice you always get the same result; bit imprecision always gives the same result. The real issue here is how low entropy the solution is. The count of microstates of failed outcome macrostate is particularly large compared to that of the success macrostate so small changes escalate quickly. Compare that to noughts and crosses / tic tac toe, the success macrostate is a substantial proportion of the total. Sorry, that was an overly academic take but it's the fundamental issue.

      @davidmurphy563@davidmurphy5632 ай бұрын
    • @@davidmurphy563 I understand how physics engines work and I've dabbled in AI myself a bit (I'm a contributor to the stockfish chess engine). My point is that the number of microstates of the successful outcomr macrostate might be further reduced by the granularity of the fp calculations performed by the game engine, it might be impossible to take some corners perfectly because the engine's inaccuracy makes the car either understeer or oversteer depending on the involved physics parameters.

      @JerehmiaBoaz@JerehmiaBoaz2 ай бұрын
    • @@JerehmiaBoaz Oh wow, really?! I'm a big chess fan myself and Stockfish is an awesome engine! Hats off to you. Sorry, didn't mean to teach you to suck eggs, I just assumed layman and honestly, I just wrote what I'd been mulling over anyway. Helps me think it over. Yeah sure, I'll accept that point in principle, although perhaps not in practice here. In general, the more bites at an apple you have to correct the divergence the better. If you were to map the latent space onto a discrete cosine transform (I don't recommend fourier as the ends need to meet) with the outer product then you could likely identify the frequency ceiling and set the framerate accordingly. Although if I recall correctly I believe the dude tried upping the frames without result which - if you squint through rose tinted glasses - vaguely supports my suspicion that missing temporal data led to intractability.

      @davidmurphy563@davidmurphy5632 ай бұрын
  • A race without 🥕 = chaos Congrat's Yosh ! Love watching this little car grow 🧡

    @mimisibai@mimisibai2 ай бұрын
  • Thanks for explaining the theory! This was fun watch

    @tall-dark-and-nevermind@tall-dark-and-nevermindАй бұрын
  • The video narration and edition is awesome! Keep that excellent work!! What about a video explaining how does the AI works, with some working examples, and so? I known nothing and something about AI, and I felt that you can explain all the details flawlessly.

    @McNificoTube@McNificoTube8 күн бұрын
  • What an interesting video, this is unironically one of the most entertaining videos I've watched on this website in a long time. Absolutely crazy concept and amazing work with great editing.

    @keatonwastaken@keatonwastaken2 ай бұрын
  • "I don't want to dream of this pipes anymore" 😂 Love the video

    @ponsmatheo1025@ponsmatheo10252 ай бұрын
  • I thought for sure this was a purely AI driven channel. Even though I've never played this game, I loved seeing all your videos are trackmania specific also. Passion.

    @kanosig@kanosigАй бұрын
  • The editing is actually amazing

    @OfficialJervin@OfficialJervinАй бұрын
  • Oh my god... not only was this topic SUPER interesting, but it was also presented and explained beautifully, masterfully shot and edited... the list goes on. The way you exhibit the improvements with colors, showing hundreds or probably thousands of runs simultaneously is visually stunning but also very easy for the average viewer to digest. I'm blown away. I subscribed after being suggested and watching your last video, and I'm so glad I did. Just unbelievably well done. Massive props! 🤩

    @koozmusic@koozmusic2 ай бұрын
    • Thanks a lot :D

      @yoshtm@yoshtm2 ай бұрын
  • I never comment on KZhead but this was an absolutely amazing video! Content and script/editing were both perfect. Thank you for making it!!

    @danielclayden1160@danielclayden1160Ай бұрын
  • Thank you so much for this. I really enjoyed it.

    @WO3L@WO3LАй бұрын
  • Amazing channel, great content!

    @niklasullrich6762@niklasullrich6762Ай бұрын
  • I cant even imagine the amount of work behind the design/ training of the AI, and the writing/editing of this video. The amount of work you put is INSANE and the result is beautiful and astonishing! Tthe way you highlighted chaotic behavior was also very interresting! It was a real pleasure to watch!

    @billa38000@billa380002 ай бұрын
  • First video of yours I've seen, and it's an instant subscribe. I know nothing about Trackmania and I'm not much of a gamer generally, but this was absolutely fascinating, and the quality of your shots and editing is outstanding.

    @jammin023@jammin023Ай бұрын
  • such a high quality and well made video damn

    @nqnqnq@nqnqnqАй бұрын
  • Im a new french IA dev. Chaos behavior could be stop, if you go to a stable deterministic and confort position / case. In your pipe jump race, you can reduce your problem circuit, into a single jump : start in any position on a pipe, jump on a next pipe and stop. Then reward if it stops on the pipe. So, just try to reward it, when it stops a moment on each pipe. Then chaos will be reset.

    @bugtab@bugtabАй бұрын
    • but it wouls have to stop at the same place each times, which is maybe not possible, because the initial situation make it so that, you have a limited numbers of movement you can do, and a limited number of different speed you can achieve, it's all graduated, so there may not be any way to reset the chaos like this.

      @ledernierutopiste@ledernierutopisteАй бұрын
    • ​@@ledernierutopiste Yes this can be a little problem. As he did before, he can spawn the car randomly on the pipe. Then the IA will learn how to go from any initial position. Then in the next pipe, after these 4 wheels are on contact and fix during a moment, the IA will know how to continue these next pipe. And so on.

      @bugtab@bugtabАй бұрын
    • The only think is the game isnt deterministic. He showed that the position of the car changes by am imperceivably amount hundred times a second that leads to drastically different outcomes. So it could never be in the same spot twice

      @cantingpython1809@cantingpython180921 күн бұрын
    • ​@@cantingpython1809 We don't need to be in the same spot twice. We need that the car have four wheels on the floor at the same time for a moment, to be stable, and recover a deterministic state. Jump. And repeat theses operations at each level.

      @bugtab@bugtab21 күн бұрын
  • You've completely nailed the editing, pacing and comedy in this video. Keep it up, and thank you for such a masterpiece!

    @nothoneyxm8@nothoneyxm82 ай бұрын
  • Yo man was just gonna say that you inspired me to dive deeper into reinforcement learning for my master thesis after seeing your amazing work. Keep it up!❤

    @rubenvangelder7359@rubenvangelder73592 ай бұрын
  • Que buen video! calidad cinematográfica, música me parece genial el trabajo que has hecho!

    @maguero2@maguero2Ай бұрын
  • I really liked the backwards driving part. On a slow and intricate track like this you can really see the benefits of rear wheel steering - it's much more "nimble", especially when going around hard corners. The usual drawbacks - instability and "twitchiness" at higher speeds - don't matter that much if you have to go slow anyway. And as always: great editing and the right amount of depth in the technical parts to be both entertaining and informative.

    @Nandrith@NandrithАй бұрын
KZhead