Swans at the Monte Carlo

Looking around on the internet, I found a few interesting articles doing hard stats work on magic. Pretty consistently, though, instead of doing combinatorial (is that a word?) analysis, they just ran a monte carlo simulation to determine what happens. Having just taken a class on probability, I thought I would try to do some deck analysis the definite, combinatoric way. And then I realized it was hard, so I did a monte carlo simulation as well.

Monte Carlo simulations are named after the casino, though I’m not entirely sure why. The basic idea of it is that often, you have problems you want to solve that either don’t have closed forms or have very complex closed forms (closed forms are expressions that are finite and well-defined. Sorry that’s vague, but I’m not entirely sure what the official definition is either). In the case of Magic, I’m pretty sure closed forms exist to express what sequence of cards you draw and how winnable certain orderings are, but they’re hard. Instead, one can find an approximate solution by running a very large amount of simulations of the problem and determining the answer at the end by averaging over all of those answers.

One place where this can be applied in Magic is to determine when a deck can win. One deck that’s come out of nowhere recently is cascade swans. The deck basically works by combining seismic assault with swans of bryn argoll and a lot of lands. Once you get both cards out, you start whacking your own swans to draw lots of cards, then pitch a bunch of lands to do damage to your opponent. Fun. It got cool when Alara Reborn was printed because cascade cards effectively increase the number of copies you have of each of those cards. So it’s a combo deck, and when the pieces are down, it goes.

There are a couple reasons why I decided to do an analysis of this deck. First, it’s simple. Barring lands (which I kind of ignore because they’re hard), there are only 5 different cards. Because it’s a combo deck, you know exactly when it wins. Two, it’s very non-interactive. Pre-sideboarding, it doesn’t really bother to do anything with or to your opponent other than spontaneously win. The simulation works really well as a goldfish to make it simpler. Three, I was curious to see how the deck works, because I’ve actually never played, played against, or even seen it played in a youtube video. It seems like an easy deck to play, too, unlike, say, sunny-side up, so that would make it easy to program.

To make this work, I threw together a python script that plays a swans deck. It has some pretty simple logic on making choices, and actually punts on most of Magic. But I figured that’s okay. So here’s a look at a couple sample runs.

I ended up programming it in steps to make sure it worked all the way along, and that actually gives us some interesting analysis. Over 100,000 runs, I compiled how many times the deck won on that turn in 4 cases. 1) Assuming Ad Nauseam and Cascade are dead cards and do nothing 2) Cascade works, but Ad Nauseam doesn’t 3) Both work, and Bloodbraid Elf is preferred to be played before Bituminous Blast and 4) Both work, and Blast before Elf. Here are 2 graphs on it. The first is how often it was won on that turn, and the second is cumulative (meaning how often it won by that turn)

Swans data

>>> swans.playGame()
DECK
Land Land Land Land Land Land Land Land Land Land Land Land Land SwansofBrynArgoll SeismicAssault Land Land BituminousBlast Land Land BituminousBlast Land BituminousBlast BloodbraidElf Land Land Land Land SeismicAssault AdNauseam SeismicAssault SwansofBrynArgoll Land BloodbraidElf SwansofBrynArgoll Land Land Land Land Land BloodbraidElf Land SeismicAssault Land Land Land Land BloodbraidElf Land Land Land Land Land
HAND
Land Land Land Land SwansofBrynArgoll BituminousBlast AdNauseam
Turn 1
Turn 2
You drew a Land
Turn 3
You drew a Land
Turn 4
You drew a Land
You play SwansofBrynArgoll
Turn 5
You drew a Land
You play AdNauseam
Off of Ad Nauseam, you drew a Land
Off of Ad Nauseam, you drew a Land
Off of Ad Nauseam, you drew a Land
Off of Ad Nauseam, you drew a Land
Off of Ad Nauseam, you drew a Land
Off of Ad Nauseam, you drew a Land
Off of Ad Nauseam, you drew a Land
Off of Ad Nauseam, you drew a Land
Off of Ad Nauseam, you drew a Land
Off of Ad Nauseam, you drew a SwansofBrynArgoll
Off of Ad Nauseam, you drew a SeismicAssault
Your life is now 13 because of Ad Nauseam
Turn 6
You drew a Land
You play SeismicAssault
You won on turn 6!

swans-cumulative

(there’s some graph-making noobness. sorry)

So some interesting stuff out of that. There’s a 24%ish chance of winning on turn 3 just by playing seismic assault turn 3 and swans turn 4. Just about 53% chance of winning by turn 5 when cascade is turned on, 66% by turn 6, and 86% by turn 10. That’s pretty impressive. There were two things I thought were impressive. One, cascade is obviously huge. Ad Nauseam helps, but it’s really the cascade that makes turn 5 and 6 shine in consistency. Two, there isn’t a significant difference between playing elf or blast first when you don’t have either assault or swans on the table. I guess I could do analysis to figure out whether it should, but the lines are right on top of each other, so it doesn’t seem to matter.

There are obviously some huge issues with the analysis as is, which I know. This includes:

  • No opponent. Of course goldfishing isn’t entirely meaningful
  • I assume that when assault and swans hit the table, you win. This isn’t necessarily true, but I haven’t heard otherwise. If it happens, though, please tell me, and I can stop being lazy and add that to the model
  • It never mulligans, so it’ll keep 7 land hands.
  • Ad Nauseam doesn’t really look for specific cards. It just chugs until it loses about 10 life.
  • And most importantly, I DIDNT ACCOUNT FOR COLORS

There are at least 3 colors in this deck, and more in some other builds. Trip red on assault makes it hard to get other stuff out, so this isn’t entirely fair. Admittedly, I think this sort of analysis is most valuable when figuring out if you’re getting the right colors, but that takes a lot more work that I wasn’t willing to do, since I figured this would be a quick and dirty script.

If you have any programming knowledge, please take a look at the script. I likely made some mistake, and I would definitely be willing to fix that. Even if you don’t program, it’s python; it’s supposed to read pretty much like english anyways, so take a look. And if you have any ideas about how I can make the script more powerful/inclusive or any other analysis that you think might be useful, feel free to leave a comment.

(edit: I guess I should throw out the caveat that this is very much a work in progress. I plan on iterating this a lot before presenting it, so please, any criticism will be good. Particularly, if you’ve actually played swans before, it would be helpful to just get some idea how it’s played. For example, I assumed that swans players prefer to play, not draw, first, and that there’s generally an order to which cards are played. Let me know if there are any more nuances to playing that I could potentially include)

Leave a Reply