Suppose that you have a good idea about what the metagame is going to look like at your next tournament and a good understanding of how the decks in this metagame play out against each other. You want to know what deck to play to maximize your chances of winning in this tournament. The goal of this article is to provide you with basic tools to help you make this decision.

 

I – Basic representation

 

This article uses a few maths notations to define statistics and formalize the concepts that I want to go through. I will try as much as possible to explain the concepts in English too, and expressions will always be followed by examples.

Let’s use the following notations:

  • There are N decks in this metagame (D_1, D_2, … D_N).
  • The proportion of deck D_i in this metagame is M(i), where i is any number between 1 and N.
  • The probability of deck D_i winning against deck D_j is X(i,j), where i and j are any two numbers between 1 and N
  • The probability of deck D_i winning against a deck chosen at random in this metagame is W(i)

We have the following properties:

  • The sum of the metagame shares must sum up to 100% (by definition of a metagame share) and each metagame share must be between 0 and 100%:   \sum_{i=1}^{N} M(i) = 100\%    and    M(i) \in [0,100\%], i \in \{1,...,N\}    (1)
  • Since pairings are random, the probability of you playing against a particular deck in the first round is equal to its metagame share. This means that the probability of being paired against deck D_i is M(i).    (2)
  • Mirror match-ups are 50/50:    X(i,i) = 50\% for any deck D_i    (3)
  • If a deck D_i has a 60/40 match-up against deck D_j, it means that D_i has 60% chance of winning the match-up. It also means that D_i has a 40/60 match-up against D_i and a 40% chance of winning the match-up. This means:    X(i,j) = 100\% - X(j,i)    (4)

A direct consequence of (2) is that the probability of a deck winning against a deck chosen at random is the average of its match-up against all decks weighted by their metagame share:   W(i) = \sum_{j=1}^{N} M(j) X(i,j) for i\in\{1,...,N\}   (5)

In probabilistic terms, W(i) is the expected win % of deck D_i, under the probability defined by the metagame M.

For example, imagine a metagame with only 3 decks (N=3), with the following average match-ups:

  • Reanimator (D_1) vs Bug Delver (D_2) is 35/65, i.e. X(1,2) = 35\% and X(2,1) = 65\%
  • Reanimator (D_1) vs Elves (D_3) is 62/38, i.e. X(1,3) = 62\% and X(3,1) = 38\%
  • Bug Delver (D_2) vs Elves (D_3) is 40/60, i.e. X(2,3) = 40\% and X(3,2) = 60\%

And the metagame is 25% of Reanimator (M(1)=25\%), 50% of Bug Delver (M(2)=50\%), and 25% of Elves (M(3)=25\%).

According to (5), the expected win % of these decks, in this small metagame, is

  • Reanimator: W(1) = 25\% \times 50\% + 50\% \times 35\% + 25\% \times 62\% = 45.5\%
  • Bug: W(2) = 25\% \times 65\% + 50\% \times 50\% + 25\% \times 40\% = 51.25\%
  • Elves: W(3) = 25\% \times 38\% + 50\% \times 60\% + 25\% \times 50\% = 52\%

Bug Delver seems to have the best match-ups at first sight, but taking into account the metagame shares makes Elves the deck with the highest expected win % overall. It makes sense since Elves has a good match-up (X(3,2)=60\%) against Bug Delver which is the most played deck (M(2) = 50\%).

The concept above can be more clearly formulated using a matrix representation. Using the same notations as before, we can write:

  • X = [ X(i,j), i,j \in \{ 1, \dots, N \} ] is the NxN match-up matrix. In particular, row i shows the win % of deck D_i against all decks j of the metagame.
  • M = [ M(i), i \in  \{1, \dots, N\}] is the Nx1 metagame vector.
  • W = [ W(i), i \in \{1, \dots, N\} ] is the Nx1 expected win % vector.

This matrix representation is particularly useful when you want to calculate the expected win % of a larger metagame, using Excel or another software. When building the X matrix, (3) and (4) tell you that all values of the diagonal are 50%, and that the matrix has some ‘symmetry’ whereby an element in the matrix equals one minus the opposite element across the diagonal. Additionally, (5) now reads: W = X \circ M, where \circ is the matrix product operation.

 

II – Expectation and variance

 

It is important to realise that the ‘best deck’ will depend on the criteria that you choose. In the above examples, we focused on maximizing the expected win %. However, you may also want to minimize the variance instead of maximizing the win % alone, or look at a combination of the two.

The variance measures the uncertainty around the deck that you will play against, i.e. the uncertainty due to the pairing randomness.

If we call V(i) this variance when you choose to play deck D_i, you can calculate it as follows:
V(i) = \sum_{j=1}^{N} M(j) X(i,j)^2 - W(i)^2 for i\in\{1,..,N\}    (6)

This metric is particularly interesting because its square root SV(i) is average deviation around the average win % W(i): SV(i) = \sqrt{V(i)}   (7)

Applying (7) to our 3 decks metagame gives the variance associated with each deck choice:

  • Reanimator: SV(1) = 11.3\%
  • Bug Delver: SV(2) = 8.9\%
  • Elves: SV(3) = 9.1\%

In this 3 decks metagame, Reanimator is the deck with the lowest win %, and the deck which makes your wins/losses the most dependant on pairings. Elves’ win% is a little higher than Bug’s, and it also has a little more variance related to its match-ups.

 

III – Understanding the results

 

The first step towards using this representation in practice is understanding its outputs.

  • W(i) simply represents the average win % of deck D_i against the metagame, so the higher the better, assuming everything else is the same. In our basic 3 decks example, as explained before, Bug Delver seems to have best match-ups at first sight, but taking into account the metagame M makes Elves the deck with the highest expected win % overall. It makes sense since Elves has a good match-up against Bug Delver which is the most played deck.
  • SV(i) measures how much your win % will be affected by your pairings if you play deck D_i. Intuitively, experienced players would want to try to minimize this match-up variance so that their skills can make the difference. Conversely, if you are not familiar with a format or not confidant in your ability to outplay your opponents in a given metagame, it may be a wise choice to choose a deck with higher variance and hope for favourable pairings. This means choosing a high SV(i) deck with a lot of good match-ups, a lot of bad match-ups, and only a few even ones. In the extreme scenario where all your match-ups are either 100/0 or 0/100, even the best players can’t outplay you: they either play a deck that beat yours all the time or one that never does.

Secondly, this representation can help you choose what to play, but it has limitations:

  • The outputs, W and SV, are only as good as the quality of its inputs M and X. Bad estimates of the metagame and match-ups will lead to wrong conclusions about your expected win % and its variance. Estimating the metagame is a tricky task as it often varies significantly over time. EstimatingX accurately is also hard as it often requires hundreds of games for a single match-up, i.e. a single X(i,j).
  • The model does not capture the variance associated to your draws and your card choices. Nor does it take into account variance associated with opponents with different level of skills nor your/their ability to execute properly during the entire tournament. In theory, it is possible to extend the model to do so but it would be unnecessary complex and would make its inputs practically impossible to estimate.

However, depending on what you want to capture, you can adjust the way you estimate M and X for a given context. For example:

  • You can decide to estimate X for an average-skilled opponent instead of an opponent executing perfectly. If you do, your W and SV will be averages against the average opponent, which is both more realistic in the early rounds and less useful when you reach the top tables. You can even decide that you want to estimate it in such a way to include the likelihood that you will also make mistakes!
  • The metagame that you face depends on how far you are in the tournament and how well you performed. As the model only give your W and SV for a given metagame, you must choose whether you are interested in choosing the best deck to beat the metagame of the early rounds (when you can be paired against anyone in the room) or the metagame of the top tables a few rounds later (when you will be paired against players who won as much as you did and who may be more likely to play a certain category of decks over others). For instance, in our 3 decks metagame, if top players are more likely to play Bug Delver than Reanimator, it makes Elves a very strong choice to beat players at the top tables and win the tournament, if you manage to reach these tables!
  • You could use X to represent the average amount of points you win for each match-up instead of just a win % for this match-up. In this situation, an even match-up between two decks D_i and D_j would translate into X(i,j) = 1.5 (instead of 50% previously, because a win is 3 points and a loss is 0 points). Note that this is only useful if you include the possibility of draws in your estimates of X, otherwise it would lead to the exact same conclusions. Once again, this extension comes at a cost (X becomes harder to estimate) and is only useful if you think draws affect match-ups significantly.

 

IV – Anticipating the equilibrium metagame

 

Another application of this model is to anticipating how the metagame can evolve. Assuming players are rational, they will progressively pick-up decks which gives them the highest probability of winning (we ignore variance for this application). By doing so, they will change the metagame M which will in turn change the expected win % W of each deck. An equilibrium is reached when the expected win % of each deck reaches 50%, where each deck gives you the same probability of winning and is an equally good choice for the tournament.

For instance, in our 3 decks metagame, the large presence of Bug Delver makes Elves a strong choice, so the metagame share of Elves will tend to increase, which in turn will make Reanimator a more appealing choice.

The model can be used to calculate what this equilibrium metagame will look like, i.e. finding the metagame M_e so that W is 50% for all decks. This means: M_e = X^{-1} \circ W_{50\%}   (8)

where X^{-1} is the inverse matrix of X and W_{50\%} the Nx1 vector with all elements set at 50%.

Applying (8) to our 3 decks metagame leads to:

  • Reanimator: M_e(1) = 27\%, from previously M(1) = 25\%
  • Bug Delver: M_e(2) = 32.4\%, from previously M(2) = 50\%
  • Elves: M_e(3) = 40.5\%, from previously M(3) = 25\%

As explained above, this confirms that we can expect Elves’ metagame share to increase from 25% to 40.5% while Bug Delver would decrease from 50% to 32.4%. Reanimator’s share is expected to increase slightly from 25% to 27% as Elves becomes dominant. At this stage, playing Reanimator, Bug Delver or Elves gives you exactly the same win %! You can even calculate the variance of each deck in this equilibrium metagame using (7) with M=M_e:

  • Reanimator: SV_e(1) = 11.5\%
  • Bug Delver: SV_e(2) = 10.1\%
  • Elves: SV_e(3) = 8.4\%

The same logic can be applied to larger metagames. However, it is not guaranteed that such an equilibrium can be reached. In particular, this equilibrium cannot be reached if some decks are too weak and their natural evolution is to be kicked out of the metagame: they will just never reach a 50% average win %. Similarly, if a deck is broken with all MUs greater than 50%, its average win % will be greater than 50% no matter how the metagame changes, and an equilibrium can only be reached if all players play this deck.

One way to find an equilibrium in large metagames is to try and invert X: if it is invertible, calculate M_e using formula (8) and check that it is an acceptable solution, i.e. that (1) holds. If not, or if X is not invertible, finding an equilibrium is harder and could be the subject of another article. You can, for example, start with a reduced metagame and augment it incrementally, or use a solver to find the M_e as close as possible to 50%.  I would suggest using a gradient-based approach, which would be very useful to anticipate how the metagame can move step by step.

 

V – Application to a real metagame

 

The Excel spreadsheet provides results for both our 3 decks metagame (‘Small’), and the Legacy metagame M as provided by mtgtop8 in July 2017 (‘Large’). I estimated the match-up X matrix myself based on… nothing in particular: the results here matter a lot less here than the methodology I am demonstrating, so feel free to change these input numbers and check how the results are affected! Estimating X properly is hard and often subjective, as nobody can test all these MUs properly. It could be, however, a joint effort if a community wants to start this gigantic task.

Note that I have put all the Excel inputs in blue and outputs in green. In other words, you won’t break the spreadsheet as long as you only change the blue cells.

  • Tab ‘Small’: this tab is a simple recap of the calculations we discussed above for our 3 decks metagame. The calculations are easy to track in this tab, so it should help you understand the following tabs for the ‘Large’ example.
  • Tab ‘Large – M and X’: this tab formats M and X nicely based on the raw data gathered from mtgtop8 or my guess-work, respectively.
  • Tab ’Large – W’: this tab calculates the expected win % of each deck of this metagame.
  • Tab ‘Large – SV’: this tab calculates the standard deviation of each deck of this metagame.
  • Tab ‘Large – Summary’: this tab summarizes the results of the two previous tabs and sorts them. Note that this tab is just a hard copy of the results produced in the other tabs, it will not change if you modify the inputs. See the top 20 results below.

An equilibrium cannot be found easily in such a large metagame, in particular because some decks are too weak to reach a 50% expected win %. However, an equilibrium can be found if you only take the top performing decks, using the methodology described in section 4. Try to do it, and I will try to follow with another article providing the solution!

Highest win% decks

DeckWin% (W)Standard Deviation (SV)
Miracles54.0%6.8%
Elves53.6%10.3%
Reanimator52.9%8.6%
Show and Tell51.8%8.1%
Storm51.7%8.9%
Grixis Control51.2%4.4%
Stoneblade50.7%4.7%
MonoRed Sneak50.7%8.4%
UR Delver50.6%4.8%
BUG Control50.5%5.0%
Grixis Delver50.4%7.2%
Lands50.4%10.1%
Bant50.2%5.5%
Death and Taxes49.9%6.7%
Food Chain49.6%6.3%
Merfolk49.4%5.3%
Patriot Delver49.3%5.7%
Burn49.2%11.7%
Infect49.1%8.9%
Eldrazi48.7%6.8%

Lowest Variance Decks

DeckWin % (W)Standard Deviation (SV)
Landstill46.1%3.8%
Grixis Control51.2%4.4%
Stoneblade50.7%4.7%
UR Delver50.6%4.8%
Bug Control50.5%5.0%
Aluren48.4%5.0%
Merfolk49.4%5.3%
Bant50.2%5.5%
Canadian Thresh48.3%5.6%
Bug Thresh48.5%5.7%
Aggro-Loam46.6%5.7%
Patriot Delver49.3%5.7%
Stax44.9%5.7%
Bug Delver48.1%5.8%
Dredge45.6%6.0%
Pikula42.5%6.2%
Food Chain49.6%6.3%
Pox46.8%6.4%
Cloudpost46.2%6.6%
Death and Taxes49.9%6.7%

Nic

[Ed. I hope you have enjoyed the more theoretical approach to MTG this article has taken. Please post any questions or queries in the comments and Nic will answer as many as possible]

Nicolas Genieis
Nic discovered Magic in 2009, and started playing Legacy shortly after. He has a few good finishes in the UK, in particular with his favorite Infect deck, winning back to back UK Legacy Champs in 2015 and 2016. He also made the Top 16 at Eternal Weekend EU 2016 and MKM Prague 2017.
Like and Follow The Library at Pendrell Vale:

3 thoughts on “Metagame maths: Finding the best deck to play

  1. Surely we could add an additional weighting of how difficult the deck is to pilot or a weighting according to the pilots considered ability in piloting any given deck, as take the case of miracles is the best deck so just play that falls down it you not a particularly accomplished player where as say sneak and show is a lot more linear and hence easier to play.

Leave a Reply

Your email address will not be published. Required fields are marked *