47 Posts
BoardGameGeek» Forums » Gaming Related » General Gaming
Subject: Riffle shuffling
Your Tags:  Add tags 
Popular Tags:  View All]  [

This is based on a paper that was linked to in the "can you shuffle one card?" thread. But the is not about that, and please let's not do that again here.
It's commonly said that to shuffle a deck of cards well you need seven riffle shuffles. And there is some theoretical support for that.
However here's a game of patience/solitaire that's designed to show up where riffle shuffles show their weakness. I've modified the presentation from the paper, but it's the same game.
Assume your deck has 26 blue cards numbered 1 to 26, and 26 green cards numbered 1 to 26. We originally stack the deck as blue 1 to 26, green 26 to 1. Then we shuffle it.
We turn over cards one at a time. We form a blue pile and a green pile, and a discard pile. A card goes on the discard pile (face up) unless it matches the blue pile or green pile. Initially the blue 1 or green 1 matches, thereafter the next number matches.
When we've gone through the deck we pick up the discard pile, which is in the same order, and repeat. And again and again until we play the blue 26, and win, or the green 26 and lose.
Obviously the probability of winning depends on how well you shuffle. Not shuffling is 100% win. Perfect shuffling is 50% win.
So what about seven riffle shuffles? The first question is what is a riffle shuffle? The paper gives a model. It's not a perfect riffle (exactly alternating cards from an exact split of the deck) but includes a random element in its definition. The exact definition I think isn't the point here. But it's one where seven riffles is good for many tests.
But not this one. The probability of winning the described game is just under 81%. (I've simulated it to confirm the result in the paper.) Ten riffles gets it down to a bit over 54% Even by 18 riffles I can see a statistical bias. (I suspect it's always there, but gets undetectable over a million trials at 20 riffles.)
You might ask, what about if I cut the deck after shuffling? That's not in the paper. But I tried it with two different definitions of cut, and it reduced the probability but only to just over 79%.
So what's the point here? Apart from being possibly interesting, obviously a weakness is how accurately the theoretical model matches the reality of a riffle shuffle. A real riffle might be better or worse.
So, if your card shuffling is up to it (mine isn't) what about trying this out? You'll have to define the blue and green cards and their ordering, but that's straightforward. (I suggest diamonds before hearts and clubs before spades, ace (low) to king.)
And that paper? https://www.dartmouth.edu/~chance/teaching_aids/Mann.pdf
 [+] Dice rolls

Small side note:
8 perfect riffle shuffles on a 52 card deck in a row returns all cards to their original position, and it's not that hard to achieve either. So it seems obv that after 7 shuffles your winrate would be higher than 50(roughly 66% if my math isn't failing me)
Another sidenote, worked as a croupier and the general formula in most casino's would be: 3 riffles, 1 butterfly cut (cut into multiple small packets), 2 riffles, 1 open cut (both hands of both halfs prior to scooping).
 [+] Dice rolls

Just as a computer will ideally combine several independent sources of entropy when generating random numbers, it seems ideal to combine several independent types of shuffle when randomizing a deck's order.
(Assuming one wants a practical compromise between fast shuffling and the perfect uniformly random shuffling one could tediously attain by manually implementing the KnuthFisherYates shuffle algorithm...)
 [+] Dice rolls

ppaddo wrote:Small side note:This is known as a 'Perfect Faro (shuffle)'. Its not easy, takes a bit of practice to get the knack.
8 perfect riffle shuffles on a 52 card deck in a row returns all cards to their original position, and it's not that hard to achieve either.
 [+] Dice rolls
 Gabor B.Hungary
Straight outta BorsodGoatham.  Faro and riffle are two different techniques to shuffle cards. When you faro, you press the corners of the two halves against each other, at let them weave. The only similarity with a riffle shuffle, is the usual bridgingandrelease at the end. And the '8' only applies when you 'outfaro' (leaving top and bottom card in same position), if you do 'infaros', it would take 26 to restore the deck.
 [+] Dice rolls
 I thought the only way to make sure you have randomly mixed a deck was to spread them all out on the table and swish them around with your hand. They do that in the casinos.
 [+] Dice rolls
 Take joy from your wins; take lessons from your losses.United States
Davidsonville
Maryland 
AdrianPHague wrote:ppaddo wrote:Small side note:This is known as a 'Perfect Faro (shuffle)'. Its not easy, takes a bit of practice to get the knack.
8 perfect riffle shuffles on a 52 card deck in a row returns all cards to their original position, and it's not that hard to achieve either.
A bit of practice? It takes a LOT of practice. I have magician friends that buy special decks and practice like hell! A perfect shuffle is tough.
 [+] Dice rolls

Dearlove wrote:The first question is what is a riffle shuffle? The paper gives a model. It's not a perfect riffle (exactly alternating cards from an exact split of the deck)ppaddo wrote:Small side note:I'm curious what happens if you add in imperfect riffles. Where the cut of the deck is close to the middle, but not exactly, and where cards aren't perfectly alternating, but where one side might drop 1 or 2 cards at a time instead of always 1.
8 perfect riffle shuffles on a 52 card deck in a row returns all cards to their original position
 [+] Dice rolls

Thunkd wrote:But that's exactly what the paper linked in the OP and various similar papers analyze! Riffle shuffles with random variation (according to various plausible probability distributions) instead of perfect riffles.Dearlove wrote:The first question is what is a riffle shuffle? The paper gives a model. It's not a perfect riffle (exactly alternating cards from an exact split of the deck)ppaddo wrote:Small side note:I'm curious what happens if you add in imperfect riffles. Where the cut of the deck is close to the middle, but not exactly, and where cards aren't perfectly alternating, but where one side might drop 1 or 2 cards at a time instead of always 1.
8 perfect riffle shuffles on a 52 card deck in a row returns all cards to their original position
 [+] Dice rolls

russ wrote:I didn't read the paper. I apparently misread Dearlove. I thought he had said it was exactly alternating cards from an exact split of the deck. Whoops.Thunkd wrote:But that's exactly what the paper linked in the OP and various similar papers analyze! Riffle shuffles with random variation (according to various plausible probability distributions) instead of perfect riffles.Dearlove wrote:The first question is what is a riffle shuffle? The paper gives a model. It's not a perfect riffle (exactly alternating cards from an exact split of the deck)ppaddo wrote:Small side note:I'm curious what happens if you add in imperfect riffles. Where the cut of the deck is close to the middle, but not exactly, and where cards aren't perfectly alternating, but where one side might drop 1 or 2 cards at a time instead of always 1.
8 perfect riffle shuffles on a 52 card deck in a row returns all cards to their original position
 [+] Dice rolls
 It is a good paper. It's come up in similar (how best to shuffle) threads before.
 [+] Dice rolls

Thunkd wrote:Dearlove wrote:The first question is what is a riffle shuffle? The paper gives a model. It's not a perfect riffle (exactly alternating cards from an exact split of the deck)ppaddo wrote:Small side note:I'm curious what happens if you add in imperfect riffles. Where the cut of the deck is close to the middle, but not exactly, and where cards aren't perfectly alternating, but where one side might drop 1 or 2 cards at a time instead of always 1.
8 perfect riffle shuffles on a 52 card deck in a row returns all cards to their original position
The whole thing I discussed was about such shuffles. The exact mathematical model is in the paper, but it is a cut usually near the middle (it's actually possible to cut anything up to 520, but that's so unlikely that it might as well be impossible) and can drop any number of cards, but again with reducing likelihood.
 [+] Dice rolls

RingelTree wrote:It is a good paper. It's come up in similar (how best to shuffle) threads before.
My point was it would be interesting (but laborious) to see how real shuffles people do behave  not perfect, not the mathematical model of imperfection, but how things actually are.
The specific patience/solitaire was designed to show up the weakest feature of a shuffle.
There is incidentally a discussion in the paper of a version of what we call pile shuffles. I'm planning to play with those at some point. I think there may be some interesting results extending those given, because real pile shuffles I think behave differently to the model (which doesn't use that phrase).
 [+] Dice rolls

Thunkd wrote:I apparently misread Dearlove. I thought he had said it was exactly alternating cards from an exact split of the deck. Whoops.
The good news is that you caught exactly the important features.
(I will say, so did I before I got to that point in the paper. But I didn't come up with the models suggested, though the second one has two formulations, the second being easier to program, and I did see that from the first.)
 [+] Dice rolls

I can't see any reason to believe that actual human riffle shuffles contain a feature that would make them work significantly better than the model of riffle shuffles with regard to this specific test.
Unless you are so bad at shuffling that the cards go flying about the table.
The wrong message to take a way from this paper is that riffle shuffling is so bad that it should be abandoned in favor of, say, overhand shuffling (which is much worse).
 [+] Dice rolls

shooshoo wrote:I thought the only way to make sure you have randomly mixed a deck was to spread them all out on the table and swish them around with your hand. They do that in the casinos.
It does appear to be effective.
 [+] Dice rolls
 Take joy from your wins; take lessons from your losses.United States
Davidsonville
Maryland 
I think "randomly mixed" is highly dependent upon initial state, and whether there's any money on the table. If you take a deck that is already in a chaotic or mostlychaotic state and shuffle it four times you're going to get a significantly unpredictable result, so much so that no one will be able to distinguish a pattern if there even is one.
Everyone in my group is aware that it is useful to not order your cards prior to handing them back in, or to actually spend a moment to perform a minishuffle on the subset in your hand. Efforts to clean up cards all over the table generally involve a big sweep to interleave them on the way back in to being reshuffled. With significant chaos prior to shuffling the need for seven or more shuffles is much reduced, especially in a casual game when no one cares all that much.
Some games require more shuffling than others. Ticket to Ride or Bohnanza are two games that want to order the cards and resist preshuffling efforts to randomize them. Most games don't do that. Wings of Glory damage decks require virtually no shuffling because no order is imposed on the cards during play. I grab cards as they return to me, give them a handoverhand and drop them to the back of the boot. If there's a pattern remaining it's meaningless and undetectable in a fivedeck boot.
From an academic perspective it's a good article. As is often the case the necessity to engineer the reallife implementation varies from the mathematical basis.
Frankly, at times, having some level of ordering in the cards can add a little flavor to a game. I'm not certain you always want a truly randomized deck. Predicting the trend and pressing your luck on when a streak will end can add a little interest to a particular play.
S.

 Last edited Fri Jun 24, 2016 8:23 pm (Total Number of Edits: 1)
 Posted Fri Jun 24, 2016 8:19 pm
 [+] Dice rolls
 WaltUnited States
Orange County
CaliforniaPlease contact me about board gaming in Orange County. 
I discussed this in the other thread in detail. The seven riffle shuffle standard is really for bridge and other games that use an entire 52 card deck. Much of the randomization is in the deal, which is always one card to each player at a time; if you gave 13 cards to each player, you'd have problems.
I think the best simple solution is a combination of overhand shuffles, to break up blocks of cards, and riffle shuffles, to break up short sequences.

 Last edited Fri Jun 24, 2016 11:03 pm (Total Number of Edits: 1)
 Posted Fri Jun 24, 2016 10:54 pm
 [+] Dice rolls

RingelTree wrote:I can't see any reason to believe that actual human riffle shuffles contain a feature that would make them work significantly better than the model of riffle shuffles with regard to this specific test.
They might be better. But they could be worse. I agree, quite probably similar  but that's a guess not scientific.
But it wouldn't take much difference for the break point of how many shuffles it takes to make this test work to shift  given that seven is not enough.
 [+] Dice rolls

Sagrilarus wrote:Frankly, at times, having some level of ordering in the cards can add a little flavor to a game.
You should play Solo Whist. After a game you either stack the four hands (that people should keep sorted) or the thirteen tricks (which are of the "follow the led suit sort"), cut, and deal out in clumps of 4s and 3s.
It's a whist bidding game (with many variants as to exactly what bids are allowed) but  at least in the version I play  a bid by one player to take 9 tricks against the cooperation of all the other players, the bidder choosing trumps, is one allowed. A typical evening's play will include it happening.
The range of bids, such as the one I indicated, is completely predicated on that unshuffled clumped deal.
 [+] Dice rolls

Dearlove wrote:Using that method of dealing in bridge is known as ghoulie or goulash bridge, and was particularly popular on commuter trains fifty or sixty years ago. It's quite a bit of fun bidding the freakish hands that occur, although playing them is usually pretty dull.Sagrilarus wrote:Frankly, at times, having some level of ordering in the cards can add a little flavor to a game.
You should play Solo Whist. After a game you either stack the four hands (that people should keep sorted) or the thirteen tricks (which are of the "follow the led suit sort"), cut, and deal out in clumps of 4s and 3s.
It's a whist bidding game (with many variants as to exactly what bids are allowed) but  at least in the version I play  a bid by one player to take 9 tricks against the cooperation of all the other players, the bidder choosing trumps, is one allowed. A typical evening's play will include it happening.
The range of bids, such as the one I indicated, is completely predicated on that unshuffled clumped deal.
 [+] Dice rolls

Renaissance Man wrote:Dearlove wrote:Using that method of dealing in bridge is known as ghoulie or goulash bridge, and was particularly popular on commuter trains fifty or sixty years ago. It's quite a bit of fun bidding the freakish hands that occur, although playing them is usually pretty dull.Sagrilarus wrote:Frankly, at times, having some level of ordering in the cards can add a little flavor to a game.
You should play Solo Whist. After a game you either stack the four hands (that people should keep sorted) or the thirteen tricks (which are of the "follow the led suit sort"), cut, and deal out in clumps of 4s and 3s.
It's a whist bidding game (with many variants as to exactly what bids are allowed) but  at least in the version I play  a bid by one player to take 9 tricks against the cooperation of all the other players, the bidder choosing trumps, is one allowed. A typical evening's play will include it happening.
The range of bids, such as the one I indicated, is completely predicated on that unshuffled clumped deal.
I heard somewhere that Bridge tournaments frequently use that type of shuffle to generate hands for Duplicate matches...they have a much greater tendency to produce the 57 bid hands that make the matches interesting. Natural "proper" shuffling would produce an uninteresting proportion of 23 bids.
 [+] Dice rolls

KamikazeJohnson wrote:I heard somewhere that Bridge tournaments frequently use that type of shuffle to generate hands for Duplicate matches...they have a much greater tendency to produce the 57 bid hands that make the matches interesting. Natural "proper" shuffling would produce an uninteresting proportion of 23 bids.
No, quite the opposite. Bridge tournaments use truly random hands. Those have a higher number of highly distributed hands than poor shuffling produces (poor shuffling of a deck that has clumped suits). Because many people do shuffle poorly, computer generated hands got a reputation for being freakish, when in fact they aren't.
 [+] Dice rolls

Renaissance Man wrote:Using that method of dealing in bridge is known as ghoulie or goulash bridge, and was particularly popular on commuter trains fifty or sixty years ago. It's quite a bit of fun bidding the freakish hands that occur, although playing them is usually pretty dull.
I knew the term goulash, I chose not to muddy the waters with it. ghoul I didn't know, I suspect it's a corruption of goulash, possibly by people not familiar with tasty Hungarian stews. Also didn't know about the trains.
But that was something that bridge could cope with. What I don't know is any other game than Solo Whist that is designed to use it.

 Last edited Sun Jun 26, 2016 7:04 am (Total Number of Edits: 1)
 Posted Sun Jun 26, 2016 7:03 am
 [+] Dice rolls

Dearlove wrote:KamikazeJohnson wrote:I heard somewhere that Bridge tournaments frequently use that type of shuffle to generate hands for Duplicate matches...they have a much greater tendency to produce the 57 bid hands that make the matches interesting. Natural "proper" shuffling would produce an uninteresting proportion of 23 bids.
No, quite the opposite. Bridge tournaments use truly random hands. Those have a higher number of highly distributed hands than poor shuffling produces (poor shuffling of a deck that has clumped suits). Because many people do shuffle poorly, computer generated hands got a reputation for being freakish, when in fact they aren't.
Computer generated hands tend to wider ranges of a single suit (in one hand) than experienced players expected. That's because clumped tricks that aren't separated during the shuffle are distributed equally between the four players after being dealt. Consequently, players were seeing more uneven hands with computers than they were used to.
I think this is what you meant by 'highly distributed' but I'm not sure.

 Last edited Sun Jun 26, 2016 8:34 am (Total Number of Edits: 1)
 Posted Sun Jun 26, 2016 8:32 am
 [+] Dice rolls