3 ms·
I recalled watching an old video of a casino guy talking about card shuffling. I think he was talking about randomization of the cards to catch card sharks, or
by blackrock 6y ago
I recalled watching an old video of a casino guy talking about card shuffling. I think he was talking about randomization of the cards to catch card sharks, or something.
He even had a computer program simulate the hand shuffling. I’m not sure if it really did simulate it, but the video graphics showed it was hand shuffling.
So one day, I thought I could simulate it myself.
So I wrote a program to just do the manual shuffling in logic. Like split it roughly in half using a random value. Then do the merge shuffle, again using random card counts per level of the merge. Then to do the rifle shuffle, again using random counts. Then to finally do the random cut. All the steps that you would use to shuffle the deck of card when playing at home, or in the casino.
I found that after a few shuffles, the deck seemed sufficiently randomized. My untrained eye couldn’t find any patterns.
My program didn’t have the wizbang of animated graphics, but it solved the problem at hand, which was to generate a random sequence of events, and to replay it again to study it.
Not sure what I did with the code though. I must’ve lost the code somewhere.