Rendered at 10:05:11 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
possiblywrong 17 hours ago [-]
The article deserves several clarifications:
> The deck has to be cut more or less in half before shuffling.
"More or less" is doing some heavy lifting here. The original GSR shuffling model cuts the deck at a point that is binomially distributed, so that for example about one-fifth of the time the cut may be at least as asymmetric as a 21-31 card split, which I think most would agree is nowhere near "the precision of a professional magician."
Also note that the theorem in the paper really focuses only on relaxing the cutting model; the model of subsequent interleaving of the resulting piles is the same, dropping a card from a pile with probability proportional to the size of the pile. (Equivalently but perhaps less intuitively, for the original GSR model with the binomial cut, imagine flipping a fair coin for each card in the deck, then "de-interleaving" by sliding the "heads" cards out, preserving their relative order, and placing that pile on top of the remaining "tails" cards.)
> But with that seventh shuffle, the deck suddenly tips into a highly unstructured state.
More accurately, the total variation distance from a uniform distribution first drops below 0.5 at seven shuffles[0]. The actual cutoff phenomenon's asymptotic result would suggest 3/2 lg n shuffles for a deck with n cards, which for n=52 would be closer to nine shuffles.
Why does it matter that only the cut is imperfect? Isn’t an imperfect interleaving also expressible as a modification to the unevenness of that left/right pile split? It seems the “0110” system doesn’t track relative order of cards but only the landing of each card, which allows each left/right landing to be treated as an independent event. If there’s no dependency on card order, modifying the cut split is a simple way to express both an uneven cut and imperfect interleaving with one variable.
But that assumes the model is only tracking cards’ arrivals in the left and right piles, not their ordering relative to one another. I only got that from the article.
Am I missing something? Is it that the left/right split is actually only informative about the amount of mixing that has occurred under the assumption that the interleaving was perfect, and therefore if imperfect interleaving is possible then one must weaken that guarantee - which then requires a more complex tracking system?
pmarreck 17 hours ago [-]
If, instead of doing a binomially-distributed cut, we do a 2-step cut which consists of first a random cut (then take the bottom portion and place it on the top, which in essence shifts all the cards by a random amount), and THEN do a perfect half-and-half split to perform the actual shuffle with?
Would that get us closer to "random enough", quicker?
vessenes 19 hours ago [-]
Ironically seven perfectly interleaved riffle shuffles will return a deck to its original order, so the title is spectacularly wrong for one famous result.
Also the new result is cool! (14 semi bad riffle shuffles are sufficient to mix)
zahlman 18 hours ago [-]
It requires eight perfect riffle shuffles, not seven. (I just checked at the Python REPL.) And actually it depends on whether the riffles are done "in" or "out" (i.e. which half of the deck the new top card comes from).
I had understood that seven "typical" riffle shuffles produce good randomness.
WillAdams 17 hours ago [-]
Yeah, my father could do that consistently, and used it to teach me "Always cut cards" having also memorized the card order for each shuffle --- I guess being on a troop ship for weeks on end had to have some sort of up-side.
Nick Scarne is an interesting name to look up, and his writings are almost on a level with his facility to manipulate cards.
pmarreck 17 hours ago [-]
I love the fact that he intended to become a card shark but his mom steered him towards magic instead, and then he got hired by the US Army to teach enlistees about the various scams they might encounter overseas, in addition to serving as the "hands" for Paul Newman in the movie The Sting, which was about conning a mob boss? Damn, "interesting" is apt!
Whenever someone acquires a morally-neutral skill (like "card manipulation" or "martial arts") that can be used for "good" or "evil" and chooses the former, that's almost always a good story... especially if they flirted with the latter...
PaulHoule 18 hours ago [-]
Well I'd imagine a "perfect" shuffling procedure would have an equal probability of all 52! possible outputs which includes the original input and one would expect the sequence that gets you there would be highly symmetric.
RNanoware 21 hours ago [-]
Anecdotally, I find that certain card games are more enjoyable with the imperfections of human shuffling: when clumps naturally arise after playing, packing, and unpacking the game several times. An element of organic personality arises when you see a sequence of cards from a previous game. That human element is lost when a computer perfectly shuffles a deck into a never-before-seen orientation.
brookst 21 hours ago [-]
Games that sort the cards are the worst / most interesting for this. Gin rummy, etc, where the end result of a game is sorted groups of same-numbers and runs. You can really tell when then shuffling has just transposed a few cards.
PaulHoule 17 hours ago [-]
I am in a tarot group where we have a lot of decks that people share. Many tarot users believe that a deck develops a personality specific to the user and because of that I got my own deck which I take to the group.
There's the general belief that all magical tools develop significance for the user over time, something that my wife who is a "secular green witch" who doesn't believe in psi at all would tell you all about.
Scientifically though, if somebody isn't a good shuffler their deck is not going to be well shuffled and they'll get readings that deviate from what you'd get from a well shuffled deck. It's harder to shuffle a tarot deck well because it has more cards and these are frequently larger. (Personally my riffle shuffle is awful and probably not much better than an overhand)
A new deck usually has the major arcana together and in order and other cards might be sorted by suit and then number. We do a 5 card spread and if your have a new and poorly shuffled deck of course you are going to have more spreads where you get both the Emperor and the Empress or the 4 of Swords and the 7 of Swords.
retrac 3 hours ago [-]
I find significance in the shuffling and enjoy it. Always overhand. And very thorough; I have a perhaps overmechanistic view but I suspect effective divination requires true randomness in the information theory sense.
AndyNemmity 14 hours ago [-]
One of the things is, I do magic, and used to do tarot.
I found the tarot readings were infinitely better to the person getting the reading when I just forced the results. So I did.
I still did all the things you're indicating about talking about specific personality, etc, as the patter to the concept.
PaulHoule 11 hours ago [-]
Yeah, I see a lot of people doing tarot readings for money but I don't see myself doing that.
I got into the tarot group because it's not so easy to find a therianthrope's guild!
From a scientific perspective there is a lot to say for randomness. Like the theory that the I Ching was a version of game theory from bronze age China. I recently created A System of Blessings with 13 selected characters from the I Ching because I wanted to give people something nice but didn't want to give everybody the same thing.
AndyNemmity 8 hours ago [-]
I never did it for money. I did it for free. My joy was in their joy.
My job was to heighten their experience, and to essentially act as a mini therapist enabling them to feel confident in their own decisions.
But I feel you. I did things entirely differently to everyone else. Which is why I thought it was an interesting story.
PaulHoule 7 hours ago [-]
Myself I charm people with fox magic to melt them into puddles before I photograph them
Magic the gathering has this problem. You have 2 types of cards, and drawing an imbalanced mixture is pretty detrimental. During play you tend to sort them into 2 piles though. Consequently it's a not uncommon sight to see people manually interweaving their cards after a match, then shuffling. Logically, this is either pointless or cheating depending on the quality of that shuffle, but people do it anyways haha.
th0raway 17 hours ago [-]
There's quite the history of straight out cheating in high level MtG, and yes, insufficient randomization is one of the most typical ways around it. If all you do is cut their deck, and do zero shuffles, you will find a perfect interweaving of lands and spells either way.
Also see Magic players being fond of pile shuffles, which, of course, do very little randomization, and guarantee a good mana weave. Without a few shuffles of your own, most Magic decks ever presented are not sufficiently randomized, and it's even worse in Commander, where we are talking 100 card decks.
AndyNemmity 14 hours ago [-]
The interesting thing is, the cheating in mtg has always been so, ridiculously bad.
If anyone actually cared, and really learned the moves, it would be imperceptible, even on camera, but instead regularly players get caught doing the dumbest of obvious things, even while on camera.
bombcar 11 hours ago [-]
There's even a form of bridge related to this IIRC, if a hand is passed out (nobody has opening to start the bidding), you stack the hands on top of each other and don't shuffle - because players organize their cards by suits, it always results in fun.
soared 22 hours ago [-]
Upper limit of 14. I’m curious then - when playing cards with friends we start with a semi -random, but definitely clumped, deck. It gets shuffled a couple times.
How random is that deck? How many “cold spots” does it have? Just how not random of decks are people playing with, and ultimately does that even matter if players lack the knowledge or skill to change their play because of that knowledge?
fisian 14 hours ago [-]
There's this numberphile video where Persi Diaconis tells a story about bridge and how the players got used to not totally random shuffled decks: https://youtu.be/RIGJH12vVCY?si=cMSx6YEr8MMFgYg6
(Starts at around 3:30).
fisian 14 hours ago [-]
Numberphile has a video with Persi Diaconis about the seven perfect shuffles. It gives a lot of insight and anectdotes in addition to the central theorem: https://youtu.be/AxJubaijQbI?si=ED7ufY4oPZnNxCbd
capitol_ 22 hours ago [-]
Shouldn't a perfect shuffle just reorder the cards without adding entropy?
You would need sloppy ones to introduce randomness.
jtbayly 21 hours ago [-]
A "perfect shuffle" according to the article:
>The riffle shuffle has to follow a realistic but strict model where cards are randomly interleaved from the left or right pile one by one. (Each card gets dropped from either the left or the right pile with a probability that’s proportional to the number of cards remaining in that pile. This means that the cards don’t simply alternate between left and right, which would result in a predictable structure; instead, the order might go “left, right, right, left, right, left, left.”)
HPsquared 22 hours ago [-]
It's modelled with randomness, each card is taken from left or right with a probability, it's not a deterministic model.
myrmidon 21 hours ago [-]
You misunderstood because the title is ambiguous.
This talks about seven consecutive riffle shuffles ("cut the deck and interleave the piles"): Those are not a "perfect shuffle" (i.e. same probability for every permutation) by themselves, only after doing them several times consecutively (which is kinda suprising by itself).
soared 22 hours ago [-]
I don’t know on perfect shuffles but for the sloppy shuffles, the deck is cut at a random location between each shuffle.
aureate 22 hours ago [-]
See the paragraph beginning "Yet terms and conditions also apply."
empath75 20 hours ago [-]
Yeah, a "perfect" shuffle is known as a faro shuffle and it's the basis of a lot of magic tricks, but it's a weird looking shuffle and it sort of ruins the tricks once you can recognize it.
AndyNemmity 14 hours ago [-]
not a lot of magic tricks. quite few actually. and it's interesting that it ruins the trick for you, because it's still a quite hard maneuver.
as a magician, I'm always still impressed when I see perfect faros.
mrandish 6 hours ago [-]
Yeah, I worked on getting a Faro for a while when I was a teenager but gave up on it after a few months. I even got some coaching and tips from the Professor and Earl Nelson, so the issue was definitely not a lack of knowing the best ways it's ever been done :-). I just couldn't get it quite reliable enough to 100% trust in performance. Plus most of the Faro effects that were hot at the time were poker stacks and I was never really into those plots.
Now, all these decades later, I don't regret giving up on the Faro and a burnable 2nd. I got along just fine without either one as there's so many ways to reach the same destinations. It's weird how some moves just 'speak to you' right away and others never seem to sit right. Best advice I ever got was to not force it. If progress stalls out, just move on.
You going to Magic Live this year?
fartcoin67 21 hours ago [-]
[flagged]
esalman 16 hours ago [-]
Unrelated but the animated photo of the magician performing a shuffle really shows how advanced, efficient, and deliberate our limbs are.
I randomly came across a 1979 bbc documentary on "Word Processors" on YouTube yesterday. Even though I wrangle terabytes of data using AI agents everyday now, it still felt like magic to imagine myself seeing the documentary for the first time in 1979.
ecolonsmak 21 hours ago [-]
"...unique tracking label for every card in the deck"
I'd like more details on how this was accomplished on a practical level. Got me thinking about how to embed trackers thin enough to go into a playing card that would operate like a mesh network then the deck could self report once it's properly randomized making a green light go off indicating play may begin.
layer8 20 hours ago [-]
They didn’t do this practically, the “tracking label” is just an analogy to convey what they did mathematically. The word “barcode” is also only used because it might be more accessible to the layperson than “bit sequence”.
hdndjsbbs 19 hours ago [-]
This is just the authors explanation to explain how to encode where a card ends up. The cards don't actually have barcodes, they have a binary-encoded number where a 0 indicates the left pile and 1 indicates the right pile during a specific round of the shuffle. The number encodes the journey that card makes during the shuffle. It's not an actual barcode.
empath75 20 hours ago [-]
There are actually "marked" decks you can buy that come with an iphone app that tell you exactly where every card on the deck is by looking at the side.
WorldMaker 18 hours ago [-]
Marked decks are an ancient tradition for both cheaters and magicians. There are also ways to mark a deck that aren't obvious to most people with a casual inspection and that don't need an app to read from the edge.
empath75 15 hours ago [-]
Yeah, but there aren't ones that will give you the _entire stack_ in less than a second from a glance at the side of the deck.
WorldMaker 11 hours ago [-]
You might be surprised at how close they sometimes get, at a glance. For close up magic it has to be readable at a quick glance (without an app). For some of the cheating it has to "not even be a glance" because you can't get caught looking at the side of a deck.
To be fair, sure most of those marking strategies are approximations designed for a specific trick or a specific gambling game and so don't always need to be 100% of the state information (suit and rank of every individual card). But there are certainly close up magic reasons to have a deck you can find exact cards by marks. Though also to be fair, many (but not all) of those do move the marks to the back of the card with the assumption that you can at least spread the backs of the cards.
vanderZwan 17 hours ago [-]
Does this new proof have any practical consequences for determining if a PRNG algorithm is any good?
And 8 perfect shuffles resets it back to starting order (perfect being cards interlaced 1 by 1)
brookst 21 hours ago [-]
So just do -1 shuffles and save yourself a lot of effort?
21 hours ago [-]
21 hours ago [-]
HPsquared 22 hours ago [-]
Quite the assumption here: "cards are randomly interleaved from the left or right pile one by one. (Each card gets dropped from either the left or the right pile with a probability that’s proportional to the number of cards remaining in that pile."
... Why would it be proportional to the number of cards in each pile? (Edit: I suppose the person doing the shuffling might adjust the rate of cards coming from each hand ... But not perfectly and continuously)
fwlr 21 hours ago [-]
If there is one card in this pile and no cards in the other, the probability of dropping the card from this pile is one. If instead there are some cards still in the other, a) the probability is less than one, and b) we move one step closer to the first state. So by construction it must be proportional - perhaps a poorly behaved proportionality, but that is still enough for the math to work.
tobr 21 hours ago [-]
> But not perfectly and continuously
Isn’t that where the randomness comes in?
HPsquared 19 hours ago [-]
The randomness comes from sampling the probabilities. The strange assumption is that the probabilities are exactly proportional to number of cards currently in each stack.
zahlman 18 hours ago [-]
It's the simplest model that gives the right result for simple cases (e.g. once one pile is empty, the remaining cards must come from the other pile; and when they're evenly split, it should be a coin flip). It also entails, for example, that when there are N cards in one pile and one in the other, the single card gets placed in each possible spot with equal probability. (This recalls the old trick for getting a random line from a text file without pre-counting anything.)
21 hours ago [-]
kittikitti 13 hours ago [-]
I thought about this for a very long time. For any given deck of cards, there is a coefficient of the average magnitude of displacement from their current order after a shuffle. This can be positive or negative, but we take the absolute value. Then, divide the total number of cards in a deck by this number to get the number of times you need to shuffle. A total of 7 shuffles implies an average displacement of about 7 cards. I think it's reasonable if you alternate the cuts in between shuffles.
Sloppy shuffles have a much lower average displacement and thus need more shuffles to get to a random state.
> The deck has to be cut more or less in half before shuffling.
"More or less" is doing some heavy lifting here. The original GSR shuffling model cuts the deck at a point that is binomially distributed, so that for example about one-fifth of the time the cut may be at least as asymmetric as a 21-31 card split, which I think most would agree is nowhere near "the precision of a professional magician."
Also note that the theorem in the paper really focuses only on relaxing the cutting model; the model of subsequent interleaving of the resulting piles is the same, dropping a card from a pile with probability proportional to the size of the pile. (Equivalently but perhaps less intuitively, for the original GSR model with the binomial cut, imagine flipping a fair coin for each card in the deck, then "de-interleaving" by sliding the "heads" cards out, preserving their relative order, and placing that pile on top of the remaining "tails" cards.)
> But with that seventh shuffle, the deck suddenly tips into a highly unstructured state.
More accurately, the total variation distance from a uniform distribution first drops below 0.5 at seven shuffles[0]. The actual cutoff phenomenon's asymptotic result would suggest 3/2 lg n shuffles for a deck with n cards, which for n=52 would be closer to nine shuffles.
[0] https://possiblywrong.wordpress.com/2018/09/02/arbitrary-pre...
But that assumes the model is only tracking cards’ arrivals in the left and right piles, not their ordering relative to one another. I only got that from the article.
Am I missing something? Is it that the left/right split is actually only informative about the amount of mixing that has occurred under the assumption that the interleaving was perfect, and therefore if imperfect interleaving is possible then one must weaken that guarantee - which then requires a more complex tracking system?
Would that get us closer to "random enough", quicker?
Also the new result is cool! (14 semi bad riffle shuffles are sufficient to mix)
I had understood that seven "typical" riffle shuffles produce good randomness.
Nick Scarne is an interesting name to look up, and his writings are almost on a level with his facility to manipulate cards.
https://en.wikipedia.org/wiki/John_Scarne
Whenever someone acquires a morally-neutral skill (like "card manipulation" or "martial arts") that can be used for "good" or "evil" and chooses the former, that's almost always a good story... especially if they flirted with the latter...
There's the general belief that all magical tools develop significance for the user over time, something that my wife who is a "secular green witch" who doesn't believe in psi at all would tell you all about.
Scientifically though, if somebody isn't a good shuffler their deck is not going to be well shuffled and they'll get readings that deviate from what you'd get from a well shuffled deck. It's harder to shuffle a tarot deck well because it has more cards and these are frequently larger. (Personally my riffle shuffle is awful and probably not much better than an overhand)
A new deck usually has the major arcana together and in order and other cards might be sorted by suit and then number. We do a 5 card spread and if your have a new and poorly shuffled deck of course you are going to have more spreads where you get both the Emperor and the Empress or the 4 of Swords and the 7 of Swords.
I found the tarot readings were infinitely better to the person getting the reading when I just forced the results. So I did.
I still did all the things you're indicating about talking about specific personality, etc, as the patter to the concept.
I got into the tarot group because it's not so easy to find a therianthrope's guild!
From a scientific perspective there is a lot to say for randomness. Like the theory that the I Ching was a version of game theory from bronze age China. I recently created A System of Blessings with 13 selected characters from the I Ching because I wanted to give people something nice but didn't want to give everybody the same thing.
My job was to heighten their experience, and to essentially act as a mini therapist enabling them to feel confident in their own decisions.
But I feel you. I did things entirely differently to everyone else. Which is why I thought it was an interesting story.
https://mastodon.social/@UP8/116731777979379420
Also see Magic players being fond of pile shuffles, which, of course, do very little randomization, and guarantee a good mana weave. Without a few shuffles of your own, most Magic decks ever presented are not sufficiently randomized, and it's even worse in Commander, where we are talking 100 card decks.
If anyone actually cared, and really learned the moves, it would be imperceptible, even on camera, but instead regularly players get caught doing the dumbest of obvious things, even while on camera.
How random is that deck? How many “cold spots” does it have? Just how not random of decks are people playing with, and ultimately does that even matter if players lack the knowledge or skill to change their play because of that knowledge?
You would need sloppy ones to introduce randomness.
>The riffle shuffle has to follow a realistic but strict model where cards are randomly interleaved from the left or right pile one by one. (Each card gets dropped from either the left or the right pile with a probability that’s proportional to the number of cards remaining in that pile. This means that the cards don’t simply alternate between left and right, which would result in a predictable structure; instead, the order might go “left, right, right, left, right, left, left.”)
This talks about seven consecutive riffle shuffles ("cut the deck and interleave the piles"): Those are not a "perfect shuffle" (i.e. same probability for every permutation) by themselves, only after doing them several times consecutively (which is kinda suprising by itself).
as a magician, I'm always still impressed when I see perfect faros.
Now, all these decades later, I don't regret giving up on the Faro and a burnable 2nd. I got along just fine without either one as there's so many ways to reach the same destinations. It's weird how some moves just 'speak to you' right away and others never seem to sit right. Best advice I ever got was to not force it. If progress stalls out, just move on.
You going to Magic Live this year?
I randomly came across a 1979 bbc documentary on "Word Processors" on YouTube yesterday. Even though I wrangle terabytes of data using AI agents everyday now, it still felt like magic to imagine myself seeing the documentary for the first time in 1979.
I'd like more details on how this was accomplished on a practical level. Got me thinking about how to embed trackers thin enough to go into a playing card that would operate like a mesh network then the deck could self report once it's properly randomized making a green light go off indicating play may begin.
To be fair, sure most of those marking strategies are approximations designed for a specific trick or a specific gambling game and so don't always need to be 100% of the state information (suit and rank of every individual card). But there are certainly close up magic reasons to have a deck you can find exact cards by marks. Though also to be fair, many (but not all) of those do move the marks to the back of the card with the assumption that you can at least spread the backs of the cards.
... Why would it be proportional to the number of cards in each pile? (Edit: I suppose the person doing the shuffling might adjust the rate of cards coming from each hand ... But not perfectly and continuously)
Isn’t that where the randomness comes in?
Sloppy shuffles have a much lower average displacement and thus need more shuffles to get to a random state.