Search This Blog

Thursday, January 20, 2011

バイアスシャッフル - 前編

This will be post 1 of a series of posts dedicated to Bias Shuffling, otherwise known as Card Stacking. Stacking cards is a common practice in order to give yourself an advantage when playing card games. The position of cards relative to others in the deck at an initial starting series will tend not to deviate much from the norm given that shuffling is done systematically. In other words,  you aren't really "shuffling"; you are merely displacing the cards in an orderly fashion. In order to truly achieve randomization, certain shuffling techniques, as well as randomization within those techniques, must be done. They must also be done with enough repetitions such that the majority of cards have somewhat deviated from the initial starting series.

Consider a standard deck of playing cards. We remove all the jacks, queens, and kings, in order to make this a deck of 40 (For our purposes of making analogies with Yu-Gi-Oh). Initially, all the cards are ordered from lowest to highest (Ace is a 1 in this case), and from lowest to highest suit (Diamond, Club, Heart, Spade):


So our initial sample space is then:

Si=[1D, 1C, 1H, 1S, 2D, 2C, ... 10S]

From an intuitive point of view, the probability of drawing a certain card (Such as Ace of Spades or 5 of Clubs) would be 1/40. If we did no shuffling whatsoever, we would draw the cards in the order of the series.

Let us now dissect the three types of shuffling that will be most common in trading card games: Standard, Cascade, and Pile shuffling. This week we'll go over the most common; Standard.


Standard: This is basically the practice of taking the majority of cards in the middle of the deck out, allowing the remaining cards at the top to fall onto the bottom of the cards. The majority taken out is then either placed back onto the top (more common) or the bottom. The process is repeated several times to ensure a "thorough" shuffle.


In this experiment, we will perform Standard shuffling 5 times and see where certain test cards are relative to other cards (We will use 4 test cards of equal intervals: 2D, 4D, 6D, 8D). In experimental conditions, the amount of top and bottom cards will remain constant, at 5 each, so that each shuffle will remove 30 cards from the middle and replace them back on the top. Finally, after the fifth time, we will cut the deck at card #20. In this kind of experiment with a predetermined outcome, repetitions are not necessary.

Let us see now what are deck looks like:



Sf=[3S, 4D,...7C, 9S, 10D, ...10S, 7H, 7S, ...9H, 1D, ...3H]

Ellipses represent no change in order, whereas when a number is listed is where that number has deviated from it's original position.

Check our 4 test cards relative to the two cards from the left and from the right of it.

2D: 1H, 1S; 2C, 2H
4D: 3H*, 3S; 4C, 4H (* denotes that the deck reaches one end and continues the series from the other)
6D: 5H, 5S; 6C, 6H
8D: 7H, 7S; 8C, 8H

There seems to be no deviation from the norm at all. But I already knew the result of the experiment; that's why I picked those particular values (No coincidence they are all even numbers too). If we were to pick one of our bolded values from before (9S, 7H, 1D) we would notice that their positions relative to their original has deviated a bit, though not to an extreme.

Of course repeating the experiment in the reverse manner would yield your initial result of all cards back in order (Assuming you reverse your cut first). However, this systematic shuffling procedure doesn't give us a clear representation of how random it can get, which is what we are truly interested in.

I will now perform the same experiment, starting back to my original Si series order, and will do it 5 times as before. This time it will be random; I will not record how many cards I take from the middle, and I will not cut the deck exactly halfway (Granted cutting at card 20 isn't exactly half, but it was either 20 or 21; I picked the even number). Once again, I will cut the deck after the fifth shuffle. Note that Standard shuffling sometimes involves not leaving any cards at the top, or not leaving any cards at the bottom. Since there is no longer a series of cards for the top (or bottom) of the cards to shift to, this form of Standard shuffling is considered "Cutting the deck". As such, each displacement in the experiment always left at least one card at the top and one card at the bottom.

Sf=[5D, 5C, ... 6C, 8H, 8S, 9D, 2D, 10C, 10H, 10S, 7H, 7S, 8D, 8C, 3C, 3H, 3S, 6H, 6S, 9C, 9H, 9S, 7D, 7C, 10D, 1D, 1C, 2C, 2H, 2S, 3D, 1H, 1S, 4D, 4C, 4H, 4S]

Obviously, the more "random" our procedure is, the more numbers that deviate from their original position. Let us compare our 4 test points:


2D: 8S, 9D; 10C, 10H
4D: 1H, 1S; 4C, 4H
6D: 5H, 5S; 6C, 8H
8D: 7H, 7S; 8C, 3C

Bolded values are those that do not match our previous experiment. The relative frequency of deviation then, appears to be 8/16, 0.5, or 50%, for this particular experiment. This isn't to say that other such experiments would not yield 50%, but what we are saying is that only by performing an infinite number of repetitions can we get a "true" percentage of randomization.

We could be satisfied with with this result; half my cards are separated each time I shuffle before a new game. Sometimes that is a good thing; certain cards can perform combos with each other. However, the inverse is for the most part more damaging; having similar cards together, which commonly results from bias shuffling, won't leave you with any options in a duel.

Next week we'll go over Cascading, which attempts to fix this problem of the lack of deviation.


No comments:

Post a Comment