Pedro gonçalves mtg shuffle-madrid
Transcript of Pedro gonçalves mtg shuffle-madrid
Everyday I'm Shuffling
Judge Conference – GP Madrid14/11/2014
by Pedro Gonçalves, L2
Table of Contents
● What “shuffling” means
● Pile Shuffling
● Overhand Shuffling
● Riffle Shuffling
● Musings on shuffling
● Bibliography
● Acknowledgements
Judge Conference – GP Madrid14/11/2014
Shuffling
Judge Conference – GP Madrid14/11/2014
Shuffling
● CR 701.16a
“To shuffle a library or a face-down pile of cards, randomize the cards within it so that no player knows their order.”
Judge Conference – GP Madrid14/11/2014
Shuffling
● CR 701.16a
“To shuffle a library or a face-down pile of cards, randomize the cards within it so that no player knows their order.”
● How can we guarantee the randomness of the cards in a library?
Judge Conference – GP Madrid14/11/2014
Pile Shuffling
Judge Conference – GP Madrid14/11/2014
Pile Shuffling
● Cards are simply dealt out into a number of piles, then the piles are stacked on top of each other.
Judge Conference – GP Madrid14/11/2014
Pile Shuffling
● Cards are simply dealt out into a number of piles, then the piles are stacked on top of each other.
● It does NOT randomize the cards, the process is completely deterministic.
Judge Conference – GP Madrid14/11/2014
Pile Shuffling
● Cards are simply dealt out into a number of piles, then the piles are stacked on top of each other.
● It does NOT randomize the cards, the process is completely deterministic.
● May be useful to check the deck's legality (by counting the cards).
Judge Conference – GP Madrid14/11/2014
Pile Shuffling
● Cards are simply dealt out into a number of piles, then the piles are stacked on top of each other.
● It does NOT randomize the cards, the process is completely deterministic.
● May be useful to check the deck's legality (by counting the cards).
● Can be used by less honest players to try to cheat – for example, using the so called “Double Nickel”.
Judge Conference – GP Madrid14/11/2014
Pile Shuffling – Double Nickel
● You “shuffle” in 5 piles of cards for 2 times, starting with a deck with all the lands/spells previously stacked.
Judge Conference – GP Madrid14/11/2014
Pile Shuffling – Double Nickel
Pile Shuffling – Double Nickel
Pile Shuffling – Double Nickel
Pile Shuffling – Double Nickel
Pile Shuffling – Double Nickel
Pile Shuffling – Double Nickel
Pile Shuffling – Double Nickel
● You “shuffle” in 5 piles of cards for 2 times, starting with a deck with all the lands/spells previously stacked.
● Lands and spells are distributed in such a way to avoid 'mana screw' and 'mana flood', regardless of where the deck is cut.
Judge Conference – GP Madrid14/11/2014
Pile Shuffling – Double Nickel
● You “shuffle” in 5 piles of cards for 2 times, starting with a deck with all the lands/spells previously stacked.
● Lands and spells are distributed in such a way to avoid 'mana screw' and 'mana flood', regardless of where the deck is cut.
● It looks like there is no discernible pattern, but it is clear that there was a library manipulation.
Judge Conference – GP Madrid14/11/2014
Overhand Shuffling
Judge Conference – GP Madrid14/11/2014
Overhand Shuffling
● A group of cards on the bottom (or top) of the deck is lifted sideways out of the deck, and then placed on the top (or bottom).
Judge Conference – GP Madrid14/11/2014
Overhand Shuffling
● A group of cards on the bottom (or top) of the deck is lifted sideways out of the deck, and then placed on the top (or bottom).
● Is this really an actual randomization method?
Judge Conference – GP Madrid14/11/2014
Overhand Shuffling
● A group of cards on the bottom (or top) of the deck is lifted sideways out of the deck, and then placed on the top (or bottom).
● Is this really an actual randomization method? YES!
● Jonasson (2006) proved this is an actual randomization method.
Judge Conference – GP Madrid14/11/2014
Overhand Shuffling
● A group of cards on the bottom (or top) of the deck is lifted sideways out of the deck, and then placed on the top (or bottom).
● Is this really an actual randomization method? YES!
● Jonasson (2006) proved this is an actual randomization method.
● However, the same paper concludes that, in order to shuffle a deck with n cards, we need approximately n2 log(n) movements.
Judge Conference – GP Madrid14/11/2014
Overhand Shuffling
● However, the same paper concludes that, in order to shuffle a deck with n cards, we need approximately n2 log(n) movements.
Judge Conference – GP Madrid14/11/2014
Overhand Shuffling
● However, the same paper concludes that, in order to shuffle a deck with n cards, we need approximately n2 log(n) movements.
● In practice, this is not an effective shuffling method:
Judge Conference – GP Madrid14/11/2014
Overhand Shuffling
● However, the same paper concludes that, in order to shuffle a deck with n cards, we need approximately n2 log(n) movements.
● In practice, this is not an effective shuffling method:
n 40
n2 log(n)
Judge Conference – GP Madrid14/11/2014
Overhand Shuffling
● However, the same paper concludes that, in order to shuffle a deck with n cards, we need approximately n2 log(n) movements.
● In practice, this is not an effective shuffling method:
n 40
n2 log(n) 5902.207
Judge Conference – GP Madrid14/11/2014
Overhand Shuffling
● However, the same paper concludes that, in order to shuffle a deck with n cards, we need approximately n2 log(n) movements.
● In practice, this is not an effective shuffling method:
n 40 60
n2 log(n) 5902.207
Judge Conference – GP Madrid14/11/2014
Overhand Shuffling
● However, the same paper concludes that, in order to shuffle a deck with n cards, we need approximately n2 log(n) movements.
● In practice, this is not an effective shuffling method:
n 40 60
n2 log(n) 5902.207 14739.640
Judge Conference – GP Madrid14/11/2014
Overhand Shuffling
● However, the same paper concludes that, in order to shuffle a deck with n cards, we need approximately n2 log(n) movements.
● In practice, this is not an effective shuffling method:
n 40 60 99
n2 log(n) 5902.207 14739.640
Judge Conference – GP Madrid14/11/2014
Overhand Shuffling
● However, the same paper concludes that, in order to shuffle a deck with n cards, we need approximately n2 log(n) movements.
● In practice, this is not an effective shuffling method:
n 40 60 99
n2 log(n) 5902.207 14739.640 45036.767
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling
● Half of the deck is held in each hand with the thumbs inward, then cards are released by the thumbs so that they fall to the table interleaved.
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling
● Half of the deck is held in each hand with the thumbs inward, then cards are released by the thumbs so that they fall to the table interleaved.
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling
● Half of the deck is held in each hand with the thumbs inward, then cards are released by the thumbs so that they fall to the table interleaved.
● There's a risk of damage to the cards – casinos replace their cards often, but Magic cards (as well as other TCGs' cards) are less replaceable.
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling
● Half of the deck is held in each hand with the thumbs inward, then cards are released by the thumbs so that they fall to the table interleaved.
● There's a risk of damage to the cards – casinos replace their cards often, but Magic cards (as well as other TCGs' cards) are less replaceable.
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling - GSR
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling - GSR
● The Gilbert-Shannon-Reeds model, as described in Gilbert (1955) and Reeds (1981), is a good model for how people usually riffle shuffle. (Diaconis,1988)
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling - GSR
● The Gilbert-Shannon-Reeds model, as described in Gilbert (1955) and Reeds (1981), is a good model for how people usually riffle shuffle. (Diaconis,1988)
● The deck is split into 2 halves, choosing the cut point with according to a binomial distribution.
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling - GSR
● The Gilbert-Shannon-Reeds model, as described in Gilbert (1955) and Reeds (1981), is a good model for how people usually riffle shuffle. (Diaconis,1988)
● The deck is split into 2 halves, choosing the cut point with according to a binomial distribution.
● Choose a card from the bottom of one half of the deck, with a probability that is proportional to the number of cards in that half – if the 1st half has A cards and the 2nd half has B cards, the probability of getting a card from the 1st half is A/(A+B).
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling - GSR
● How can we measure the effectiveness of a riffle shuffle?
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling - GSR
● How can we measure the effectiveness of a riffle shuffle?
● Aldous (1983) arrives at a 'cutoff point':
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling - GSR
● How can we measure the effectiveness of a riffle shuffle?
● Aldous (1983) arrives at a 'cutoff point': 1.5 log2(n)
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling - GSR
● How can we measure the effectiveness of a riffle shuffle?
● Aldous (1983) arrives at a 'cutoff point': 1.5 log2(n)
n 40 60 99
1.5 log2(n)
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling - GSR
● How can we measure the effectiveness of a riffle shuffle?
● Aldous (1983) arrives at a 'cutoff point': 1.5 log2(n)
n 40 60 99
1.5 log2(n) 7.982
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling - GSR
● How can we measure the effectiveness of a riffle shuffle?
● Aldous (1983) arrives at a 'cutoff point': 1.5 log2(n)
n 40 60 99
1.5 log2(n) 7.982 8.860
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling - GSR
● How can we measure the effectiveness of a riffle shuffle?
● Aldous (1983) arrives at a 'cutoff point': 1.5 log2(n)
n 40 60 99
1.5 log2(n) 7.982 8.860 9.944
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling - GSR
● How can we measure the effectiveness of a riffle shuffle?
● Aldous (1983) arrives at a 'cutoff point': 1.5 log2(n)
● Notice that players don't usually shuffle that much. (Although they should!)
n 40 60 99
1.5 log2(n) 7.982 8.860 9.944
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling - GSR
● In the remarkable paper Trailing the Dovetail Shuffle to its Lair (1992), Bayer and Diaconis improved Aldous's result.
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling - GSR
● In the remarkable paper Trailing the Dovetail Shuffle to its Lair (1992), Bayer and Diaconis improved Aldous's result.
● The total variation distance, ||Qm – U||, between the GSR and the uniform distributions is:
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling - GSR
● In the remarkable paper Trailing the Dovetail Shuffle to its Lair (1992), Bayer and Diaconis improved Aldous's result.
● The total variation distance, ||Qm – U||, between the GSR and the uniform distributions is:
with
∥Qm−U∥=∑r=1n ⟨ n
r −1⟩∣(2m+n−r
n )2nm − 1
n !∣
⟨ nr −1⟩=∑
j=0
r
(−1 )j (n+1
j ) (r − j )n
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling – ||Qm – U|| for 40 cards
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling – ||Qm – U|| for 40 cards
1 2 3 4 5 6 7
1 1 1 0.9909 0.7688 0.444 0.2230
8 9 10 11 12 13 14
0.1153 0.0582 0.0292 0.0146 0.0073 0.0036 0.0018
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling – ||Qm – U|| for 60 cards
1 2 3 4 5 6 7
1 1 1 1 0.9764 0.7132 0.4062
8 9 10 11 12 13 14
0.2069 0.1052 0.0530 0.0266 0.0133 0.0066 0.0033
Judge Conference – GP Madrid14/11/2014
Riffle Shuffling – ||Qm – U|| for 99 cards
1 2 3 4 5 6 7
1 1 1 1 1 0.9801 0.7401
8 9 10 11 12 13 14
0.4260 0.2200 0.1115 0.0556 0.0277 0.0138 0.0069
Judge Conference – GP Madrid14/11/2014
Musings on shuffling – Technical details
Judge Conference – GP Madrid14/11/2014
Musings on shuffling – Technical details
● Pile shuffling is an isomorphism. From Wikipedia: “isomorphic objects may be considered the same as long as one considers only these properties and their consequences.”
Judge Conference – GP Madrid14/11/2014
Musings on shuffling – Technical details
● Pile shuffling is an isomorphism. From Wikipedia: “isomorphic objects may be considered the same as long as one considers only these properties and their consequences.”
● Can we do a random pile shuffle?
Judge Conference – GP Madrid14/11/2014
Musings on shuffling – Technical details
● Pile shuffling is an isomorphism. From Wikipedia: “isomorphic objects may be considered the same as long as one considers only these properties and their consequences.”
● Can we do a random pile shuffle?
● Some people can perform a perfect riffle shuffle, which is equally useless for shuffling purposes!
Judge Conference – GP Madrid14/11/2014
Musings on shuffling – Technical details
● Pile shuffling is an isomorphism. From Wikipedia: “isomorphic objects may be considered the same as long as one considers only these properties and their consequences.”
● Can we do a random pile shuffle?
● Some people can perform a perfect riffle shuffle, which is equally useless for shuffling purposes!
● Other potential problems with riffle shuffling: bottom/top cards, clumps due to humidity (!)
Judge Conference – GP Madrid14/11/2014
Musings on shuffling – Technical details
● Pile shuffling is an isomorphism. From Wikipedia: “isomorphic objects may be considered the same as long as one considers only these properties and their consequences.”
● Can we do a random pile shuffle?
● Some people can perform a perfect riffle shuffle, which is equally useless for shuffling purposes!
● Other potential problems with riffle shuffling: bottom/top cards, clumps due to humidity (!)
● Actual randomness vs. de facto randomness
Judge Conference – GP Madrid14/11/2014
Musings on shuffling – General details
Judge Conference – GP Madrid14/11/2014
Musings on shuffling – General details
● Is Riffle shuffle practical enough for tournaments?
Judge Conference – GP Madrid14/11/2014
Musings on shuffling – General details
● Is Riffle shuffle practical enough for tournaments?
● Mash shuffling can be considered a rough approximation to a riffle shuffle.
Judge Conference – GP Madrid14/11/2014
Musings on shuffling – General details
● Is Riffle shuffle practical enough for tournaments?
● Mash shuffling can be considered a rough approximation to a riffle shuffle.
● Less shuffling effects, better sleeves, teaching the players how to shuffle properly.
Judge Conference – GP Madrid14/11/2014
Musings on shuffling – General details
● Is Riffle shuffle practical enough for tournaments?
● Mash shuffling can be considered a rough approximation to a riffle shuffle.
● Less shuffling effects, better sleeves, teaching the players how to shuffle properly.
● Could Pile shuffle be considered Slow Play?
Judge Conference – GP Madrid14/11/2014
Musings on shuffling – General details
● Is Riffle shuffle practical enough for tournaments?
● Mash shuffling can be considered a rough approximation to a riffle shuffle.
● Less shuffling effects, better sleeves, teaching the players how to shuffle properly.
● Could Pile shuffle be considered Slow Play?
● World Record for memorizing a 52-card deck:
Judge Conference – GP Madrid14/11/2014
Musings on shuffling – General details
● Is Riffle shuffle practical enough for tournaments?
● Mash shuffling can be considered a rough approximation to a riffle shuffle.
● Less shuffling effects, better sleeves, teaching the players how to shuffle properly.
● Could Pile shuffle be considered Slow Play?
● World Record for memorizing a 52-card deck: 21,19s!
Judge Conference – GP Madrid14/11/2014
Musings on shuffling – General details
● Is Riffle shuffle practical enough for tournaments?
● Mash shuffling can be considered a rough approximation to a riffle shuffle.
● Less shuffling effects, better sleeves, teaching the players how to shuffle properly.
● Could Pile shuffle be considered Slow Play?
● World Record for memorizing a 52-card deck: 21,19s!
● Should Battle of Wits be legal?
Judge Conference – GP Madrid14/11/2014
Bibliography
● Flores, Micheal J. (2009). How to Cheat. Five with Flores. http://fivewithflores.com/2009/05/how-to-cheat/ Retrieved 05/09/2014
● Jonasson, J. (2006). The Overhand Shuffle Mixes in O(n2 log(n)) Steps. The Annals of Applied Probability, vol.16, #1, pp. 231-243
● Gilbert, E. (1955) Theory of Shuffling. Technical memorandum, Bell Laboratories
● Reeds, J. (1981) Unpublished manuscript.
● Diaconis, P.(1988) Group Representations in Probability and Statistics. IMS, Hayward, California
Bibliography
● Aldous, D. (1983). Random walk on finite groups and rapidly growing Markov Chains. Semináire de Probabilités XVII. Lecture Notes in Math. 986 pp.243-297. Springer
● Bayer, D. Diaconis, P. (1992) Trailing the Dovetail Shuffle to its Lair. The Annals of Applied Probability, vol.2, #2, pp. 294-313
● Levin, D. Peres, Y. Wilmer, E (2008). Markov Chains and Mixing Times. American Mathematical Society
● http://en.wikipedia.org/wiki/Shuffling Retrieved 12/11/2014
Judge Conference – GP Madrid14/11/2014
Acknowledgements
● To the Portuguese Judges, for listenening patiently to an earlier version of this presentation.
● To Frederico Bastos, Frank Karsten and Luís Gobern, for providing some feedback from a player's perspective.
● To the organizers of this conference, for the opportunity to give the presentation.
● To everyone in the audience, for your attention.
Judge Conference – GP Madrid14/11/2014
THANK YOU!!!