AI Learns to Play Super Mario Bros!

Поделиться
HTML-код
  • Опубликовано: 1 окт 2024
  • Using a Genetic Algorithm and Neural Network, a population of AI were able to learn to play different levels of Super Mario Bros for the NES.
    Code: github.com/Chr...
    Blog:
    Music: / ashamaluevmusic
    first song: Memory
    second song: Cinematic Orchestral
    third song: My World

Комментарии • 667

  • @Kosmicd12
    @Kosmicd12 3 года назад +941

    Haha the walljump in 2-1 was sick

    • @Chrispresso
      @Chrispresso  3 года назад +113

      New meta for your next speed run? But seriously, your explanations of speed runs for the game helped me a ton in understanding some of this stuff....even though I still got some of them wrong.

    • @Kosmicd12
      @Kosmicd12 3 года назад +93

      @@Chrispresso unfortunately with the walljump in 2-1 you can only get 6 on the TIME remaining so you get 6 fireworks :(
      I'm really surprised about the 7-1 fpg it did, since what it did there would actually waste a lot of time lol.
      No problem! Great vid!

    • @Joshua_Gomez15
      @Joshua_Gomez15 3 года назад +4

      Nice, kosmic watched this!

    • @zantly
      @zantly 3 года назад +3

      tbh i accdently did a wall jump on a pipe un 1-1

    • @Eshyyyyy
      @Eshyyyyy 3 года назад +1

      Gaming

  • @amanofnoreputation2164
    @amanofnoreputation2164 3 года назад +1095

    AI: executes frame perfect walljumps.
    Also AI: dies to *coins.*

    • @Chrispresso
      @Chrispresso  3 года назад +274

      Mario's greed ultimately killed him

    • @easyaspi31415
      @easyaspi31415 3 года назад +107

      Shiny, but deadly coins

    • @LancerloverLL
      @LancerloverLL 3 года назад +12

      I usually don't like comments but when this one said 99 I just couldn't help it.

    • @veggiet2009
      @veggiet2009 3 года назад +40

      @@easyaspi31415 I rate this comment an unbelievably exceptional 5 out of 5 fuzzies!

    • @ashleycd6487
      @ashleycd6487 3 года назад +11

      @@veggiet2009 we don't have royal fuzzies, and we don't have rainbow fuzzies. How about 5 *BIG CHUNGUS FUZZIES!?!*

  • @elijahrunyon3347
    @elijahrunyon3347 3 года назад +157

    Mario has no natural fear of piranha plants

  • @nguyentranduy7053
    @nguyentranduy7053 3 года назад +131

    Year 2030:
    RUclips notification popup: AI let's play episode 5 uploaded!

  • @harm991
    @harm991 3 года назад +91

    Basically the AI needs more different inputs in vision?
    (it has like 3 right now? Empt, Block or Enemy?)

    • @Chrispresso
      @Chrispresso  3 года назад +37

      Yep! Very good observation. The reason I did 3 was so I could give normalized values (-1, 0 or 1) in this case for the blocks. If I wanted to use more than the three I needed a way to encode the inputs (one-hot encoding or something similar) but I was running this on a pretty old laptop at the time and wanted to simplify the inputs.

    • @red-k2048
      @red-k2048 3 года назад +8

      @@Chrispresso DO it again with the right amount of inputs pls :D
      I'm super curious off AI limits.
      For example, if it thinks it found the fastest route, will it still look for a different even faster one.
      And will the AI ever discover he can go down the pipes ever?
      Is there a way to make it look for the highest score in the fastest way possible.
      Man I love AI, thank u for the video, I subbed btw ;)

    • @Corpsecreate
      @Corpsecreate 3 года назад +2

      @@Chrispresso You can make it a CNN, with multiple binary channels representing different types of objects.

    • @Chrispresso
      @Chrispresso  3 года назад +1

      @@Corpsecreate That's true. I might have to try that since it should use less weights overall as well.

  • @DyrianLightbringer
    @DyrianLightbringer 3 года назад +80

    when you stopped rewarding the AI for points, probably should have made it stop seeing coins

    • @Chrispresso
      @Chrispresso  3 года назад +31

      Because coins can be an indicator of when to jump I kept them in. Ultimately it may have been its downfall...

    • @laurinneff4304
      @laurinneff4304 3 года назад +14

      @@Chrispresso you could've maybe made it see coins as a separate thing, similar to how enemies are seen separately from blocks

    • @TrickShotKoopa
      @TrickShotKoopa 3 года назад +15

      @@laurinneff4304 ”The reason I did 3 was so I could give normalized values (-1, 0 or 1) in this case for the blocks. If I wanted to use more than the three I needed a way to encode the inputs (one-hot encoding or something similar) but I was running this on a pretty old laptop at the time and wanted to simplify the inputs. ” - Chispresso

  • @deano1
    @deano1 3 года назад +84

    Ai: I’m scared to hold the run button
    Also Ai: does three wall jumps in a row and first try bullet bill glitch

    • @Chrispresso
      @Chrispresso  3 года назад +27

      Maybe wall jumps are just easier than running. Maybe I've been playing wrong...

    • @Cyril29a
      @Cyril29a 3 года назад +5

      @@Chrispresso Well if it can only see three types of things, -1,0,1 then running limits interpretation time and leads to errors and death. Wall jumps are done on already interpreted object encounters so from its point of view I would say wall jumps are easier. Running is just too risky.

  • @BlueTelevisionGames
    @BlueTelevisionGames 3 года назад +61

    This was fun to watch!

  • @Selicre
    @Selicre 4 года назад +133

    An AI performing FPG? No way. This is by far the furthest I've seen this game taken, AI-wise.

    • @Chrispresso
      @Chrispresso  4 года назад +24

      Ya, I was very surprised that these AI were able to learn some of those tricks!

    • @scottbigbrain3944
      @scottbigbrain3944 4 года назад +3

      @@Chrispresso I am impressed with the breakthroughs that your ai's have been able to do. You should make tutorials for this stuff.

    • @johnforrestboone1
      @johnforrestboone1 3 года назад +2

      i am skeptical. using the algorithm time loss is not (in my observation) weighted heavily enough to merit the discovery of those glitches. those glitches save fractions of a second.

    • @vbag42
      @vbag42 2 года назад +3

      @@johnforrestboone1 THIS and it took years for some of the greatest Mario players to (kinda accidently) figure out these glitches and it also took a huge amount of game knowledge to come up with something like forward dash. Speedrunners were saving a pixel of forward movement cuz the world updated every 20 frames instead of every frame or something like that and this AI has what 10k generating of knowledge of smashing keys lmao

  • @ret4kind
    @ret4kind 4 года назад +92

    8:00 that's the exact location I predicted the AI can't handle. Still great work.

    • @Chrispresso
      @Chrispresso  4 года назад +12

      Thanks :D Glad you enjoyed! Ya... that section was just tricky in general unless you can either slow down or know that jump is coming. There are techniques that could get around that like using a memory. Maybe next time!

    • @skilz8098
      @skilz8098 3 года назад +6

      @@Chrispresso I'm thinking that maybe... have an extra backpropagation, rewind, instant replay type mechanism for the last couple of hundred frames only when he dies... This would be different from the long term memory of learned traits... This way, when the A.I. runs through a level and dies... upon death, the last few hundred frames or approximately the last 3 - 5 seconds of gameplay is recorded into a buffer net only when the death condition is met, and this is replayed through its own mini-neural net to be trained upon... Then these become learned traits upon the next trial... You may have to extend that frame count or time interval depending on the nature of the death... Was it contact with a creature, or was it from falling into a pit... if falling into a pit, then it depends on the height and time taken for the fall. You would want to rewind back to where he was at least a solid second or two on the previous stable platform... That and you may need to add in a dynamic look-ahead feature too.

    • @MaDrung
      @MaDrung 3 года назад +2

      OR anyone else for that matter. Thinking back on my childhood ;)

  • @yenkina
    @yenkina 3 года назад +38

    Does it possibly mean we could use AI to find speedrun glitches in the future ??! Interesting

    • @Chrispresso
      @Chrispresso  3 года назад +13

      Definitely! I'm not sure how long it took people to find out about the flagpole glitch or wall jumps, but it didn't take too long for this AI. So it's very possible to use it to find other glitches in all types of games/environments!

    • @henrikbrautmeier6534
      @henrikbrautmeier6534 3 года назад +3

      Automatised runs are already a tool to find bugs in the classic development process. But, usually the studios don't use AI for that

    • @snoo2496
      @snoo2496 3 года назад

      @@Chrispresso This is already used in celeste classic, with a few python scripts and some restrictions, it's not really an AI, just brute forcing with restrictions

    • @relic374
      @relic374 3 года назад +1

      Three things
      1) This game is already *super* optimized. It is possible, but unlikely in my opinion.
      2) There is such a thing as a TAS, which is when a human inputs inputs for a computer to execute. So I guess that's like AI.
      3) @Chrispresson I'm sure that wall jumps were ran into during development or at least the wall jump pixels.

    • @lostnumbr
      @lostnumbr 3 года назад +10

      @@relic374 a tas is just a predetermined set of inputs given by a person. it's nothing like a self taught ai. a tas isn't learning how to beat the game on it's own.

  • @veggiet2009
    @veggiet2009 3 года назад +13

    Did you know about Mari/o project beforehand? And if so did you tackle this project any differently?

    • @Chrispresso
      @Chrispresso  3 года назад +10

      Ya I saw MarI/O like 4 or 5 years ago or something like that and it's actually one of the reasons I first wanted to learn about AI. They are very different projects from what I can tell. MarI/O uses something called NEAT which basically allows the neural network to change architecture. I instead did a fixed architecture with a deep network and had a genetic algorithm control the weights of the network. NEAT has similar attributes to a genetic algorithm but not quite as good (my opinion) since it has to build the network from the ground up and often doesn't work well without re-training from one environment to the other. From what I can tell, MarI/O allows any box on the screen to be considered for input. I restricted mine to a certain view since I used a dense (fully connected) neural network. I'd say the biggest similarities are NEAT and genetic algo + neural network both rely on generations of improvement and they both use boxes of pixels as inputs. I also carried weights over between levels to help advance the next populations and to carry over some information like danger of enemies. Hopefully that helps and isn't too confusing!

    • @veggiet2009
      @veggiet2009 3 года назад

      @@Chrispresso very cool, I could tell that it was an improvement, as It seemed to be adaptive, though I couldn't quite tell why

    • @abrasmage
      @abrasmage 3 года назад

      @@Chrispresso is reinforcement any better than genetic?

    • @Chrispresso
      @Chrispresso  3 года назад +1

      @@abrasmage Hard to say if it's better or not. RL algorithms like A3C and PPO have seen a lot of success in video games though. I would say the main advantage of RL is that you let it learn even more by itself and let it figure out what it cares about.

  • @froginabox
    @froginabox 3 года назад +5

    how the heck did an AI discover the bullet bill glitch

    • @Chrispresso
      @Chrispresso  3 года назад +5

      Many AI had to be sacrificed to get to that point

    • @froginabox
      @froginabox 3 года назад

      did one of the instances just accidentally hit it with basically random inputs?

    • @Chrispresso
      @Chrispresso  3 года назад +2

      @@froginabox It's hard to know with 100% certainty since neural networks can sometimes be a black box. The best educated guess I have is this: since I didn't incorporate a way for the AI to know about the ticks, other than it can do something each tick, it most likely had an input that triggered an action + the action triggered by seeing the bullet bill. But because of how the input is formed, it would only be able to do the bullet bill glitch from around that area of the pink box. If the bullet was somewhere else, the weights of those boxes would be different and a bullet bill glitch might not have happened.

  • @GyacoYu
    @GyacoYu 3 года назад +6

    Please do one episode for Cat Mario 😂😂

  • @viniciusqueiroz2713
    @viniciusqueiroz2713 3 года назад +5

    Hi! Awesome job and explanation!
    I just wanted to point out the reason why the NN stops to wait for the Piranha Plant to go back down in the pipe, instead of doing what the speedrunners usually do.
    As you mentioned, your visual representation (on the left) uses one block per 16 pixels. That is, a ground block has 16x16 pixels, while your AI is only seeing one whole block. It thinks the Piranha Plant takes up the whole pipe (which would be 32 pixels in width), whereas there is a small gap in each side of the pipe that Mario can stand and stay alive while the Piranha is there.
    I know the model was running on an old laptop, and this workaround would take much more computational resources to train the NN (more than double, if you halven the number of pixels per input block), but I wanted to point it, just to guarantee you are taking that into account! =)

  • @warmCabin
    @warmCabin 3 года назад +9

    8:23 Shiny, yet deadly coins

  • @prekatori
    @prekatori 3 года назад +4

    5:15 why is the AI jumping into the coin block? Just a random reaction to an uncommon input?

    • @Chrispresso
      @Chrispresso  3 года назад +5

      Most likely. Neural networks can sometimes be described as "black boxes" since it can be hard to describe why the AI might choose a particular action given some arbitrary state.

  • @leomadero562
    @leomadero562 3 года назад +5

    moral of the story: coins are not good floors

  • @Allen_lena
    @Allen_lena 4 года назад +3

    So taking Mar I/O, deciding to use a fixed structure instead of NEAT, and giving it raw training time and you end up having wall jumps and FPG. That's crazy.
    I wonder how it would work if it could see outside of the pink box. Maybe not everything, but a maxpooling of what's outside, in order for it to see everything while keeping input space small.

    • @Chrispresso
      @Chrispresso  4 года назад

      You can make the pink box as large (tall and wide) as you'd like. I made the code pretty flexible with it.
      I thought about that but didn't end up adding it. Even if you use the blocks but pooled them into 2x2 for safe/unsafe/empty it could potentially help. Might end up trying that or even just try using a CNN.

  • @casperdewith
    @casperdewith 3 года назад +5

    8:26 Shiny yet deadly coins

  • @scottbigbrain3944
    @scottbigbrain3944 4 года назад +5

    You might want to expand the area that mario can see to include some of the area behind him. This way the ai could learn to avoid gumbas and turtles that are chasing him.

    • @Chrispresso
      @Chrispresso  4 года назад +4

      I thought about this but it wasn't an issue early on. By the time I realized I should have done it, I'd spend so much time training the current AIs that I didn't want to do it over.

    • @tails_the_god
      @tails_the_god 3 года назад

      @@Chrispresso hmm in a different version?

  • @copperymarrow1583
    @copperymarrow1583 3 года назад +3

    everybody gangsta till it does bullet bill glitch

  • @Mingura666
    @Mingura666 3 года назад +3

    If I may correct, at 3:56 it doesn't happen once every 60 pixels but once every 60 frames. Mario must jump in a specific way, with certain speed and hit a specific pixel. The game runs at 60 fps so Mario stands on that pixel for 1/60th of a second. During that little time he's standing on the block and therefore he can jump off of it. Your AI figured it out. That's scary and amazing.

    • @Chrispresso
      @Chrispresso  3 года назад +1

      Oops, sorry for the mistake, but thanks for the clarifications! Guess the AI knows more about it than me...

  • @namensklauer
    @namensklauer 3 года назад +3

    how the hell does this ai perform almost pixel perfect dodging of piranha plants coming out of pipes and walljumps with only 7x10 blocks input?

    • @craxypackets
      @craxypackets 3 года назад +1

      honestly, never looked into speed running much, but have played mario for 30 years. he's hitting the plant. how is mario not gitting hit by the plants? am i missing somethhing? a bug?

    • @Shrimp782
      @Shrimp782 3 года назад +1

      Was wondering this as well, from personal experience playing the game that would have killed me. Am I missing something there?

    • @craxypackets
      @craxypackets 3 года назад +1

      @@Shrimp782 honestly, i have no idea. i don't know enough about the game's quirks or bugs to say anything definitively, but it looks like, purely speculation mind you, the ai couldn't finish clean without getting hit by a plant so he used the game genie code for invincibility.
      but i just looked into that and apparently that code doesn't even work for plants, so idk.

    • @relic374
      @relic374 3 года назад +1

      @@craxypackets The hitbox is smaller than the plant's sprite, that's all.

    • @craxypackets
      @craxypackets 3 года назад

      @@relic374 oh, for sure. 100% that's the case, but 5:11 how much smaller than the sprite is the hit box here and the jump right after? lol i feel like if i was playing myself and i hit those spots, or even a little nearer the outside of the sprite, i'd have died. maybe not, but having played mario for 30 years, absolutely, without a doubt it would have killed me lol

  • @anterprites
    @anterprites 4 года назад +5

    Music is not needed and distracting (at least when you are speaking). Great otherwise.

    • @Chrispresso
      @Chrispresso  4 года назад

      Thanks for the feedback. I'll try to take that into consideration next time. Maybe lowering the volume more of background music when I'm talking would work?

  • @rozrewolwerowanyrewolwer391
    @rozrewolwerowanyrewolwer391 3 года назад +1

    You said that for long jump it needs to have certain speed, but you don't give speed information on input, so ai doesn't know what speed it has, and if it had smaller speed, long jump wouldn't work.

  • @Max-256
    @Max-256 3 года назад +6

    I would love to see one of those AI try Mario 64

    • @user_rKChwLeBqKYyurEfiSLFmCBNC
      @user_rKChwLeBqKYyurEfiSLFmCBNC 3 года назад

      yeah but it would be like very hard because it is 3d and the star system

    • @Max-256
      @Max-256 3 года назад

      @@user_rKChwLeBqKYyurEfiSLFmCBNC true, it might confuse the AI when it gets kicked from the level after getting a star

  • @Austin1990
    @Austin1990 3 года назад +4

    Awesome work! The fact that the AI got so far without differentiating coins from bricks is astonishing. It is such a drastic simplification that you more or less got away with. I find that far more impressive than the fact that it failed a level.

  • @Booyamakashi
    @Booyamakashi 4 года назад +4

    Doom speedrun! Or easier: Supaplex ;)

  • @hiteshKrawal
    @hiteshKrawal 2 года назад +1

    It would have been more satisfactory to watch if Mario jumps on the turtles.

  • @bbbbbbr4nd0n
    @bbbbbbr4nd0n 10 месяцев назад +1

    As the narrator is speaking at 9:03 the AI walljumps again on 3-1 to avoid death in the water.

  • @hawnshill7441
    @hawnshill7441 3 года назад +3

    I'm going to subscribe because I want to see the final results. Oh yeah this was in my recommended and it's the first video of yours I've watched.

    • @Chrispresso
      @Chrispresso  3 года назад +2

      Welcome! Glad you're at least being recommended things you're interested in! Definitely will revisit Mario in the future.

  • @melo-7904
    @melo-7904 2 года назад +2

    Ai in media: destroys everything due to faulty programming
    Ai in real life: merio

  • @gauravrewaliya3269
    @gauravrewaliya3269 3 года назад +1

    8:05 it die because Ai think it is a wall but that a coins
    U have to eliminate coins from there some how
    Nice work bro👍👍

  • @Wholetucook
    @Wholetucook 2 года назад +2

    i wanna do this but with other games but it seems so hard to make a neural network and a genetic algorithm i feel like it will take me my whole life to do something like this

    • @byattwurns1553
      @byattwurns1553 Год назад

      I heard the programming part is pretty easy. Just search up some tutorials!

  • @crazycanyon3028
    @crazycanyon3028 2 года назад +1

    What would happen if you put this in other games like super Mario maker

  • @anmolsingh9821
    @anmolsingh9821 11 месяцев назад +1

    can you please any other video of the setup of this mario code. I need it urgently🥲

  • @BabjiEManohar
    @BabjiEManohar 4 года назад +2

    Dislikes are by those who think AI will take over the world...

    • @Scn64
      @Scn64 4 года назад +1

      Today I master Super Mario Bros....tomorrow, the world.

  • @lordessofstrawberries1523
    @lordessofstrawberries1523 Год назад +1

    Can you make a tutorial for beginners on how yo set this up?? 😮

  • @Sarwex117
    @Sarwex117 3 года назад +2

    this guy didnt knew about LuigI/O

    • @LuigIO
      @LuigIO 3 года назад +1

      By the time they know, it will be too late... I will have already taken over the planet!

    • @Chrispresso
      @Chrispresso  3 года назад

      AI vs AI style

    • @LuigIO
      @LuigIO 3 года назад

      Apples vs Pears
      I have long since abandoned the project but it finished SMB1, SMB1 hard mode, SMB2J, and it reached world 6 in SMB3 before I shut it down.
      LuigI/O is now roaming the internet.
      If you want I can give you the code. Feel free to play around with it as much as you like

  • @Beastintheomlet
    @Beastintheomlet 3 года назад +1

    Now my curiosity is, what if you let you keep trying for even longer? Dedicated hardware just running for a year straight. Especially if it could know the difference between coins, ground and pipes etc.

    • @Chrispresso
      @Chrispresso  3 года назад

      It would probably come up with some pretty fast times!

  • @kriller3771
    @kriller3771 3 года назад +2

    Wow, I can’t believe the AI found fpg in 7-1. It’s so close to full flagpole glitch / bullet bill glitch, it would be so sick to see it get BBG.
    Also, just so you know, because of how floor detection works in smb1 wall jumping has a 5 Y-pixel window. So every block (16 pixels), there is a 5 Y-pixel range where you can hit a wall jump pixel and get a wall jump.

    • @Chrispresso
      @Chrispresso  3 года назад +1

      It would be! Maybe some day it will.
      And thanks for that. I thought it was just the one pixel, but I was just reading about it from some speed running websites and probably just misunderstood it.

    • @kriller3771
      @kriller3771 3 года назад

      @@Chrispresso Its actually a very common misconception that there is only 1 pixel you can land on, and not a lot of people know its actually a 5 pixel window, so places you read might have actually been saying its just a 1 pixel window lol. For example, this bismuth video about SMB3 compares the smb3 wall jump to the smb1 wall jump (link is time stamped), and this video says that smb1 WJ has only a 1 pixel window, and bismuth didn't know otherwise until I told him ruclips.net/video/4WoMl-fEPtc/видео.html

  • @smerchnochi4306
    @smerchnochi4306 4 года назад +2

    8:08 я тоже здесь умирал.( и никогда не мог дальше пройти
    It's my fail too.

  • @JustJory
    @JustJory 3 года назад +6

    Imagine an AI doing a TAS world record

  • @jodeboyd8386
    @jodeboyd8386 3 года назад +3

    last time i checked every other time it gets to a point where it stands next to the pipe and just looks at it

    • @Chrispresso
      @Chrispresso  3 года назад +2

      Do you expect a plumber NOT to inspect a pipe???

  • @BatBeardGames
    @BatBeardGames 3 года назад +2

    Brilliant I love this, just subscribed.

  • @Magma_Bolt
    @Magma_Bolt 2 года назад +2

    This video is absolutely amazing! There's one thing that really confused me though, how is it possible to record all of these games played by the A.I.? If there's the capability of finding a specific Mario's run which did specific things of interest and utilising the visual recording of their run to aid in the explanation of the technique being discovered it must have been recorded but I have no idea how it's possible to do so given the amount of data it seems that would need to have been stored given the huge number of runs?
    I'm also confused about how it's possible to find the point at which the AI discovered these strategies/techniques?
    Please can someone let me know? :)

    • @decyattysyachpchyol
      @decyattysyachpchyol Год назад

      He probably ran example runs with graphical output after X% clear rate.

  • @nxtboyIII
    @nxtboyIII Год назад

    Hey this is pretty cool. How did you transfer the onscreen gameplay onto the 16x16 grid show on the left side in your video?

  • @LeinaDZiur
    @LeinaDZiur 3 года назад +2

    4:36 - The AI has learned something we call 'swag'

  • @MrBemnet1
    @MrBemnet1 3 года назад +1

    do you make it fail l so that you could make a future video

    • @Chrispresso
      @Chrispresso  3 года назад

      Haha I wish. Although, I think I've got some ideas for how I can get it to beat that level.... and potentially more levels.

  • @robgable2426
    @robgable2426 3 года назад +1

    Hey!! Take it easy there Skynet!! We don't want Terminator Mario running around looking for turtles to murder do we?!! 🤔😅

  • @RainMyst
    @RainMyst 3 года назад +1

    can you make the ai copy world record speed

  • @thesterndragoon9159
    @thesterndragoon9159 3 года назад +1

    >The A.I. killed 12 million Marios
    *Bowser has entered the chat*

  • @captainwilliams1325
    @captainwilliams1325 3 года назад +1

    shiny yet deadly coins, now bane of a.i.

  • @ArachmadiPutra
    @ArachmadiPutra 3 года назад

    that WALL JUMP stuff was not humanous, yes, its ai after all 😂👍👍, but overall, hmm i cant just say it perfect... its beyond perfect for me

  • @PastaMaster115
    @PastaMaster115 2 года назад

    I'm curious to see what it would do in a X-4 level.
    Also why was the AI almost constantly using the "up" input? Up has very little use in SMB.

  • @whk6091
    @whk6091 3 года назад +1

    Now, IA learn cat mario

  • @HeduAI
    @HeduAI 2 года назад

    Thanks for this awesome video! Can you please tell what is meant by "a total playtime of 5 years"? How are 3 weeks of training time equivalent to 5 years? Thank you!

  • @disfiguringthegoddess1102
    @disfiguringthegoddess1102 3 года назад +1

    Able to bulletbull glitch. Can't beat coins.... interesting

    • @Chrispresso
      @Chrispresso  3 года назад

      I used the same input for blocks and coins and grouped them into "safe blocks". If I gave more inputs it would be able to differentiate the two.

  • @kyx-001
    @kyx-001 3 года назад +1

    I'm sad that this video is probably copyright claimed

    • @Chrispresso
      @Chrispresso  3 года назад

      It is from the music. I'm discovering music you think is free to use isn't always as free as you thought.

  • @Scn64
    @Scn64 3 года назад +1

    It took a while but after 549 generations, it managed to defeat world 8-1.

  • @TheMazyProduction
    @TheMazyProduction 3 года назад +2

    Awesome video man, you got a sub.

    • @Chrispresso
      @Chrispresso  3 года назад

      Glad you enjoyed it and thanks for the sub!

  • @LancerloverLL
    @LancerloverLL 3 года назад +1

    AI is an incredible thing and I'm looking forward to it improving many aspects of our life. I am most excited about autonomous cars. Just imagine how many hours, weeks or even years of our lives are being wasted away staring through a windshield every day.

  • @electra_
    @electra_ 3 года назад +2

    Really interesting! I've worked on a very similar project myself that was an extension of Sethbling's MarI/O called LuigI/O, which was eventually able to beat all the levels (though it required separate neural networks for each level, and often multiple networks per level. I think it overfitted too much.)
    I'm impressed that this was able to find the bullet bill flagpole glitch.
    Were all the final runs you showed using the same final network, or did each level need a different network? You said some of the things were shared, referencing the wall jump, but to be honest I kind of feel like a lot of the wall jumps that AI find are pure luck, especially since the inputs provide no way to actually time anything frame perfectly or pixel perfectly as they are only 16-block precise. Also, how does it fare on the other levels like the -2, -3, and -4 stages? You only showed the first level of each world here.

    • @Chrispresso
      @Chrispresso  3 года назад +2

      Ah, so that's what LuigI/O is! Just looked up the channel and that's pretty cool!
      They were different neural networks. They used the same base from previous levels but could change if they needed to. So the weights from 1-1 carries to 2-1, then 2-1 to 3-1, etc. Ya I don't think wall jumps were intentional, but once it knows it, it's pretty easy to do again. Since it's able to see ahead for the blocks, a lot of times it would do a small jump into a wall jump. Obviously it only works under certain conditions though since the weights are unique and not shared like in a CNN.
      I still need to test on other levels like -2, -3. Originally I had planned to but the states I needed for OpenAI gym weren't there and only included the -1 stages. I do plan to come back to this in the future with a more advanced AI and see how it fares compared to this AI and finally test it on all stages (-1, -2, -3, -4).

    • @electra_
      @electra_ 3 года назад

      ah, okay the weights just carried over, yeah that's what ours did as well. But, it's impressive you were able to beat up to 7-1.
      8-1 is an extremely hard level since it's the longest one in the game. I never thought about the coins fooling it since they look like blocks to the input viewer, but that could certainly be a reason why it screws up there. That would probably be pretty easy to fix. Definitely a lot of cool things you can add to try and improve this!

    • @Chrispresso
      @Chrispresso  3 года назад

      @@electra_ I imagine there will be a few levels that will give it difficulty when I try again. Anything with warp pipes might be a problem since I'm not sure how to encode some of that information or what it will look like to the fitness of the individual at that moment. Definitely excited to try out some new techniques though!

    • @electra_
      @electra_ 3 года назад

      only level with warp pipes that really matter is 8-4, and that level is... basically impossible for AI lmao
      there's both land and water movement which work totally differently, there's pipes that you have to just know which one to go down exactly, there's a section with a required hidden block (or wall jump) and it's long. I believe LuigI/O needed 3-4 networks split up over various points to beat it at all, as well as a custom fitness function to tell it when it was on top of the high pipe, and a penalty for whenever it passed the pipe it needed to go in.

  • @NeunEinser
    @NeunEinser 3 года назад +1

    Shiny, yet deadly coins.

  • @IanHollis
    @IanHollis 2 года назад

    I'm always curious why people give the AI nothing to go on. Not even the most simplistic of instructions such as Hold B = Fast, A = Jump. Like, just inform it at least of what the controller buttons do, if not the more important parts of the original instruction books. I think of it like giving to a child whose never seen a game console before.

  • @Tricolorrr533
    @Tricolorrr533 3 года назад

    So when i play it piranha plants can actually harm Mario and when the AI plays it piranha plants are just part of the background? Fair enough

  • @cYObEL
    @cYObEL 3 года назад

    oh cool its robario's older brother maribot
    h-have we told maribot the passing of robario (;∞;)
    Rest In Piece, Robario. (;∞;)

  • @Odds15
    @Odds15 3 года назад +1

    Wasn't there a 24/7 Livestream on this?

    • @Chrispresso
      @Chrispresso  3 года назад +1

      Not by me but I know someone commented before that there is something called LuigI/O based off MarI/O. I know LuigI/O did some live streaming and MarI/O I think may have as well.

  • @Sasparilla_
    @Sasparilla_ 2 года назад

    so now i understand, this is super simple actually.
    all an AI does is:
    subtly change what their ancestors did, get Darwin'd out of existence, repeat.

  • @DukePotatoNuke1
    @DukePotatoNuke1 6 месяцев назад

    Today i learned that SkyNet got it's start by playing Super Mario Brothers. Now, all it has to do is remove the human race and nobody can get more points than it does.

  • @hi_tech_reptiles
    @hi_tech_reptiles 3 года назад

    Do this with something from TG16/PCE like Bonk lol. Tho the SNES version of Bonk is even better imo. Amazing music tho...

  • @jean-pierrecarambar6609
    @jean-pierrecarambar6609 2 года назад +1

    Could you do a tutorial of how you did this pleeaaaase ? That's awesome !!

  • @Colddirector
    @Colddirector 3 года назад

    Oh man, at this rate that old creepypasta about the guy who leaves a quake server full of bots running a genetic algorithm for 10 years is finally going to become real, lol.

  • @VarunGupta3009
    @VarunGupta3009 3 года назад

    How about use a combination of both supervised and unsupervised learning... Unsupervised for teaching it the basic physics and game mechanics, followed by supervised training of all valid world records in history. It will automatically just make the fastest speedrun in the world, with very few, if not 0, generations of training.

  • @mokgatlha
    @mokgatlha 6 месяцев назад

    Hi, whereas this AI applied to games, what about another interesting aspect of AI application, making AI trade binary options, obviously on demo accounts and to see what best or winning strategy the AI will adopt to maximise its wins. Whereas most of the games require keyboard inputs, so are the trading of BO, they require Keyboard inputs, it will be interesting to see what AI does.

  • @hugo-garcia
    @hugo-garcia 3 года назад +1

    AI : Learn to play super mario bros
    SpeedRunners : Hold my beer

  • @PalaceDude
    @PalaceDude Год назад

    I feel so stupid, my whole life I did not know you could jump on a wall like that, and this AI figured it out on the second world. Bruh.

  • @laytonjr6601
    @laytonjr6601 3 года назад +1

    Techniques I recognised:
    Jumping over plants
    Finish at the top of the flagpole
    Walljump
    Fast acceleration
    Wtf how did it discovered the flagpole glitch

    • @Chrispresso
      @Chrispresso  3 года назад

      Now imagine if people didn't know about the flagpole glitch yet. The AI could have introduced speed runners to a new technique!

  • @barowt
    @barowt 3 года назад +1

    I want to see AI learn to play the Japanese Mario 2..

  • @JB-mm5ff
    @JB-mm5ff 3 года назад

    It needs to see the entire screen to help judge running potential, and it needs a "memory" so that it can remember stages it's done already that it knows will repeat. AI 164.
    PS: Also why not micro the thing into pixels just as its "memory" macros it into stages, events of value, mobs, etc.?

  • @ikeyasector
    @ikeyasector 2 года назад

    I would like to see an A.I. try to play Robowarrior (a.k.a Bomber King in Japan). It's a NES game that came out in the late 80's and has really good music. The reason why I suggest letting the AI give it a try is that it's not near as complex as Zelda but it is an exploration game with no time limit. The AI will have to learn that not only enemies can harm it but it can also be harmed by it's own bombs. In order to finish a level, the AI will have to find a treasure/key otherwise the level will just keep looping until it does. That may turn out to be good, or bad if the AI doesn't learn that it must find this one (sometimes two) thing to make it to the end of a level. There are also items that aren't necessary to finish a level so you may or may not want the AI to access it. If not, then don't allow it access to the select button. Anyways, would be interesting to see what it does.

  • @saqibperwaiz4043
    @saqibperwaiz4043 3 года назад

    Brother it would be very helpful if you could suggest topics that I should learn related to this.I know basics of Neural Network and have started learning Reinforcement learning.

  • @AshtonScripts
    @AshtonScripts 3 года назад +1

    next time do ai learns to play super mario 3d world

  • @Steev42
    @Steev42 3 года назад +2

    Aww, I really wanted to watch one try one of the maze levels.

    • @Chrispresso
      @Chrispresso  3 года назад +1

      Don't worry. Next time it will

  • @meyers0781
    @meyers0781 3 года назад

    Next try:
    AI beats an off-the-shelf bot of a shooter game versus mode (Valve would be the easier one to cooperate with the development, and either Doom or Unreal Tournament is the perfect training environment)
    After it achieves winning streak, the learned AI would take the place as the bot
    A new AI is instructed to beat that learned AI bot
    After it achieves winning streak, the AI would be made as the harder level of the previous AI

  • @avo_k
    @avo_k 4 года назад +3

    you are currently my favorite channel on youtube, your content is absolutly amazing ! thank you very much for all those clean, simple, begginer friendly videos ; and thank you even more for the code

    • @Chrispresso
      @Chrispresso  4 года назад +1

      Wow! That means a lot! Thank you! I definitely want to make sure the content stays beginner friendly and have been thinking about including some bits of code in the videos but haven't been sure. Also considering doing some stuff with Unity to get some eventual better graphics and environments for AI.

  • @NithinJune
    @NithinJune 3 года назад +1

    Veri nice

  • @roland9189
    @roland9189 3 года назад

    How about Jump King? That should be fairly easy for an AI to learn, given the limited number of outputs.

  • @chariouibouchaib4416
    @chariouibouchaib4416 Год назад

    Hello Chrispresso.
    Do you know Dofus Retro - Ankama?
    Could you code and Ai who can learn to make a battle with monsters and win it?

  • @BlackMaleLion
    @BlackMaleLion 3 года назад

    I’d like to see what an AI could do in Skyrim.
    Fortnite and Legend of Zelda Twilight Princess would also be interesting to see.

  • @ericrosenblum
    @ericrosenblum 4 месяца назад

    In the video it said you trained about 5 years in 3 weeks... What hardware or cloud did you use for training? Would you recommend said hardware? How does training time compare to get to a similar level using other algorithms?

  • @googleyoutubechannel8554
    @googleyoutubechannel8554 Год назад

    The irony of all these Mari/o style 'AI's is that the creators don't seem to grasp even the basics of the problem space. 99% of the 'learning' that goes into these genetic algo AIs has nothing to do with the genetic algo, the human has already done the 'intelligent' work by compressing all the dynamics of the problem space presented by the game, using human intelligence, into a simplified interpretable input state.

  • @spyr0guy
    @spyr0guy 3 года назад +1

    shiny yet deadly coins

  • @aaronwise1089
    @aaronwise1089 3 года назад

    AI is simple to make just give it a variable for actions to pick from using the function called choose(0,1,2,3) 0 makes it choose again so it is still thinking and not doing anything and 1 for left and 2 for right and 3 for jumping next you need a da list to store all of the mistakes the AI has made and the conditions of the states it is in and then limit the number of choices the AI has
    Example
    AI walks along to the right and falls into a pit
    Next time
    AI decides to walk along to the right and sees the pit where the AI fell
    AI jumps as well as moving to the right attempts to get over the pit

  • @FriskMeemur
    @FriskMeemur 3 года назад

    the computer was smarter than 95% of people who play this game (including me)

  • @mmkm78aaa
    @mmkm78aaa 3 года назад +1

    Lower the f music.

  • @kekw1336
    @kekw1336 3 года назад

    Says 16x16 but when you calculate the grid it is 16x15 ... now I am very sad and depressed

  • @oktayyildirim2911
    @oktayyildirim2911 3 года назад

    The background music seems extremely inappropriate, and it's quite distracting.

  • @KSATica
    @KSATica Год назад

    how are you able to show the matrices on the left side screen and map performace of whats mario doing.