Monday, February 19, 2018

Mana Base Probabilities

March 28, 2012

Mana Base Probabilities



Studying the probabilities of the game can teach us a lot about mana bases. When you build a mana base you are trying to maximize the probability of being able to pay the mana costs of your spells.

For Magic, and most card games, we can apply what's called a Hypergeometric distribution. Wikipedia says, "the hypergeometric distribution is a discrete probability distribution that describes the probability of k successes in n draws from a finite population of size N without replacement." Huh? I'll explain in Magic terms. A Magic game follows this model because it is a case of sampling without replacement. Your pool, or population, is your deck, and you sample (draw) some number of cards. Then you can calculate the probability of drawing one or more cards of a certain type. For example we can answer the following question: If you have four Lightning Bolts in your deck then what's the probability of drawing one in your opening hand?
The Hypergeometric formula takes in four parameters. Here's what each looks like in our example:

- The population size. The deck size. 60 in this case.
- The number of success states in the population. A success is a Lightning Bolt so four.
- The number of draws. We draw seven in our opening hand.
- The number of successes. This means how many do you have to get in your hand for it to be considered a success. In this case it's one.

To crunch the numbers you can consult the formula, it's pretty easy as long as you know what a binomial coefficient is (Wikipedia can teach you that too), but there are also calculators available to save you the trouble.

So what's the answer? The chance to draw exactly one Lightning Bolt in your opening hand is about 33%. What might be more interesting to a player is the chance to draw one or more Lightning Bolts. We can calculate this with a cumulative probability which just means adding up the chance to draw exactly one, exactly two, exactly three, and exactly four. The chance to draw one or more Lightning Bolts in your opening hand is 40%. This of course applies to more than just Lightning Bolts.

There's a 40% chance to draw at least one copy of a four-of in your opening hand, but what's the chance to get one by turn two? Turn five? What if I'm interested in drawing one of eight cards? I put together a chart which has the probabilities to draw at least one of a card for which you have X copies in your deck by turn T.

Chance of drawing a card by a given turn
123456789101112131415161718
T1122232404754606570747881848688909293
T2132535445259657175798285889092939495
T3152839495764707579838689919394959697
T4173143536168747983868991939596979798
T5183446576572788286899193959697989899
T6203649606975818589919395969798989999
T7223953637279848891939596979899999999
T8234256677581869093959697989999999999
T9254459697884889294969798999999999999
T10274761728086909395979898999999999999


Across the top is the number of cards of a particular type you have in your deck. Down the left side are turns. Assuming you are on the play (don't draw on turn 1) and draw one card per turn, the chart will tell you the chance to draw at least one of the cards of this type by that turn. You can see the "40" from our Lightning Bolt example in the top row.

What's this have to do with mana bases?

If you built a deck with only eight blue cards and 28 red then you might be tempted to distribute your lands in an even proportion. 8/36 = 22% blue and 28/36 = 78% red. Maybe we should balance our mana base 22/78? 22% of 24 lands is five or six blue lands. Say we round up to to six. How would this perform?

Experienced players know this is a recipe for trouble. A spell in hand without the right mana source is very costly. Dead cards make you lose games. Conversely an off color mana source isn't nearly as costly, even a Chandra's Phoenix can make use of a turn three Island.

Before we go further we need a little more information about this mystery deck. Let's assume its a red aggro deck with 4 Delver of Secrets and 4 Mana Leaks. This is important because now we know we need to cast these spells early, Delver ideally on turn one, and Mana Leak needs to be an option on turn two.

Looking back up at our chart we notice a few interesting points. First, the chance of a Delver in our opening hand is 40%. The chance of a blue card in our opening hand is 65%! By turn three there is 75% percent chance that we'll draw one of our eight blue spells. The big takeaway here is you will draw your splash color spells frequently, so you better have the mana to cast them.

What's the chance of having a blue mana source in our opening hand? With six blue sources we can consult the chart to see. 54%. What does that mean? As you're probably beginning to suspect, our chance of having a Delver on turn one with no blue mana to cast him is pretty high. How high exactly?

Unfortunately, it's not as simple as multiplying .40 * (1 - .54) because the two events are not independent (though this is a good approximation). Long story short, we need an expanded version of the hypergeometric distribution called the multivariate hypergeometric distribution. Sounds fancy. I'll spare you the details. The chance of drawing a Delver on turn one with none of your six blue sources is 20%. This means, if you use this mana base, one in five games your mana base will fail you on turn one.

I wrote some code to calculate the probabilities with a variety of different number of spells and lands. This table shows the chance of a mana base failure (spell but no land) on turn 1, assuming seven cards. Across the top is the number of spells of a particular type. Down the left side is the number of lands (or sources) in your deck.

Single mana base failure for turn 1
123456789101112131415161718192021222324
4 lands081420253034384144464850525354555657575858595959
5 lands071318232730333639414344464748494950505151515252
6 lands061116202427303234363839404142434344444445454545
7 lands051014182124262830323334353637373838393939393940
8 lands050912161821232526282930313132323333343434343434
9 lands040811141618202223242526272728282929292929303030
10 lands040710121416181920212223232424242525252525262626
11 lands030608101214151617181920202121212122222222222222
12 lands030507091112131415161617171818181819191919191919
13 lands020506080910111213141415151515161616161616161616
14 lands020406070809101111121212131313131314141414141414
15 lands020305060708080910101011111111111112121212121212
16 lands020304050607070808090909090910101010101010101010
17 lands010304040506060707070708080808080808080808080808
18 lands010203040405050606060606070707070707070707070707
19 lands010203030404040505050505060606060606060606060606
20 lands010202030303040404040405050505050505050505050505
21 lands010102020303030303040404040404040404040404040404
22 lands010102020202030303030303030303030303030303030303
23 lands010101020202020202020203030303030303030303030303
24 lands000101010102020202020202020202020202020202020202


You can use the chart to check our 4 Delvers and 6 sources. You can see that in order to reduce the turn one delver failure to at most ten percent (one in ten games) you need to have at least 11 blue mana sources. If you had eight one drops of a particular color you can see to have at most ten percent failure on turn one you'd need 15 lands.

We can generate this table for any turn. Here's the table for turn two:

Single mana base failure for turn 2
123456789101112131415161718192021222324
4 lands081521263135384143454749505152535354545455555555
5 lands071318232730333537394142434445454646464747474747
6 lands061116202326283032343536373838393939404040404040
7 lands051014172022242628293031323233333334343434343434
8 lands050812151719212224252626272828282829292929292929
9 lands040710131516181920212222232324242424242525252525
10 lands030609111314151617181919192020202021212121212121
11 lands030507091112131415151616161717171717171718181818
12 lands020506080910111212131314141414141415151515151515
13 lands020405070809091010111111121212121212121212121212
14 lands020305060607080809090909101010101010101010101010
15 lands010304050506070707080808080808080808080808080808
16 lands010203040505050606060607070707070707070707070707
17 lands010203030404040505050505050506060606060606060606
18 lands010202030303040404040404040405050505050505050505
19 lands010102020303030303030404040404040404040404040404
20 lands010101020202020303030303030303030303030303030303
21 lands000101010202020202020202020202020202020202020202
22 lands000101010102020202020202020202020202020202020202
23 lands000101010101010101010101010101020202020202020202
24 lands000001010101010101010101010101010101010101010101


Here we can see that if we want to reduce turn two mana leak failure to at most ten percent then we need 11 blue sources. However, if we want to reduce any blue failure (delver or mana leak) by on turn two to at most 10 percent then we have to go up to 13 lands (we count all eight blue cards as a type).

Based on this information how should we balance our mana base? Let's say we can use a set of Volcanic Islands (simpifies the turn one math). If we want to stick with 24 lands and we split evenly then we'll have 4 duals, 10 Islands, and 10 Mountains. 14 sources for each color. Looking over the chart you see that this would significantly reduce our chance for blue failure without significantly hurting our chance for red failure. This is really the key point of this article. Evenly split mana bases are more efficient than unbalanced mana bases. Going from 6 to 7 Islands helps you a lot more than going from 18 to 17 Mountains hurts you.

However, what mana base is actually optimal for your deck depends very heavily on the details of your deck. Once thing we haven't considered yet is double colored mana cost. Say you have a Chandra's Phoenix you want to cast on turn three. What's the chance of failure in that case? This time we need to have two red sources.

Double mana base failure for turn 3
123456789101112131415161718192021222324
4 lands142636445258646872757880828385868787888889898989
5 lands132434424955606468717375777980818182838383838484
6 lands122332394652566063666970727374757676777777787878
7 lands112130374348525659616365666869697070717171717272
8 lands112027343944485154565860616263636464656565656565
9 lands101825313640444749515354555657575858595959595959
10 lands091623283336404244464849505151525252535353535353
11 lands081521252933363840414344454546464647474747474747
12 lands071318232629323436373839404041414141424242424242
13 lands061216202326283031333434353536363636373737373737
14 lands061115182123252628292930313131323232323232323232
15 lands050913161820222324252626272727272828282828282828
16 lands040811141618192021222223232323242424242424242424
17 lands040710121415161718191919202020202020202020202020
18 lands030608101213141515161617171717171717171717171717
19 lands030507091011121313131414141414141515151515151515
20 lands020506080909101111111212121212121212121212121212
21 lands020405060708080909091010101010101010101010101010
22 lands020304050607070708080808080808080808080808080808
23 lands020304040505060606060707070707070707070707070707
24 lands010203040405050505050505050506060606060606060606


Wow! That's a lot higher failure rate! Doubles are costly. To get at most ten percent failure for a turn three Phoenix we'd need 17 red sources. So what do we do? Well that depends. You'd have to balance the failures to meet your goals. With this build I'd probably and go something like 12/8/4. This would give a pretty even distribution of failure. I'd also wonder if the eight blue cards were worth the trouble.

Here are the complete failure tables. You can use these to help build optimal mana bases for your decks.

Conclusions


We can consult the charts and tweak individual decks, but what can we learn in general?

From the failure tables, if you require 10% or less failure rate on the first turn your spells are available to cast then:

For singles:
To support 4 cards at cmc 1 or less you need 11 lands.
To support 8 cards at cmc 1 or less you need 15 lands.
To support 4 cards at cmc 2 or less you need 11 lands.
To support 8 cards at cmc 2 or less you need 13 lands.
To support 12 cards at cmc 2 or less you need 14 lands.
To support 4 cards at cmc 3 or less you need 10 lands.
To support 8 cards at cmc 3 or less you need 12 lands.
To support 12 cards at cmc 3 or less you need 13 lands.
To support 16 cards at cmc 3 or less you need 13 lands.


Btw 10-15 min for singles. 15 can do anything except excessive one drops. 4 duals and 10 of each is 14 of each.

For doubles:
To support 4 cards at cmc 2 or less you need 20 lands.
To support 8 cards at cmc 2 or less you need 23 lands.
To support 4 cards at cmc 3 or less you need 18 lands.
To support 8 cards at cmc 3 or less you need 21 lands.
To support 4 cards at cmc 4 or less you need 17 lands.
To support 8 cards at cmc 4 or less you need 19 lands.
To support 4 cards at cmc 5 or less you need 16 lands.
To support 8 cards at cmc 5 or less you need 17 lands.
To support 4 cards at cmc 6 or less you need 15 lands.
To support 8 cards at cmc 6 or less you need 16 lands.


Supporting doubles is much more demanding than singles, even if singles are cheaper and more numerous. Double is a commitment.

Eight duals split is 8/8/8, which is 16 per color. This can support some doubles but not most. To be smooth with doubles you have to tilt the mana base. With 4 duals you can go down to 8/12/4 which is 12/16, and this is pushing it. With 8 duals you can go 6/10/8 which is 14/18. This is safe in most regards. This means you generally want to avoid decks with doubles from different colors unless they are expensive or you have a lot of dual sources.

You very rarely want to use less than ten sources.

The 10% failure rate is arbitrary. You can certainly play decks with a higher rate successfully. Finding the balance between a smooth mana base and powerful cards is part of the deck building challenge.

I hope you found this article useful. I learned a lot putting it together. I used to have to build mana bases entirely off a gut feeling. Now it's a slightly more informed gut feeling.

2 comments:

  1. My name is Karina, I'm someone who has lived a life seemingly in the background, I must say this final indignity I have suffered almost too much to endure. You see, I have been sickly and weak since the day I was born and doomed to go through all my life a weakling. I seemed to have always suffered from one illness or another and could never play with the other children as I so desperately wanted to. Mother always made such a big fuss over me, also, making the situation worse as the other boys teased me mercilessly after they saw it. I was browsing  the internet searching on how i could be transformed into a powerful when i came across the email of a man named Lord Mark. who was a VAMPIRE so I told him that I has always dreamed of becoming a  VAMPIRES, All i did was just to follow the procedure that i was been told, and i bet you that procedure I took change my entire life to something i ever desire, freedom, sickness free, pains free, fame, influence, connections and even more that i can. Thanks to Lord Mark. Do you want a life full of interesting things? Do you want to have power and influence over others? To be charming and desirable? To have wealth, health, and longevity? contact the vampires creed today via email: Vampirelord7878@gmail.com

    ReplyDelete