Can an AI drive Mario Kart 64?

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

КОМЕНТАРІ • 192

  • @Poptart133g
    @Poptart133g 2 роки тому +198

    This is bringing me back to Sethblings MarIO project from years ago.

  • @mekafinchi
    @mekafinchi 2 роки тому +60

    It would be really interesting to see something like a reinforcement learning algorithm or other one that could learn to drive faster use real N64s to train.
    It would take way longer than using an emulator of course, but if it has to compensate for the delay of the input chain it might learn a lot better.
    Maybe we could get 4 models all racing eachother on one N64

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

      @@kezif I did mention as much yes.

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

      there is probably some better way by adding a delay to the emulator instead, that would give the best of both worlds: it would be emulated, so you can do training in parallel and faster, but you still have the delay of the controller for the better data for the console.

  • @doubleHLabs
    @doubleHLabs 2 роки тому +24

    I'm currently building an NES controller adapter that can send/receive controller signals in any direction. One of the future projects I"d like to work on with it is something like what you've done here. Very cool to see it working!

  • @narayanbandodker5482
    @narayanbandodker5482 2 роки тому +84

    Idea: Mario Kart: Super Circuit (GBA), the neural network plays on an emulator, you play on a real GBA, and you play multiplayer using the link cable (via some serial converter)

    • @narayanbandodker5482
      @narayanbandodker5482 2 роки тому +6

      If you need help, I might be able to help you out on getting some things to work as I am working on a similar project myself

    • @demolitionist42
      @demolitionist42 2 роки тому +2

      That would be really cool

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

      CPU race with extra steps

  • @isaac_volpe
    @isaac_volpe 2 роки тому +12

    I'm not smart enough to do this stuff myself, but this is super cool and I can't wait to see what else you do with this!

  • @weshuiz1325
    @weshuiz1325 2 роки тому +19

    machine learning on it's own is already pretty impresive
    but this took the cake 🎂 and the cherry 🍒

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

    I enjoyed your training-train easter egg.
    Great work, gg.

  • @PhoenixClank
    @PhoenixClank 2 роки тому +3

    I'm very impressed that the model manages to drive on Kalimari Desert as well with only two laps of training data!
    But I think it could generalize even better if you trained it on tracks with a "road" texture for the drivable area but very diverse backgrounds.
    Also please teach it to drift!

  • @_CryptoCat
    @_CryptoCat 2 роки тому +5

    what a fun way to showcase ML, love it! 😻 how did the best model compare to your best score (manually)?

  • @lennylein
    @lennylein 2 роки тому

    It’s really interesting you choose the supervised learning approach here. Frankly wouldn’t have expected the model to perform so well.

  • @Sblerky
    @Sblerky 2 роки тому +2

    Hi, i'm currently trying to implement tensorkart for MK8DX on yuzu and pretty much everything is done but I have one problem.
    The model has a hard time steering correctly. I trained it at half speed with cruise control just like you. The loss and validation loss stay low but when the model try to play the game, the steering value stays near 0 and is pretty much always the same (0.003...). Did you encounter the same problem and if so, how did you manage to solve it ?
    Thank you

  • @norgtube
    @norgtube 2 роки тому +1

    This is really cool! Have you tried starting to optimize for lap times? Watching a computer drive an almost frame-perfect lap on a physical N64 would be pretty fun!

  • @N1n35-42
    @N1n35-42 2 роки тому +1

    Love your stuff! Thanks for sharing!!

  • @lumitulva
    @lumitulva 2 роки тому

    Amazing to see my favourite channel delving into one of my favourite subjects! The results are very impressive given the low amount of training data (atleast compared to what reinforcement learning would have taken to learn from visual observations alone...) That being said would love to see you try implementing RL next!

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

    0:24 YOOOO shoutouts to the Silicon Valley reference!

  • @superhero1
    @superhero1 2 роки тому

    Nice video again @stacksmashing !

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

    Man i just found about your stuff and i gotta say, you inspire me a lot. Thank you !

  • @scarlett6761
    @scarlett6761 2 роки тому +1

    Ooh, this is so cool!!
    This also got me wondering about getting an ML model to play Pokémon Snap. Since there has been so much research into things like object identification, I wonder if it could be applied to a photography game. And then you’d have some pictures you could keep as a “souvenir” after 😁

  • @btarg1
    @btarg1 2 роки тому

    The real hardware twist is insane. This is super impressive!

  • @ignjatmarinkovic7884
    @ignjatmarinkovic7884 2 роки тому

    just yesterday i was wondering when you'd drop a new video. keep it up!

  • @Theking-uy3wu
    @Theking-uy3wu 2 роки тому +1

    Cool video! How about making an RC car drive like this? I actually used a very similar approach to make an RC car drive by itself and it's so fun seeing your work drive in the real world. I also made a short video about my project which might be worth checking out.

  • @bubbleboy821
    @bubbleboy821 2 роки тому

    These types of videos should be longer, way longer. I want to see the whole process!

  • @manidoowilkie8459
    @manidoowilkie8459 2 роки тому

    This is fascinating! Once it's comfortably trained to complete the track I'd be curious how it would handle when it's given item variables. Learning it can use mushrooms would be interesting to see if it will train itself on when to best use mushrooms or be stuck on having difficulty navigating the course

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

    I wonder why SLAM (Simutanous Localization And Mapping) isnt used for this project, as its used a bunch for guiding a robot through a maze. Maybe a part of the model can learn the map, while the other is in charge of driving.

  • @nocheastral8219
    @nocheastral8219 2 роки тому +3

    I Hope you understand the impact of the revolution you create in this world...with your awesome quality content , helping others understand an also inspiring to DIY...Thanks For your time and effort , God bless 🙂👍

  • @andre-le-bone-aparte
    @andre-le-bone-aparte 2 роки тому

    Just found your channel. Excellent Content! - Another sub for you sir.

  • @aex3059
    @aex3059 2 роки тому +2

    You need to train the model for speedruns :)

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

    Instructions unclear. Now my sister's Prius has taken off and we aren't sure where it went...

  • @Fourgees_4GS
    @Fourgees_4GS 2 роки тому

    This video is literally incredible. Is there a way you could showcase how you got the computer to control the n64 using the pico? I didn’t see much detail on that aspect in the GitHub other than the code.

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

    Brilliant work 👏🏼👏🏼

  • @btarg1
    @btarg1 2 роки тому

    Can you teach it how to drift, use items or even speedrun the game? You could use TAS as training data perhaps.

  • @amaze2n
    @amaze2n 2 роки тому

    I really love your videos. They are so well done.

  • @MudakTheMultiplier
    @MudakTheMultiplier 2 роки тому +1

    So the pinnacle end goal is for it to do weathertenko right?

  • @izzieb
    @izzieb 2 роки тому +1

    If I can learn to drive in Mario Kart, anything can.

  • @stawkee
    @stawkee 2 роки тому

    nice vid man!

  • @godbibo
    @godbibo 2 роки тому

    Nice project !

  • @BenjaminEggerstedt
    @BenjaminEggerstedt 2 роки тому

    Very cool! You do the things others dream of, congratulations! What is your lap time on the circuit?

  • @WalrusStu
    @WalrusStu 2 роки тому

    Finally.
    I have someone to play with.

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

    An IA that play temple run on cellphone could be really cool

  • @patrick1020000
    @patrick1020000 2 роки тому

    Sethbling was experimenting with Mario Kart AI a few years back and made MariFlow and MarIQ.

    • @stacksmashing
      @stacksmashing  2 роки тому

      His MarIO was so awesome, and he played Mario Kart on SNES :)

  • @Scrogan
    @Scrogan 2 роки тому

    I get the feeling that programming in assembly would be the best way to reduce the mock controller latency. A Pi Pico’s wanky python toolchain is about the opposite of that, though I can’t say for sure whether or not it would be significant compared to the other latency.
    Ideally I think you’d train the network on an emulator with maybe a bit of input lag added deliberately, but then deploy the trained network itself on a microcontroller (STM32G7 series would probably be my choice, if I could find one) that’s directly looking at the video output of the N64. Deploying trained neural networks onto microcontrollers will be very interesting in the next few years, I suspect.

    • @stacksmashing
      @stacksmashing  2 роки тому

      I programmed the Pico in C, there’s no bottleneck on that side :)

  • @Child0ne
    @Child0ne 2 роки тому

    Can you please please please explore the “blink” security camera. I have been working off and on for months with not much success

  • @jugglelulz
    @jugglelulz 2 роки тому

    Such a fun project. Is it possible with this setup to race your bot? Did you try this?

  • @4c1d
    @4c1d 2 роки тому

    Amazing !!! Give us more :)

  • @Freddisred
    @Freddisred 2 роки тому

    Ok, now take it into battle mode.

  • @TheMelihTube
    @TheMelihTube 2 роки тому

    very cool video!

  • @dkosmari
    @dkosmari 2 роки тому

    It looks like you'd need the same thing self-driving cars need: find out what is road and what isn't road. Then send that to the steering module. The risk of just feeding raw images to the neural network is you're never sure if can even recognize what's a road, so trying to steer on it might be futile. Is the AI failing to see where the road goes, or is the AI failing to control the vehicle?

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

      yes, and not to mention other karts and items

  • @forTodaysAdventure
    @forTodaysAdventure 2 роки тому

    dall-e is open source but i havent been able to train my own network. are there any networks out there, or can you show us how to train it?

  • @Evercade_Effect
    @Evercade_Effect 2 роки тому

    Very cool!

  • @deepmarsonia2463
    @deepmarsonia2463 2 роки тому

    Super impressive work!! 👌

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

    Cool - we’ll done. I would love to see, how well an AI model could learn to play PAC-MAN in a comparable setup. Any thoughts on that?

  • @istvanheredi6107
    @istvanheredi6107 2 роки тому

    Great work! Are you using an M1 or an Intel Mac?

    • @stacksmashing
      @stacksmashing  2 роки тому +2

      I’m on an M1 Mac, but trained the model on a desktop computer (but M1 also only took 7 secs per epoch)

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

    Train for every track possible besides Yoshi's Valley then see how it does there lol.

  • @AtlasMTBRider
    @AtlasMTBRider 2 роки тому

    Awesome!

  • @pastuh
    @pastuh 2 роки тому +1

    Trackmania loves AI

  • @alph4966
    @alph4966 2 роки тому

    Is it possible to make Splatoon play automatically with deep reinforcement learning?

  • @AfonsodelCB
    @AfonsodelCB 2 роки тому +1

    yes

  • @AndyMcBlane
    @AndyMcBlane 2 роки тому

    Awesome project!

  • @randcoding
    @randcoding 2 роки тому

    Nice video

  • @kylekersh
    @kylekersh 2 роки тому

    I wonder how it would preform if you trained it by playing a tas on hardware.

  • @testizoizo7373
    @testizoizo7373 2 роки тому

    Good video ✌️

  • @rasmusrasmussen9415
    @rasmusrasmussen9415 2 роки тому +2

    Maybe a Minecraft learning algorithm that can beat the game. That would be so mega cool

  • @MrYour101
    @MrYour101 2 роки тому

    This is so cool!

  • @Nebita
    @Nebita 2 роки тому

    the silicon valley reference :,)

  • @SianaGearz
    @SianaGearz 2 роки тому

    ML Model for karts driving a kart on a cart!

  • @zs9652
    @zs9652 2 роки тому

    When will it learn ssmts and how to race through custom tracks lol.
    Good job by the way

  • @gudenau
    @gudenau 2 роки тому

    I do want to do something similar to this, but I have no idea where to start.

    • @stacksmashing
      @stacksmashing  2 роки тому

      Start with something simple and go from there :)

    • @gudenau
      @gudenau 2 роки тому

      @@stacksmashing Yeah that's the hard part. Finding the keywords fit something super simple that isn't just the finished project and explains what is going on.
      If you have anything handy for that I'd love to check it out.

  • @Saw-qv3bl
    @Saw-qv3bl 2 роки тому

    I dont understand, is the AI using the RGB values of the road to associate them with where he should be?

    • @cosmicsvids
      @cosmicsvids 2 роки тому

      There's kind of no real practical use for this as you can just program the karts to drive a long the tracks with pathing which is what the cpu karts in the mario kart games do. They then create difficulty by using rubber banding so its impossible to get a big lead on the higher ccs.

  • @MegaManNeo
    @MegaManNeo 2 роки тому

    Can you let the AI handle second player input and race against it?

  • @5rv9KY
    @5rv9KY 2 роки тому

    Game&watch Zelda version is out....

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

    I have done something like this but in css and cs1.6 where i used cuda sdk.
    Enemy detection was no issue even with mouseevent for aiming center of mass
    The main big problem i had was the movment for corridors

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

      That sounds awesome! Do you have code or a write up somewhere?

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

      @@stacksmashing do you have a way i can send it privately as my project is not something I want to have public.
      Managed to do :
      enemy detection ( body form aka 15k 360 screenshots of enemy)
      Aimbot with mouseevent
      Path finding using bsp phrasing
      Corridor detection concept
      I really wanna go into details about my project as I have done some pretty wild examples.
      Searching: antiaimboss on yt will show videos of me using ai to raid servers using ai mesh Path finding
      I have some vids on my channel with some stuff I did but if you want I can show you all my work from 2011 of some advanced concepts
      Kind regards.

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

    Easier option: make Mario one of the computer players

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

    Isnt this basically tas

  • @UCs6ktlulE5BEeb3vBBOu6DQ
    @UCs6ktlulE5BEeb3vBBOu6DQ 2 роки тому

    Someone made a machine that play the other machine.. We gone full circle.. One day someone will create something like that and the supreme beings will end the simulation saying after epoch 2021 they finally made it.

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

    TAS the manual way

  • @RWL2012
    @RWL2012 2 роки тому

    Hacking the Zelda Game & Watch video when...?

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

    Mama mia.

  • @michalixgaming
    @michalixgaming 2 роки тому

    Time to hack zelda game&watch

  • @zwingler
    @zwingler 2 роки тому +1

    not even drifting SMH.

  • @l5-cs.
    @l5-cs. Рік тому

    yea now teach it asseto corsa

  • @Rogal55
    @Rogal55 2 роки тому

    hi

  • @almendratlilkouatl
    @almendratlilkouatl 2 роки тому

    you didn't learn anything from Ultron and Dune...

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

    Deutsche da wer noch?

  • @NetvoTV
    @NetvoTV 2 роки тому

    Hey man, are you interested to have a logo redesign for your channel that's simpler, clever, and functional which represent your contents to new audience and also memorable for everyone about your channel? I'm a freelance logo designer and I hope I have the honour to make use of my creativity to design one for you! Let me know if you interested for further details!

  • @TipsterLIVE
    @TipsterLIVE 2 роки тому +46

    This is so cool!!!

  • @viniciusnoyoutube
    @viniciusnoyoutube 2 роки тому

    Amazing!

  • @trazzag
    @trazzag 2 роки тому +45

    Wow, very impressive!
    One remark on the input lag: generic AV-to-HDMI adapters introduce a lot of input lag. You can significantly improve on that by using an upscaler that is specifically build for retro consoles, like the OSSC or RetroTink 5X.

    • @stacksmashing
      @stacksmashing  2 роки тому +16

      Good point! Unfortunately I don't have an OSSC or so yet, but definitely something I need to look into :)

    • @th3cub350
      @th3cub350 2 роки тому +9

      ​@@stacksmashing look into the GBS-C, it's a DIY upscaler (open-source firmware) that compete with those for very cheap. cheers !

    • @stacksmashing
      @stacksmashing  2 роки тому +3

      Will check it out! Thanks!

    • @CoolerQ
      @CoolerQ 2 роки тому +4

      @@stacksmashing Alternatively there are great HDMI mods for the N64 that extract raw RGB directly from the GPU's output and can manage

    • @Veptis
      @Veptis 2 роки тому +3

      Or capture the AV signal directly instead of going to HDMI first.

  • @Computer_Freak_2004
    @Computer_Freak_2004 2 роки тому +9

    Very cool! Especially that you are running it on real hardware!

  • @soragranda
    @soragranda 2 роки тому +2

    4:57 So with an expensive Jetson kit it will be faster!

  • @Amazotz
    @Amazotz 2 роки тому +3

    What an awesome project!
    I'm curious if a Jetson nano could be used for the video processing and controller output to make somewhat of an all in one solution

    • @stacksmashing
      @stacksmashing  2 роки тому +2

      Probably! I’ve got a couple of Jetson boards here but not sure I’ll find time to go down that rabbit hole😁

  • @MichelleSleeper
    @MichelleSleeper 2 роки тому +2

    As someone mentioned, this reminds me a lot of MarI/O from Sethbling. I'd love to see you tackle machine learning SMB1 on real hardware!

  • @JerryThings
    @JerryThings 2 роки тому +2

    I'd love to see a part 2 where you explain in detail what were the most difficult problems and how you managed to solve them :)

  • @soragranda
    @soragranda 2 роки тому +5

    Machine learning for self driving car : good.
    Machine learning for self driving Mario kart : better!
    I wonder if this could be use for the Mario kart live game!?, Imagine buying two and fight against a machine learning in real life?! XD.

  • @Ammothief41
    @Ammothief41 2 роки тому +2

    Good job! Hearing how it keyed off of the minimap is really neat.

  • @Scyth3934
    @Scyth3934 2 роки тому +1

    I can't wait to watch this one!

  • @trickystyler
    @trickystyler 2 роки тому +1

    Amazing work! any chance for the .h5 file?

    • @stacksmashing
      @stacksmashing  2 роки тому +2

      I'll see whether I can upload it :)

    • @trickystyler
      @trickystyler 2 роки тому +1

      @@stacksmashing you're the best, really

  • @danielhabazin
    @danielhabazin 2 роки тому +1

    oh man, this is going to be awesome!

  • @AdrianSandu_d
    @AdrianSandu_d 2 роки тому

    Some nintendo switch with asphalt 9 would be interesting! There are some arduino software based controllers available...

  • @bryanne274
    @bryanne274 2 роки тому

    "Casual interest in machine learning"
    Stop and go work at TESLA bro.

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

    "Can an AI play Mario Kart 64 like a human?"
    as stacks proceeds to put the apple font and mario from super mario kart in the thumbnail