Recommend
10 
 Thumb up
 Hide
47 Posts
1 , 2  Next »   | 

BoardGameGeek» Forums » Gaming Related » General Gaming

Subject: Riffle shuffling rss

Your Tags: Add tags
Popular Tags: [View All]
Christopher Dearlove
United Kingdom
Chelmsford
Essex
flag msg tools
SoRCon 11 23-25 Feb 2018 Basildon UK http://www.sorcon.co.uk
badge
Avatar
mbmbmbmbmb
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
3 
 Thumb up
5.00
 tip
 Hide
  • [+] Dice rolls
Adriaan
Netherlands
Zeist
Utrecht
flag msg tools
mbmbmbmbmb
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 side-note, 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).
4 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Russ Williams
Poland
Wrocław
Dolny Śląsk
flag msg tools
designer
badge
Avatar
mbmbmb
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 Knuth-Fisher-Yates shuffle algorithm...)
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Adrian Hague
United Kingdom
Bristol
Bristol
flag msg tools
badge
RAWKET LAWNCHA!!!
Avatar
mbmbmbmbmb
ppaddo wrote:
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.
This is known as a 'Perfect Faro (shuffle)'. Its not easy, takes a bit of practice to get the knack.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Gabor B.
Hungary
Straight outta Borsod
flag msg tools
"Virtue is nothing else than right reason."
badge
Goatham.
Avatar
mbmbmb
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 bridging-and-release at the end. And the '8' only applies when you 'out-faro' (leaving top and bottom card in same position), if you do 'in-faros', it would take 26 to restore the deck.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Shoosh shoo
Canada
flag msg tools
Avatar
mbmbmbmbmb
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.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Take joy from your wins; take lessons from your losses.
United States
Davidsonville
Maryland
flag msg tools
Avatar
mbmbmb
AdrianPHague wrote:
ppaddo wrote:
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.
This is known as a 'Perfect Faro (shuffle)'. Its not easy, takes a bit of practice to get the knack.

    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.

2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Bryan Thunkd
United States
Northampton
MA
flag msg tools
badge
Avatar
mbmbmbmbmb
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:

8 perfect riffle shuffles on a 52 card deck in a row returns all cards to their original position
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.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Russ Williams
Poland
Wrocław
Dolny Śląsk
flag msg tools
designer
badge
Avatar
mbmbmb
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:

8 perfect riffle shuffles on a 52 card deck in a row returns all cards to their original position
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.
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.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Bryan Thunkd
United States
Northampton
MA
flag msg tools
badge
Avatar
mbmbmbmbmb
russ wrote:
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:

8 perfect riffle shuffles on a 52 card deck in a row returns all cards to their original position
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.
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.
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.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Larry L
United States
Stockton
California
flag msg tools
Roll for it
badge
I + I = 0
Avatar
mbmbmbmbmb
It is a good paper. It's come up in similar (how best to shuffle) threads before.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Christopher Dearlove
United Kingdom
Chelmsford
Essex
flag msg tools
SoRCon 11 23-25 Feb 2018 Basildon UK http://www.sorcon.co.uk
badge
Avatar
mbmbmbmbmb
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:

8 perfect riffle shuffles on a 52 card deck in a row returns all cards to their original position
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.

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 52-0, but that's so unlikely that it might as well be impossible) and can drop any number of cards, but again with reducing likelihood.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Christopher Dearlove
United Kingdom
Chelmsford
Essex
flag msg tools
SoRCon 11 23-25 Feb 2018 Basildon UK http://www.sorcon.co.uk
badge
Avatar
mbmbmbmbmb
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).
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Christopher Dearlove
United Kingdom
Chelmsford
Essex
flag msg tools
SoRCon 11 23-25 Feb 2018 Basildon UK http://www.sorcon.co.uk
badge
Avatar
mbmbmbmbmb
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.)
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Larry L
United States
Stockton
California
flag msg tools
Roll for it
badge
I + I = 0
Avatar
mbmbmbmbmb
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).
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Larry L
United States
Stockton
California
flag msg tools
Roll for it
badge
I + I = 0
Avatar
mbmbmbmbmb
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.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Take joy from your wins; take lessons from your losses.
United States
Davidsonville
Maryland
flag msg tools
Avatar
mbmbmb
    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 mostly-chaotic 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 mini-shuffle 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 pre-shuffling 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 hand-over-hand and drop them to the back of the boot. If there's a pattern remaining it's meaningless and undetectable in a five-deck boot.

    From an academic perspective it's a good article. As is often the case the necessity to engineer the real-life 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.

4 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Walt
United States
Orange County
California
flag msg tools
Please don't go. The drones need you. They look up to you.
badge
Please contact me about board gaming in Orange County.
Avatar
mbmbmbmbmb
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.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Christopher Dearlove
United Kingdom
Chelmsford
Essex
flag msg tools
SoRCon 11 23-25 Feb 2018 Basildon UK http://www.sorcon.co.uk
badge
Avatar
mbmbmbmbmb
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.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Christopher Dearlove
United Kingdom
Chelmsford
Essex
flag msg tools
SoRCon 11 23-25 Feb 2018 Basildon UK http://www.sorcon.co.uk
badge
Avatar
mbmbmbmbmb
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.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Cyrus the Great
United States
Atlanta
Georgia
flag msg tools
badge
Avatar
mb
Dearlove wrote:
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.
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.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Christian Kalk
Canada
flag msg tools
mbmb
Renaissance Man wrote:
Dearlove wrote:
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.
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 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 5-7 bid hands that make the matches interesting. Natural "proper" shuffling would produce an uninteresting proportion of 2-3 bids.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Christopher Dearlove
United Kingdom
Chelmsford
Essex
flag msg tools
SoRCon 11 23-25 Feb 2018 Basildon UK http://www.sorcon.co.uk
badge
Avatar
mbmbmbmbmb
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 5-7 bid hands that make the matches interesting. Natural "proper" shuffling would produce an uninteresting proportion of 2-3 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.
3 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Christopher Dearlove
United Kingdom
Chelmsford
Essex
flag msg tools
SoRCon 11 23-25 Feb 2018 Basildon UK http://www.sorcon.co.uk
badge
Avatar
mbmbmbmbmb
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.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Larry L
United States
Stockton
California
flag msg tools
Roll for it
badge
I + I = 0
Avatar
mbmbmbmbmb
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 5-7 bid hands that make the matches interesting. Natural "proper" shuffling would produce an uninteresting proportion of 2-3 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.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
1 , 2  Next »   |