AI Learns to Speedrun Mario

Sdílet
Vložit
  • čas přidán 27. 08. 2023
  • #ai #mario #reinforcementlearning
    SUBSCRIBE and I'll make your AI ideas.
    This video is absolutely insane. I made an AI that speedruns Mario, and it might have hit the speedrun record. You have to watch to find out :)
    Huge shoutout to uvipen on github. I literally could not create this without them.
    follow my twitter (or X): / _kushgupta
  • Věda a technologie

Komentáře • 694

  • @kartingman5961
    @kartingman5961 Před 5 měsíci +324

    "For every second Mario stays alive, he receives negative punishment" 💀

  • @helloyanis
    @helloyanis Před 7 měsíci +383

    The best way to train an AI on a game is to not do the same level over and over again. Or the AI will be godlike at one single level and just very bad at others. If you diversify the training process il will take longer but the AI will be way better. Try doing this and then putting the AI on a level it has never seen before and you'll be surprised by how quick it learns it!

    • @KushGupta1
      @KushGupta1  Před 7 měsíci +140

      You’re right! I was trying to train the AI on the whole game but due to that 1 bug at the very end it wasn’t working out so I switched to training level by level!

    • @Floxxoror
      @Floxxoror Před 7 měsíci

      And....what was this bug? If I could program myself, I wouldn't watch other people do it. It's like making the whole video in English and then an erratum at the end in Mandarin.@@KushGupta1

    • @bitonic589
      @bitonic589 Před 5 měsíci +11

      ​@@KushGupta1when part 2

    • @kyoobqa
      @kyoobqa Před 5 měsíci +6

      ​@@KushGupta1 when part 2

    • @onionphilosopher
      @onionphilosopher Před 5 měsíci +5

      @@KushGupta1 when part 2

  • @happyboy07685
    @happyboy07685 Před 7 měsíci +589

    5:58 I actually think you go faster with a backwards jump. Granted, it only saves a few miliseconds, but it counts that the AI knows how and to do it.

    • @mariotheundying
      @mariotheundying Před 7 měsíci +30

      That looks like an useless backwards jump tho as the AI did not go over the pipe and keep momentum, instead just landed on the floor and kissed the pipe

    • @jackmartin6502
      @jackmartin6502 Před 7 měsíci +34

      This is a trick called fast acceleration. The AI didn't really do this since he hit the pipe right after.

    • @NotJenSen
      @NotJenSen Před 7 měsíci +2

      backwards jumping indeed make the player slightly faster

    • @EebstertheGreat
      @EebstertheGreat Před 7 měsíci +2

      That probably is why the AI does it, because you do accelerate faster this way if you aren't already at max speed. The AI is wasting a lot of time by jumping too high though, because it's not very good at it. The thing is that it is hitting the walking speed cap in midair, and it can't accelerate to running speed until it hits the ground while holding B. But it doesn't understand that yet. It's a lot easier to just figure out that jumping backwards is faster, at least briefly.
      Of course, it didn't matter in this run because it bonked anyway, but surely it didn't always bonk while training.

    • @jimster1111
      @jimster1111 Před 7 měsíci

      seemed like it knew where the plants hitboxes were too. as it skid over the op of one by mere pixels during its world record run

  • @Octobeann
    @Octobeann Před 7 měsíci +30

    6:00 i don't know the exact reason but due to a quirk with the physics mario actually accelerates faster backwards, TAS speedruns will also use backwards jumps to reach top speed as fast as possible.

    • @arfansthename
      @arfansthename Před 7 měsíci +3

      with backwards jumps (the smb speedrunning community calls it fast accels) it's only applicable in tases since it requires you to press both left and right in the same frame, something that physically can't apply in rta runs because of the d-pad, even then the backwards jump the ai did there wastes time as it's walking speed

    • @animowany111
      @animowany111 Před 7 měsíci +3

      @@arfansthename Nah, pressing left+right is only required for the fastest possible execution of a fast acceleration. Even without left+right, if you do a fast accel frame-perfectly you'll be slightly faster.

    • @mariotheundying
      @mariotheundying Před 7 měsíci +1

      Useless backwards jump tho as the AI just used it to hug the pipe as fast as possible, unless im wrong

  • @blitzgerald
    @blitzgerald Před 7 měsíci +98

    this kind of content is so entertaining, if you continue to make video game content like this I will absolutely support you!

    • @parth971
      @parth971 Před 6 měsíci +1

      Yeah he needs to continue at it. It's been few months already and he only has one video on his site. I have seen others doing this on CZcams as well with Pokemon and stuff. So the competition is there for sure. I do agree though that content like this is going to blow up soon as it already seems like it is.

  • @jamiepiccione3853
    @jamiepiccione3853 Před 8 měsíci +365

    Next you should try to make an AI beat FNAF. (Even though someone probably already did that.)

    • @KushGupta1
      @KushGupta1  Před 8 měsíci +82

      Sure, I'll add it to my list!

    • @demopan1067
      @demopan1067 Před 7 měsíci +28

      Ai learns to manipulate rng

    • @Sandstheskeleton
      @Sandstheskeleton Před 7 měsíci +8

      @@demopan1067the impossible

    • @KushGupta1
      @KushGupta1  Před 7 měsíci +27

      That's my next video haha @@demopan1067

    • @Monkeyface678
      @Monkeyface678 Před 7 měsíci +7

      For that, the ai would need to be a model that responds to certain inputs, rather than one that memories the level

  • @lightningmc0935
    @lightningmc0935 Před 7 měsíci +5

    this was great i really hope part 2 comes out soon

  • @korbynalmendariz9554
    @korbynalmendariz9554 Před 7 měsíci +30

    You might only have 190 subscribers but this content is one of a kind. Keep making videos!

    • @KushGupta1
      @KushGupta1  Před 7 měsíci +3

      Thanks for the kind words! I’ll try my best.

    • @videoactif
      @videoactif Před 5 měsíci +4

      @@KushGupta1 What about part 2 ?

    • @lunaticko5639
      @lunaticko5639 Před 2 měsíci +1

      totally agree with you!!! waiting for part 2!!!

    • @NyteMunkey
      @NyteMunkey Před měsícem +1

      He's got way more now :) He is busy making part 2, I'm sure!

  • @Rikysonic
    @Rikysonic Před 7 měsíci +30

    6:20 Speedrunners: we must save this 0,35s framerule somehow
    AI: I'm 15s away from the record, 𝙡𝙞𝙩𝙚𝙧𝙖𝙡𝙡𝙮 𝙖𝙡𝙢𝙤𝙨𝙩 𝙩𝙝𝙚𝙧𝙚 :𝘿
    jk, obv great video and great work, but it made me laugh lol

  • @OpaqueSleet7802
    @OpaqueSleet7802 Před 7 měsíci +28

    After the AI masters SMB1 I would like to see it attempt the lost levels, it's much harder so I wonder how the AI would figure out how to get past some of the harder parts, specifically ones where hidden blocks are required to progress, or how to use the wind to do longer jumps. Since SMB1 and the lost levels have the same physics the same AI could probably be used. I subscribed to see your next uploads! :)

    • @KushGupta1
      @KushGupta1  Před 7 měsíci +6

      Thanks for the support! Thats a good idea. I’m to add it to the list. The same AI couldn’t really be used, since I’d still have to train it on the level which costs money because I have to rent a very powerful but expensive gpu.
      Nevertheless, I’m going to try that in the future for sure!!

    • @MonkeyMod
      @MonkeyMod Před 7 měsíci +1

      @@KushGupta1ok

    • @user-xe7kx7yi5z
      @user-xe7kx7yi5z Před 7 měsíci +2

      @@KushGupta1 Please use cheat codes to get money then buy the gpu and stuff so you can make more of these videos.

    • @Atlas_Redux
      @Atlas_Redux Před 4 měsíci

      @@KushGupta1 How much processing power does it need? I'm running some Learnfun/Playfun, but that is entirely CPU based. Got an RTX 4090 on an AMD 7950X3D.

  • @someone4229
    @someone4229 Před 7 měsíci +1

    That is *amazing!* For sure want to see second video about this

  • @amanvir
    @amanvir Před 8 měsíci +73

    Content like this is simply amazing, I just know you're about to blow up soon!
    Happy to be an early viewer to a massively underrated channel!

    • @KushGupta1
      @KushGupta1  Před 8 měsíci +7

      I appreciate the kind words :)

    • @happyboy07685
      @happyboy07685 Před 7 měsíci +4

      first video and he already has 1K, he probably had the good idea of going in with experience

    • @amanvir
      @amanvir Před 7 měsíci +3

      ​@@happyboy07685 Totally! The video is so well produced, and the topic is very interesting as well! I'm excited for more content from Kush!

  • @XX-xv6xe
    @XX-xv6xe Před 5 měsíci +2

    Gonna check back for part two cuz this is 🔥

  • @blingmememaster
    @blingmememaster Před 7 měsíci +16

    I think a fun game for the AI to speedrun would be a game like Wario Land 4 or pizza tower, as they are really fast paced and I want to see how the AI works in fast situations.

  • @Kisini03
    @Kisini03 Před 5 měsíci +3

    1:22 is when the ai is born and took 6mins and 44secs to get a record, scary.

    • @Kisini03
      @Kisini03 Před 5 měsíci +1

      Well, it only took 2,100 tries.

  • @TheAwesomeCap
    @TheAwesomeCap Před 7 měsíci

    Hi Kush! Do you have a link to your GitHub repository that you can share?

  • @realbenactually
    @realbenactually Před 5 měsíci +7

    I’m excited to see part 2, but more excited to see what direction your channel takes. Great start!

  • @rolen47
    @rolen47 Před 5 měsíci +21

    Your editing and commentary is really good. I'm surprised you only have 1 video, good quality like this usually takes youtubers a lot longer to achieve.

    • @KushGupta1
      @KushGupta1  Před 5 měsíci +7

      Thanks, I appreciate the kind words!

  • @grumly85
    @grumly85 Před 5 měsíci +1

    Wow. Excellent first video.
    Now subscribed.
    Waiting for part 2 😊

  • @Somos2011
    @Somos2011 Před 5 měsíci

    I'm really hyped for part 2, keep it up :)

  • @emdf7electromotivedieseltr622
    @emdf7electromotivedieseltr622 Před 7 měsíci +1

    this seems to be your one and only video, I will watch your career with great interest. Definitely earned a subscribe from me.

  • @asy42699
    @asy42699 Před 4 měsíci +2

    after 4 months... im still waiting for part 2

  • @iron09
    @iron09 Před 7 měsíci +3

    Some thing you should probably do are:
    1) have more poses for your character
    2) get him out of the way of the screen while showing off what You did (if you are so scared someone is going to steal your content just put something half trasparent on the vidioso it so be as much in the way)

    • @KushGupta1
      @KushGupta1  Před 7 měsíci

      You’re right! I’m going to try to draw more poses & use him less so people can focus on whats on the screen. Thanks for the feedback.

  • @Chrischi3TutorialLPs
    @Chrischi3TutorialLPs Před 4 měsíci +28

    You would be surprised how much theory goes into SMB1 speedruns at the top level. People will literally spend thousands of hours on improving by a few milliseconds, that is how optimized the game is at this point.

  • @Kanha0321
    @Kanha0321 Před 5 měsíci +1

    Waiting for part 2 this was awesome 😎❤

  • @theflightwrightsprogrammin4410
    @theflightwrightsprogrammin4410 Před 6 měsíci +2

    Amazing video, the animations and commentary is very nice. I thought that you must have millions of subscribers and was shocked to see 3K. I guess this shows how high the bar has been set in order to go viral on CZcams.

  • @dianeforlenza7869
    @dianeforlenza7869 Před 5 měsíci +2

    The way he explains ppo

  • @TetraFan1000
    @TetraFan1000 Před 8 měsíci +6

    Highly underrated! Nice work.👍

  • @siLveRscOpe13x
    @siLveRscOpe13x Před 5 měsíci +1

    Okay you got my sub. I look forward to part 2 ;)

  • @antoineschneider2822
    @antoineschneider2822 Před 4 měsíci

    damn i love your video. definitely gonna stick around to see how it goes

  • @happyboy07685
    @happyboy07685 Před 7 měsíci +5

    my man made the smart idea of making the channel with experience

  • @JamesMcFuckin
    @JamesMcFuckin Před 8 měsíci +2

    I agree with the sentiment of victory.

  • @Simeeow
    @Simeeow Před 4 měsíci +1

    Brooo we need part 2!

  • @channel12849
    @channel12849 Před 8 měsíci +4

    nice video and cant wait for part 2!!

  • @YoudonknowwhoIam
    @YoudonknowwhoIam Před 7 měsíci +1

    awesome video! Can’t wait for part 2

  • @twk4977
    @twk4977 Před měsícem +1

    How do my guy not know about the shortcuts? I know not everyone is a big fan of mario games but the pipes and going down them, is literally a staple of pop culture and gaming culture itself

  • @cozmothemagician7243
    @cozmothemagician7243 Před 7 měsíci +1

    Great job. Looking forward to more (:

  • @jorgejuegajuegos4044
    @jorgejuegajuegos4044 Před 7 měsíci +2

    First video, doing very good. Nice job man! 73k views and 1,55k subs are really good for only a first video. You got this!

  • @joelhummel779
    @joelhummel779 Před 7 měsíci +1

    Part 2 Please

  • @thesamesunrise5297
    @thesamesunrise5297 Před 4 měsíci +1

    Yo just binged watched all your videos

  • @WilliamXu210
    @WilliamXu210 Před 4 měsíci +4

    Friendly reminder AI is still not taking over

    • @user-qi5sr1xu8f
      @user-qi5sr1xu8f Před 7 dny

      It would be so easy to code a kill switch on them too 😂

  • @bluey-next777
    @bluey-next777 Před 6 měsíci +4

    1:14
    YONK!!

  • @LeWolfYT
    @LeWolfYT Před 7 měsíci +2

    i loved it
    also what is that one music that’s amazing that isn’t metal mario

  • @leebeeskee
    @leebeeskee Před 4 měsíci +2

    The entertainment factor of this video left me flabbergasted when I discovered you only have one video! I can't believe it. When can we expect part 2?

  • @johnlarson505
    @johnlarson505 Před 5 měsíci +13

    This video was very good. Any chance we'll see part 2?

  • @brosephstinson1297
    @brosephstinson1297 Před 5 měsíci +2

    where part 2, I'm invested now

  • @xecogenanimations
    @xecogenanimations Před 4 měsíci +2

    I actually enjoyed this keep the good work and i hope you become more famous in the future :)

  • @tjeerdbakker160
    @tjeerdbakker160 Před 5 měsíci +1

    I love this content, keep it up!

  • @rarebrockstark6219
    @rarebrockstark6219 Před 7 měsíci +4

    This is like Mark Rober
    "I may suck at Mario, but im really good at coding (mark=engineering), so im actually *really* good at Mario

  • @crabpaste
    @crabpaste Před 5 měsíci

    We need part 2?!?! Great video 🎉

  • @albert836dx5
    @albert836dx5 Před 7 měsíci +3

    BROOO THIS IS A REALLY GOOD NEW CHANNEL

  • @bloonyTheOriginal
    @bloonyTheOriginal Před 8 měsíci +11

    Remember us when this channel gets famous

    • @KushGupta1
      @KushGupta1  Před 8 měsíci +2

      Of course! Thanks for the support!

    • @AquaQuokka
      @AquaQuokka Před 7 měsíci +2

      ​@@KushGupta1This randomly got recommended to me, and I just subscribed!

  • @ClarkPotter
    @ClarkPotter Před 4 měsíci

    Nice, bro! Wtg! Amazing. Preferred your AI for style points, too.

  • @kasebrotpodcast2237
    @kasebrotpodcast2237 Před 6 měsíci +1

    Pls make part 2
    I watched this the 3rd time

  • @brendenbonokoski9177
    @brendenbonokoski9177 Před 7 měsíci +1

    i like this content your a great youtuber im exited for a pt 2

  • @channel12849
    @channel12849 Před 8 měsíci +2

    ai is gonna beat niftski soon

    • @KushGupta1
      @KushGupta1  Před 8 měsíci

      haha that's going to take a lot of work! I'm not even sure if its possible with the current state of AI. But I'll try my best!

  • @AvangionQ
    @AvangionQ Před 5 měsíci +2

    4:11 Fuzzy - Masked Dedede ... noice 🎶

  • @Inkling2
    @Inkling2 Před 7 měsíci +2

    Do this with celeste. I know it has been done before, but it would be really cool to see the AI progress.

  • @cheeseboiYT
    @cheeseboiYT Před 7 měsíci +1

    make part 2 RN

  • @Crafty_Jumper
    @Crafty_Jumper Před 4 měsíci +1

    You: says one dash two
    Me; Punches you in the face until you don't say punctuation

  • @brendawoodard5007
    @brendawoodard5007 Před 7 měsíci +2

    6:24 This is why money should be outlawed, and I am ashamed that you wouldn’t even TRY to steal. How would training an AI even COST money?!?! *HOW are you even putting UP with that?!?!*

    • @stratonikisporcia8630
      @stratonikisporcia8630 Před 6 měsíci +1

      Unless he literally BURNS his GPU each time, the only reason to lose money is the electricity bill which... isn't that much...
      Edit: he said it in a comment that he rents a virtual GPU

  • @NeweRen
    @NeweRen Před 7 měsíci +2

    underrated as frick, you really should make more

  • @johntippin
    @johntippin Před 3 měsíci

    Excited for the sequel!

  • @mulone-the-cool-guy
    @mulone-the-cool-guy Před 7 měsíci +3

    "ill have to make the whole game, from scratch."
    *proceeds to open unity*
    what about ScartcH

  • @ScottPIayz
    @ScottPIayz Před 7 měsíci +1

    Hope to see a continuuation too see it beat every level someday, thay would be sick!

  • @thelastwormbender7086
    @thelastwormbender7086 Před 7 měsíci +1

    Very good video, hope to see more in the future😊

  • @rereerer1815
    @rereerer1815 Před 7 měsíci +2

    This editing is wayyyy to good to have less than 1k subs

  • @BlastTheBat
    @BlastTheBat Před 7 měsíci +2

    Masked Dedede theme sounds so badass.
    Shows it really has trained.

  • @16dvnk7
    @16dvnk7 Před 7 měsíci +1

    please make part two so you can try to beat the entire game

  • @sheltongolden4394
    @sheltongolden4394 Před 5 měsíci +1

    Interesting video! I will be back for part II.

  • @littleboulderbro4981
    @littleboulderbro4981 Před 7 měsíci +1

    Underated+pt2 now

  • @lleguily
    @lleguily Před 5 měsíci

    pretty cool man im waiting for part 2

  • @BrunoPadilhaBlog
    @BrunoPadilhaBlog Před 3 dny

    Where's part 2?! This video was epic, if you keep making these you'll have a huge channel.

  • @kabirminecraft9617
    @kabirminecraft9617 Před 7 měsíci +1

    i love that ai so much and the music in the background motivates me to make ssomething like this so please tell me waht music u used

    • @KushGupta1
      @KushGupta1  Před 7 měsíci

      It’s called Dedede’s Royal Payback (Kirby Triple Deluxe)

  • @partygoer9644
    @partygoer9644 Před 7 měsíci +2

    4:12 what song is this?
    also great video! =D

  • @kokodi01
    @kokodi01 Před 7 měsíci +1

    good job for your first vid! +1 sub

  • @iainballas
    @iainballas Před 5 měsíci +1

    Will sub on part two :p

  • @MAMAMIAAWOODENBOY
    @MAMAMIAAWOODENBOY Před 19 dny +1

    “This is the world’s fastest Super Mario Bros. Speedrun”
    That is 18 minutes

  • @SuperNKM9
    @SuperNKM9 Před 7 měsíci +1

    And so a new Code Bullet has appeared except a lot less chaotic.

  • @cheesydinos
    @cheesydinos Před 7 měsíci +1

    ooo subbed. this is very underrated

  • @user-hf8qv9ms9m
    @user-hf8qv9ms9m Před 7 měsíci +2

    4:17 this is Kirby music

  • @videjara
    @videjara Před 4 měsíci +1

    someone: *_Beats super mario bros under 5 minutes_*

  • @strobbery2523
    @strobbery2523 Před 7 měsíci +1

    late viewer, but i really love these types of AI learning videos, keep goin man :D

    • @LocalToaster.
      @LocalToaster. Před 6 měsíci

      late? this is the first video by this channel!

  • @drbob212
    @drbob212 Před 3 měsíci +1

    4:17 Nobody has to kill this goomba, yet even the A.I. does.... If you ever feel down, at least you are not this goomba....

  • @dracothewarrior4316
    @dracothewarrior4316 Před 5 měsíci +2

    what song are you using for the tests? it sounds fire

  • @taiwanisacountry
    @taiwanisacountry Před 2 dny

    I am excited for part 2.

  • @AmaJein
    @AmaJein Před 6 měsíci +1

    Really interesting video. Good job!

  • @CharmingCharles30
    @CharmingCharles30 Před 7 měsíci +1

    bro this is ur1st video!? pls keep up this quality of editing its really good

  • @denizcakan5969
    @denizcakan5969 Před 5 měsíci +1

    Dudeeeee, part 2!!

  • @cezarysmorawski6755
    @cezarysmorawski6755 Před 7 měsíci +1

    great video but you can make more pngs for the character it will help (:

  • @sonicwaveinfinitymiddwelle8555
    @sonicwaveinfinitymiddwelle8555 Před 5 měsíci +8

    with 202,200 views you can buy some more training for the bot

  • @eavn5389
    @eavn5389 Před 4 měsíci

    its been FOUR MONTHS AND WE NEED A PART 2

  • @samuelv5978
    @samuelv5978 Před 4 měsíci +1

    Wait... THIS IS YOUR ONLY VIDEO? THIS IS SO FREAKING GOOD WTH

  • @LeReubzRic
    @LeReubzRic Před 7 měsíci +1

    Your videos are so good and this is your ONLY VIDEO

  • @MrBuckshot198722
    @MrBuckshot198722 Před 8 měsíci +2

    Nooooooo. Where’s part two!?! 😂 But for real good job on the video. I subbed because of it

    • @KushGupta1
      @KushGupta1  Před 8 měsíci +2

      Thanks! I'm working on part 2, but it will probably take a month or two.

  • @youreyesarebleeding1368
    @youreyesarebleeding1368 Před 5 měsíci +1

    in before this channel blows up. current subs: 5.17k
    I was surprised to see such a new channel making such good content

  • @MitraIsUnfunny
    @MitraIsUnfunny Před 7 měsíci +1

    fascinating

  • @toeman_dungfart1855
    @toeman_dungfart1855 Před 8 měsíci +2

    Good video I enjoy

    • @KushGupta1
      @KushGupta1  Před 8 měsíci

      thanks I appreciate the kind words!

  • @lativawreckster
    @lativawreckster Před 4 měsíci

    I love your explanation for reinforcement learning of an AI lol

  • @daviluizcastro1644
    @daviluizcastro1644 Před 7 měsíci +1

    What is the name of the final music when AI speedruns Level 5-2

    • @KushGupta1
      @KushGupta1  Před 7 měsíci

      It's called Dedede´s Royal Payback (Kirby Triple Deluxe)