How I Accidentally Broke Luigi's Casino Using Toad

571,077
0
Published 2023-05-04
Many of us will remember Luigi's Casino from New Super Mario Bros. and Super Mario 64 DS mini-games. His Casino mystified us while offering us free mini-games we could get lost in. But I always wonders - was Luigi's casino actually fair? So, I spend months trying to uncover what went into his RNG, and found that actually, we are able to break his casino and win EVERY single hand.

find me live over on ‪@alsoalax‬
like the music in the video? find it here ‪@alaxsonder‬

All Comments (21)
  • @relaxalax
    I spent way too long on this experimenting, testing, and trying to crack the code. And somehow... I did. All with the help of Toad. Please like the video, it helps me out a lot.
  • @10upstudios
    "verifiably true that luigi is worth less than mario in the lore" nonsense, its luigis casino, he's just humble and loves his bro!
  • Took hours for Alex to learn the lesson the Courier learned in a second: the game was rigged from the start
  • @bigsoulja73
    Why is Dr.Mario allowed in smash, but not degenerate gambler Luigi?
  • @OhNoBohNo
    I can't believe Toad's been trying to help us cheat-out the smug Luigi for ten whole years
  • @AssassinoJake
    Luigi once hit me with 5 of a kind with luigi cards... you got to respect the luigi
  • Btw the reason toad changes which card you get after a rotation is (probably) because he does an rng call each time he starts a new rotation to choose which one to do. Remember that rng is usualy the same for most stuff so any object that calls rng will change the rng everything else that calls it afterwards.
  • @flashdr1ve
    the luigi casino minigames stole hours and hours away from my childhood, thanks for the video alax!
  • @CitryteYT
    As soon as you mentioned toad, I realized something. The way the DS works is like the GBA before it, where it loads up a list of random numbers based on a seed when a game is loaded, and then uses the number at the front of the list for anything that uses rng and then deletes it, moving on to the next one. So, when toad comes out onto the floor, he randomly decides what path to take to the other side, burning a number from the list, which is why your hand changes the way it does every toadtation.
  • @PunishedHobo
    I played this game so much as a kid, I legit started to get a feel for how Luigi played. It got to the point where I could consistently clean house. After years of shelving the game though, I lost my feel for it, but I'll never forget how Luigi taught me to become a poker master.
  • @LRFLEW
    I've actually been recently messing with Picture Poker, and while I haven't done anything like a decompilation with it (yet), I do have some insights into it that might be helpful. Your intuition that it uses a 30-card deck is correct (though with some implementation weirdness I'll get to). I had originally read that online, and was able to confirm that using memory watch. I also read, but didn't independently confirm, that Luigi's strategy is always to keep any matched cards and replace any unmatched ones, which sounds like the most likely strategy from what I've seen. I also did find the memory locations to look at Luigi's hand, as well as the status of the deck, and could probably figure it out again if you wanted to use that yourself. I didn't spend much time analyzing the RNG algorithm, but your observations do make sense based on what I did look at. My guess about the toadtation thing is that Toad has a handful of paths he can take around the casino, and every rotation, he calls the RNG function to choose which one to use. This has the effect of incrementing the RNG state, which causes the shift in the output cards you're seeing. As for the Schrodinger's Luigi, I think I know what's happening there. You see, the game doesn't really treat the deck as a single shuffled entity. Instead, the game essentially keeps six stacks of cards, one for each face value, and randomly chooses which stack to draw from whenever it needs another card. This explains the toadtation system as well, as the value of the card isn't decided until the card is actually drawn. The Schrodinger's card almost certainly happens when the game randomly chooses a stack that's already been depleted. I noticed that all of the examples you provided of the phenomenon were cards turning into the value of the card that "fell off the front." I don't remember exactly how the game handled the situation, so I'm not sure why sometimes it rounds up and other times rounds down, but I can look into that. Lastly, I just want to give a quick warning: Luigi's initial five cards are chosen at the same time as your five initial cards are, so some hands simply won't be possible even when manipulating toadtations if Luigi drew a card you need. Also, discarded cards aren't "shuffled" back into the deck until after the end of the entire round, so neither you nor Luigi can draw a discarded card as a replacement card.
  • Childhood memories with New Super Mario Bros. As a kid, I was admittedly addicted to playing these once I hit the maximum amount of coins.
  • @xDarkAwesome
    Thanks Luigi for enabling my gambling addiction! I probably spent more time playing his casino games than the main game itself (looking at you New Soup DS)
  • @luigiboi4244
    I always find it interesting when a madman spends their free time deciphering something that they love with a passion, like those Zelda YouTubers who have been going feral for 5 YEARS about the Zonai. By madman, I mean that what they do is insane and I respect them for pulling it off.
  • @cheeseboy2251
    “Keep being stupid. It will work eventually” is the perfect motto to live life by
  • @Sharff514
    If you actually figured this stuff out on your own, you are a secret jimmy neutron level genius.
  • I like the fear quirk only happens with the unknown and generally scary things but if he knows whats going on he can just chill harder then anyone, enjoying gambling to take the stress off but he's the dealer so he gets the excitement for free forever, probably secretly rooting for you but if you lose that's just the game.
  • @JeremyBX
    6:47 me aggressively trying to convince my friends that Mario's third brother Ravingu has always been available in every mainline Mario game with a very specific button code
  • @Cyber_Yeast
    Can’t wait for Alax to get a gambling addiction
  • @smackjack78
    The Luigi mini games in 64 DS only took up a few minutes of my childhood because I didn’t know where to unlock Luigi for the longest time, but once I found him (and Wario by extension), it was over