Saturday, July 24, 2021

Misconceptions about card shuffling

Lots of card games rely on shuffling the deck of cards for proper randomization. Most games that use the standard 52-card deck (most famously games like poker and bridge) as well as most, if not all, collectible card games, as well as a myriad of other games that use cards (which may be completely custom to that particular game) rely on proper deck randomization.

In some games good deck randomization is not crucial, and a fair, balanced and reasonable game can still be had even with poor randomization. In other games, however, proper deck randomization is often considered absolutely crucial, even mandated by the rules of the game, and poor deck randomization could even be seen (or intentionally abused) as a form of cheating.

Putting deliberate cheating aside, the fact that so many card games require deck randomization, so much so that it's almost ubiquitous in card games, has quite naturally given rise to a lot of misconception about what "proper randomization" is, and about shuffling.

These misconceptions usually lead to two rather particular extremes when it comes to deck shuffling: The under-shufflers (people who shuffle way too little) and the over-shufflers (people who shuffle needlessly much). There are also tons of misconceptions about shuffling techniques in particular, and what is considered "proper randomization" and what isn't.

Under-shuffling

The phenomenon of under-shuffling, ie. shuffling way too little for proper randomization, is surprisingly common, and happens in all kinds of card games. Perhaps the most common and most extreme case is the people who mash-shuffle two times, and think that's enough.

Mash-shuffling is dividing the deck in two parts (of significant proportions) and then inserting one part into the other by the side, interleaving the cards in the two parts. (Randomization happens mainly because the interleaving is very rarely completely even, and the number of cards that get between the other cards is relatively random.) It's very similar to a riffle-shuffle (and usually achieves pretty much the exact same amount of randomization), except for the physical mechanism by which the cards are interleaved (riffle-shuffling is often preferred over mash shuffling because the latter wears out the edges of the cards more quickly. Note, however, that riffle-shuffling is not really possible with sleeved cards.)

It can be mathematically argued that for a deck of 52 cards (standard deck) or 60 cards (minimum MtG deck size) 7 mash shuffles are enough for full deck randomization. For a 100 card deck (MtG Commander) 8 mash shuffles are enough. It might not be immediately obvious why, but the mathematics are solid on this. (If you want to be extra sure, you can add a couple more mashes; it won't hurt.)

But what this means, and it should be quite intuitive and clear why, is that 2 mash shuffles is not even nearly enough for proper randomization.

Yet, you see this all the time. In fact, exactly 2 mash shuffles seems to be strangely common. Some people might do three or four (and a few might even do just one, although quite rarely), but among the under-shufflers exactly 2 seems to be the most common.

Sometimes this is caused by a complete misunderstanding of what "shuffling" and "randomization" mean. Many people, especially the under-shuffling kind, have this misconception that "randomization" merely means "I don't know exactly where the original cards ended up in the final deck". In other words, if they can't say with accuracy, for example, "the original top card of the deck ended 8th from the top in the resulting deck", then the deck is "randomized". In other words, as long as you don't know exactly where each card is, it's "randomized".

Of course this isn't what randomization means. While the term is actually surprisingly difficult to define clearly and unambiguously, a simple definition would be that any card in the deck has a random and equal chance of ending up anywhere in the final deck, and that the relative order of any two cards in the original deck have about a 50-50 chance of being reversed in the final deck at random. Optimally, any of the possible permutations of the cards in the deck should have an equal and random chance of appearing.

It should be quite clear why two mash shuffles are not even nearly enough to achieve this. (It's much less clear why 7 mash shuffles are enough for this in a 52 or 60 card deck, but that's another topic.)

Complete information loss on where the cards have ended in the final deck is of course a crucial part of randomization, but it's not the only part that's required for proper randomization.

Over-shuffling

In the other extreme we have the over-shufflers: The people who will go to completely needless lengths to randomize their decks, well beyond what would be necessary, to the point of it being just a waste of everybody's time.

A common phenomenon among these people, however, is not merely that they shuffle excessively, such as doing 20 mash shuffles when 7 would be enough. It's very common for them to not only use several shuffling techniques, but also have a lot of misconceptions and misinformation about these shuffling techniques. They also tend to be extraordinarily dogmatic about these beliefs, defending them to the death.

Perhaps the most common and infamous misconceptions, and the source of most flamewars and extreme dogmatism, especially among collectible card game players, relate to pile-shuffling.

Pile-shuffling is distributing the cards in the deck into a number of piles and then just collecting them into a new deck. In other words, you take the deck and start putting cards from the top onto eg. seven piles, one after another on sequence, until all the cards are on the piles. Then you just put all the piles one on top of another.

I think that any rational person should understand why this does not randomize the deck in any way. That's because there's zero randomness in this process, and it's 100% deterministic. Every card in the original deck will end up at an exact predetermined location in the final deck. Even if you collect the final piles in a "random" order, that only means that each card of the original deck will end up in one of a very limited number of positions in the final deck. In fact, if you pay attention to the order in which you pick the piles, you can tell exactly where a particular card is going.

Most particularly, quite often pile-shuffling means that the original top card of the deck will end up at the bottom of the final deck (if you think about how pile-shuffling progresses you'll see why). Or, at the very least, at one of the few predetermined places in the final deck, depending on the order in which you pick the piles.

Some people argue that pile-shuffling becomes random if you always pick a random pile to put the next card onto. For starters, people are very poor at randomization when they do it consciously, and secondly, this is still extremely poor randomization (eg. because of the reason stated above, ie. the top card of the original deck will still end up at one of the very few predetermined positions in the final deck).

When you bring up this issue, they will respond that "you don't just do pile-shuffling alone, afterwards you mash-shuffle enough to make the deck random". They seem completely unable to see that they just admitted that pile-shuffling does not randomize the deck, as it needs some actual randomization afterwards.

Yet, try to convince an over-shuffler that pile-shuffling is completely useless for deck randomization and just a waste of everybody's time. Good luck. You are not going to succeed. This is, for some reason, one of the things that over-shufflers are most dogmatic about, and will take this opinion to their graves.

The main reason why they pile-shuffle is that they have this strong instinct that mash-shuffling does not "separate the cards enough", and thus they need to be separated from each other with pile-shuffling. If some particular types of card are clumped together in the original deck, they need to be "separated out" via pile-shuffling or else they'll end up clumped together in the final deck too, if only mash shuffling was used.

You cannot convince them otherwise. They will never, ever, in a million years, believe that 7 mash shuffles are enough to fully randomize the deck, and "separate the cards" from each other enough. They might believe it from, like, 50 mash shuffles, but not from 7. You can try convincing them, but you will fail.

Of course this still doesn't explain why do many collectible card game players pile-shuffle several times.

Sunday, July 11, 2021

The major problem in trying to debunk the "plane on a conveyor belt" dilemma

The "plane on a conveyor belt" dilemma (or various variants of such a name) is the question of whether a plane can take off from a conveyor belt that's running backwards matching the speed of the plane.

Quite famously the TV show Mythbusters tried to demonstrate that of course it can, there's no doubt about it. Later also Adam Savage made a YouTube video further explaining the myth and why the idea that the plane couldn't take off just doesn't work.


One of the major problems with the proposition, and the attempt at debunking it, however, is that the problem is quite often presented in an ambiguous manner, using ambiguous wording.

The ambiguous wording is that the conveyor belt "matches the speed" of the airplane. The problem with this is that the idea is very easily misunderstood.

And that's exactly what happened with the Mythbusters episode. They interpreted it to mean that if the plane, for example, sets its throttle so that the plane ought to go at, let's say 50 mph, then the conveyor belt should go backwards at 50 mph.

But that's not the idea in the dilemma. The conveyor belt is not supposed to look at what the throttle of the plane is set at, and use the same speed.

When people say that the conveyor belt should "match the speed" of the airplane, what they really mean is that the conveyor belt should always move as fast as to counteract any movement by the airplane. In other words, if the plane starts moving forward, the conveyor belt should quickly accelerate up until the plane stops. It doesn't matter if the conveyor belt needs to go at 10 thousand mph to stop the plane, that's the very idea.

In other words, the idea in the dilemma, which is usually very poorly expressed, is that if the conveyor belt always accelerates as much as necessary to keep the plane in immobile, can it take off? It doesn't matter if the conveyor belt moves at 100 mph, or a million mph, it always accelerates to a speed that keeps the plane immobile. In other words, it always "matches the speed" of the plane in the sense that it will always go as fast as necessary to keep it still.

Ostensibly this should theoretically make the airplane incapable of taking off because wheels cannot have zero friction, and the conveyor belt will always be able to take advantage of this friction to stop the plane from moving. (In practice the friction could generate so much heat that the wheels would melt and burst, but this is a hypothetical scenario anyway.)

So no, I don't think Mythbusters proved the myth as false. They merely misinterpreted and misunderstood what the myth is about (this no doubt helped by the fact that very few people can actually clearly and unambiguously express the scenario properly.)