The best kittens, technology, and video games blog in the world.

Friday, May 25, 2007

How to cheat in casual Magic: The Gathering

First snow by Vermario from flickr (CC-NC-SA)It's not really about cheating, more about the different between uniformity and randomness. One of the more annoying things about Magic: The Gathering is that it depends on luck too much, especially early in the game. Drawing either too few or too many lands can seriously reduce your chances of winning before the game even starts. To simplify the maths let's define a "failure" as getting less than 3 or more than 5 lands among the first 10 cards, and let's assume that the deck contains 60 card, 25 of which are lands.

With fully randomized deck the chance of failure is very high (29.5%). On the other hand if lands are distributed fully uniformly - card, land, card, card, land, card, land, card, card, land, card, land - the failure cannot possibly happen:


012345678910
Random0.232%2.268%9.452%20.511%27.105%22.893%12.416%4.184%0.842%0.092%0.005%
Uniform0.0%0.0%0.0%0.0%83.382%16.618%0.0%0.0%0.0%0.0%0.0%

Of course there's no way one could use an unshuffled deck even in the most casual setting. Fortunately for us most players use not very effective shuffles. In one of such shuffles a bunch of cards from the middle is moved to front of the deck, and then a bunch of cards from the front of the deck is moved to the back.

We can use this knowledge to cheat very effectively. Just prepare a deck with uniformly distributed lands - and let the opponent shuffle it. The deck looks perfectly fine at the first glance, so nobody's going to suspect any cheating, and it takes much more shuffling than most people are willing to do before its lose its advantage over fully random decks.


012345678910
Random0.232%2.268%9.452%20.511%27.105%22.893%12.416%4.184%0.842%0.092%0.005%
Uniform0.0%0.0%0.0%0.0%83.382%16.618%0.0%0.0%0.0%0.0%0.0%
1 shuffle0.0%0.0%0.0%4.024%75.43%20.537%0.009%0.0%0.0%0.0%0.0%
2 shuffles0.0%0.0%0.025%7.402%68.883%23.355%0.335%0.0%0.0%0.0%0.0%
3 shuffles0.0%0.0%0.154%9.953%64.043%24.956%0.89%0.004%0.0%0.0%0.0%
4 shuffles0.0%0.0%0.286%12.095%59.593%26.667%1.34%0.019%0.0%0.0%0.0%
5 shuffles0.0%0.003%0.571%13.721%56.026%27.568%2.077%0.034%0.0%0.0%0.0%
6 shuffles0.0%0.006%0.8%15.344%53.053%27.874%2.834%0.089%0.0%0.0%0.0%
7 shuffles0.0%0.024%1.169%16.441%50.614%28.239%3.397%0.114%0.002%0.0%0.0%
8 shuffles0.0%0.032%1.468%17.378%48.324%28.535%4.109%0.152%0.002%0.0%0.0%
9 shuffles0.0%0.063%1.87%18.212%46.556%28.436%4.645%0.216%0.002%0.0%0.0%
10 shuffles0.002%0.077%2.26%18.501%45.127%28.395%5.278%0.356%0.004%0.0%0.0%
11 shuffles0.001%0.09%2.527%19.216%43.362%28.505%5.882%0.406%0.011%0.0%0.0%
12 shuffles0.002%0.121%3.002%19.527%42.365%28.14%6.33%0.494%0.019%0.0%0.0%
13 shuffles0.0%0.17%3.336%19.917%40.831%28.346%6.751%0.626%0.022%0.001%0.0%
14 shuffles0.001%0.221%3.592%20.331%39.897%28.034%7.15%0.752%0.022%0.0%0.0%
15 shuffles0.006%0.268%4.031%20.547%39.156%27.574%7.49%0.891%0.035%0.002%0.0%
16 shuffles0.007%0.294%4.275%20.338%38.34%27.836%7.884%0.968%0.056%0.002%0.0%
17 shuffles0.01%0.362%4.564%20.59%37.582%27.436%8.291%1.104%0.059%0.002%0.0%
18 shuffles0.015%0.398%4.829%20.988%36.751%27.135%8.526%1.278%0.076%0.004%0.0%
19 shuffles0.016%0.441%4.989%20.844%36.309%27.06%8.952%1.304%0.084%0.001%0.0%
20 shuffles0.02%0.549%5.154%20.829%35.648%26.926%9.386%1.382%0.104%0.002%0.0%
25 shuffles0.036%0.805%6.337%21.246%33.365%25.978%10.09%1.936%0.194%0.013%0.0%
30 shuffles0.064%1.015%7.237%21.033%31.85%25.154%10.924%2.428%0.277%0.018%0.0%

Even after 20 shuffles probability of failure is 16.6%, almost half of what you'd get if you were honest. The difference is going to be even more dramatic with multicolor decks - the chance of not getting any lands of the right kind in the first 10 cards is huge, and can be drastically reduced by making the deck more uniform.

Morals of the story:
  • "Uniform" and "random" are completely different things. This has important implications in computer science, but it's much more fun to illustrate it with games.
  • Every player should learn better shuffling techniques
All probabilities generated by 100 000 draws using the following Ruby program:
#!/usr/bin/ruby

class Array
def random_start
i = rand(size)
self[i..-1] + self[0...i]
end
# Shuffling procedure is
# Divide deck into three parts, move second to the front,
# then .random_start
# A B C -> B A C
def shuffle(t)
deck = self
t.times{
i, j = rand(size), rand(size)
i, j = [i, j].min, [i, j].max
a = deck[0...i]
b = deck[i...j]
c = deck[j..-1]
deck = (b + a + c).random_start
}
deck
end
end

def stats
res = (0..10).map{0}
100000.times{
res[yield[0,10].select{|x| x}.size]+=1
}
puts "* "+res.map{|x|"#{0.001*x}%"}.join(' ')
puts "* Change of failure: #{0.001*(100000-res[3]-res[4]-res[5])}%"
end

deck_unsorted = [true] * 25 + [false] * 35
deck_uniform = [false, true, false, false, true, false, true, false, false, true, false, true] * 5

puts "Fully random:"
stats { deck_unsorted.sort_by{rand} }
puts "Fully uniform:"
stats { deck_uniform.random_start }
(1..20).each{|i|
puts "Uniform, shuffled #{i}x:"
stats { deck_uniform.shuffle(i) }
}
25.step(80, 5){|i|
puts "Uniform, shuffled #{i}x:"
stats { deck_uniform.shuffle(i) }
}

30 comments:

Anonymous said...

Yeah, I've been doing that instinctively since, like, forever.

Anonymous said...

It's called "mana shuffling"

the first thing i ever learned about the game.

Anonymous said...

You can get do this without your opponant knowing too even in tournaments!

Before the game sort your lands and non-land spells into two distinct groups. Make sure both are shuffled well.

Then using a simple Riffle Shuffle(which you might need to practise), you can succesffuly "mana-shuffle" your deck uniformly.

Ive been doing this for years. Once you "mana-shuffle" just cut your deck and hand it to your opponent.

Anonymous said...

The way I see it, if you have an all round good deck, you shouldn't have to cheat unless your opponent is. If it takes a perfect coincedence for you to win than you're not very good are you. I'm guessing you're the kind of people who plug hundreds of dollars into each deck because they're so desperate to win. Sometimes you don't get mana or too much. If you were smart you'd have a strategy to deal with both. Instead you just load your deck with all the best rares and whine when the mana doesn't go perfectly for you to use them

Anonymous said...

yeah, but even with a good rounded deck you can get e.g. five mana in a row, maybe even when you desperately need creatures. it already happened to me, so I use mana shuffling

Anonymous said...

Very true stuff. We did an episode on ManaNation a few weeks ago concerning cheating and we talked about how to make sure your opponent hasn't rigged their deck.

Anonymous said...

cool go to this site and register on it. it has to do with magic blog it will be getting bigger and better but need more people so join register on it it is ... http://mtgquestground.forumarena.com

Anonymous said...

A friend of mine even arrange his creatures / instants / sorcery, which results in me cutting his deck to ribbons before playing

I don't think magic the gathering is a game where certainty is a good thing. I personally found that unpredictability makes for a good game.

Altho... if you lose seven games in a row, some thought about cheating will unavoidably rise, lolz

Anonymous said...

Great post, Taw. I'll take hard data over anecdotal player testimony any day. There is no doubt that the "mana shuffling" effect is palpable.
For online players it begs the obvious question: isn't the "mana shuffling" effect entirely negated in MTGOL? If so, doesn't that make MTGOL a "purer" Magic experience?

Anonymous said...

You realize in tournaments that you can just call a judge if you think they didn't shuffle their deck well enough?

On the flip side, your opponent is only allowed to cut your deck (once) any more is a shuffle and not allowed.

taw said...

Anonymous: That's why I said "casual MtG" in the title.

Anyway, I wouldn't fear judge calling much - insufficiently shuffled decks looks almost exactly the same as fully shuffled decks at the first sight. You cannot know if the judge would find anything, so you risk all penalties for falsely accusing someone of cheating.

Anonymous said...

wow. what a dick move. u have to suck to cheat.

Anonymous said...

I was under the impression that you could just shuffle your opponents deck all you want. I've given people's decks a few extra shuffles when I seen them manaweaving at fnm.

taw said...

Anonymous: Yes, you can. But in the worst case the opponent will shuffle your deck correctly, so you don't lose anything compared to fair play. In the best case they won't and you get advantage.

There's no downside to this cheating method.

Jorg said...

Haha, they should use that kind of "land uniformity" trick in Wagic to make the AI's decks even better :)

Professor Sargent said...

You are allowed to reshuffle your opponent's deck OR simply cut it. It is your choice. This is from the official rule book on the DCI website - effective Oct. 1, 2009.

A lot of people need to read that book. It will help you out.

Professor Sargent said...

Sorry for the double comment.

As defined in the rules, this "mana shuffling" method discussed above is cheating. It will get you banned from tournament play, and good players will reshuffle your deck regardless of your attempt to cheat. Don't do it.

Cheating against your friends is a terrible idea. You should be testing your deck for tournament play. Cheating is pointless.

taw said...

Professor Sargent: Mana shuffling is really difficult to detect - insufficiently shuffled decks look very close to properly shuffled decks unless you run the numbers through a computer. So it's unlikely that you'd get found out, let alone banned.

The worst the opponent can do is properly reshuffle your deck, in which case you're only as bad as where you started. There are really no downsides to this method.

Anonymous said...

Really? What a bunch of bs. Why stop at mana shuffling? Why not set your deck up so you draw the exact cards you want? How about drawing a few extra cards when your opponent isnt looking? Maybe put 5, 6, or 7 of each card in your deck? Its a dick move and just shows your absolute inability to build a deck that is able to handle too few or too many lands. In other words, find a different game b/c you suck at this one.

Anonymous said...

All it really takes is the ole 1-2-3 pile shuffle to totally fuck up a mana shuffle.

Just pile shuffle the deck into 3 piles after they are done, put one on top of 2, and 2 on top of 3.

Should be something like 23 lands, into the rest of the deck.

Fuck you cheaters, i've caught 5 idiots who came into my store of oldschool players and tried this tired shit.

I expect an article on the Lick'N'Stick next, since you seem to be working from 1995.

This is an old as balls article, but it still disgusts me.

taw said...

Anonymous: What you describe is incompetent kind of mana shuffling. Better types (like very simple of shuffling normally, and then breaking too long runs of lands or non-lands) are resistant against all such counters while being nearly equally effective - the best you can do against them is to shuffle opponent's deck back to normal, you cannot punish them.

menos_grande said...

seems logical. but i don't condone in cheating. Get free booster pack at http://freemagiccards.blogspot.com/

Anonymous said...

Cheaters suck. You all can blow me.

Anonymous said...

when they re-shuffle for you, you often end up with a deck thats one land per 10 cards, it's easier to just not cheat in anything but casual, and cheating with your friends just makes you less prepared come tourney time

MagicCardMaster said...

I was once given a game loss for 'insufficient randomizing'. I wonder if that judge even knows what the word 'random' means...

Anonymous said...

my players and i always to this, its deff not cheating if we all are openly doing it, and giving a fairly good shuffle, i mean who wants to beat down ur friend just cause their manna Boned, i want a good game, Manna weave openly everyone!

Anonymous said...

First of all cheating of any kind is for losers. Secondly, why would you cheat playing in casual ? Youre playing with your friends for fun. Third, pile shuffling eliminates what youre talking about. Get a life.

Anonymous said...

the rule book definition for shuffling your deck is and i quote "3.8 Card Shuffling
Decks must be randomized using some form of riffle and/or mash shuffle at the start of every game and whenever an instruction requires it. Randomization is defined as bringing the deck to a state where no player can have any information regarding the order or position of cards in any portion of the deck. Pile shuffling alone is not sufficiently random.
Once the deck is randomized, it must be presented to an opponent. By this action, players state that their decks are legal and randomized. The opponent may then shuffle it additionally. Cards and sleeves must not be in danger of being damaged during this process. If the opponent does not believe the player made a reasonable effort to randomize his or her deck, the opponent must notify a judge. Players may request to have a judge shuffle their cards rather than the opponent; this request will be honored only at a judge’s discretion.

If a player has had the opportunity to see any of the card faces of the deck being shuffled, the deck is considered ordered and must be shuffled again.

At Competitive and Professional REL tournaments, players must always shuffle their opponents’ decks. The Head Judge can require this at Regular REL tournaments as well."

Sarah said...

I have a question. My friend and I play magic all the time and she has like a 200 card deck i think, might be 100 but i think it is more. Well i know that you are only allowed four of each card in your deck but somehow each turn she keeps getting the same cards. She plays with a goblin deck so they are the ones that give you 1/1 goblins and she always gets all four of them. EACH TIME. I watch her shuffle so i know she is doing that but how could she be getting all of those cards every turn? I play with a 60 card deck and have never gotten the same four card each turn. Could she possibly have more then four of them and is sneaky about it or is she doing some secret shuffle? Please give me some suggestions of what you think and/or advice. Thank you --Sarah

taw said...

Sarah: It's really difficult to shuffle 200 card deck properly, even experienced people on tournaments have trouble doing that (with Battle of Wits decks), so most likely your friend's deck isn't properly shuffled in the first place.