Archive for the ‘Final Papers’ Category

Magic and Methamphetamines by Ryan S.

Thursday, December 24th, 2009

(I think this is the last one I’m going to post. It’s a little silly and kind of confusing, so don’t take it too seriously)

Hi, I’m Ryan, and it’s been 2 weeks since I last touched Magic cards. It’s been incredibly tough just to get through the day without thinking about those wonderful, perfectly textured cards and that intricately balanced complex gameplay. I never thought I would end up in this position. No, not me. When I was a kid, I was always told never to do magic, and to avoid it at all costs, else you’ll end up an addict and be out of a job, and live out your life as a failure.  All of those anti-magic campaigns that so many overzealous mothers invest their heart and purse into were wasted on me. I’ve finally decided to turn myself into Magic Anonymous so I can get on with life, but I don’t know if I can.

I will never know how I was convinced to walk into a Magic lab that fateful third week of class. When I first tried magic, I couldn’t believe all the colors I was seeing: red, green, black, blue, and white. Even gold, silver and brown cards were there. Creatures like Mineral Spirits that could cast Ailing Acetone and did 10x damage when paired with the Muriatic acid instant I saw for the first time. Terrifying Tolulene and Basic Bleach were all there. When all of these cards were mixed together into a pack of forty or more, they became an intensively addictive combination and often led to feelings of extreme euphoria. Playing that boardsweeper creature “Dopamine Harbinger” gave me the most amazing mental orgasm I have ever experienced.

Initially, every Magic addict usually starts out with a basic white deck – a mixture of peroxide soldiers and starting fluid. Usually the newbies get a very fine powdered deck to play with, but I was given a rather rough mixture of Kor Skyfunnels and other flying creatures.  At first, my clumsy hands did not know how to handle these dangerous cards, and I fumbled a victory against Kevin without realizing the true meaning of magic: proper mana curves. Plains after plains I played in futile action as Kevin’s control deck slowly took down my naïvely unconstructed white deck.  I just did not have the experience or know how to compete with a Magic lab mastermind like Kevin.

After playing a suspiciously grainy white deck, I decided to give red a try. It seemed more intense, yet effective and it turned out to be far more subtle than I expected. With a reputation for severe nerve damage and small creatures that swung for proportionally large amounts with respect to their health, red became a very fast deck. It took no time at all to reach that apex that the “Dopamine Harbinger” provided, but sometimes, I was simply mana screwed or had to Mulligan. I then realized that red was my Magic color. I identified with it on a much deeper level – it was my drug color of choice.

After several weeks of watching and participating in these addicting magic matches, as well as learning game refinement techniques from Kevin, I felt like I had a good grasp on the whole Magic business. I saw brilliant minds taken in and saw them become obsessed with these magical Magic cards. I tried playing against, green, white, black, and blue decks. I even played against decks of two or three colors – an extremely risky prospect considering the explosive nature of this sort of deck building. Alas, my deck was simply not as well constructed as those other decks, and simply wasn’t as addictive. That’s why I’m here telling you my story.

Actually, what I just told you was the inappropriately dramatized version, poorly parodying methamphetamine drug addicts and parallels the Magic class as a meth lab. Flattering, isn’t it? In any case, the more simplistic content of my essay is below:

Magic the Gathering is a great class. I learned lots of stuff. They had cards that I had to choose and pick colors from so that I could beat other people with cards. It was complicated and I didn’t win a lot, but it was fun too. There was a guy named Kevin and a guy named Tom and they both talked about these ideas that looked and sounded complicated but actually weren’t when they broke it down. I played in a tournament and did not place great, but I still like my deck. My presentation was on a red deck with goblins in it because goblins are cool. We should all play magic. The end.

Wait a minute, I’m sorry, my imaginary 10 year old brother took control of the computer for a few minutes and tried to pretend he was me. I apologize! The real essay is actually below.

As mentioned in the dramatized version of this piece which was constructed based on incoherent thoughts of sleepless-ridden nights of finals week, I did indeed play a red deck. The reason I chose red, was not because I thought it was particularly effective or had an incredibly subtle dynamic between certain creature types and the color of my hair, but, in fact, was being played by very few people at the beginning of the class. Jumping into the course a few weeks late, I was already somewhat confused as to how Magic was played even though I had read through the lecture slides from the previous two classes and Kevin personally taught me how to play. After much trial and error, I realized my red deck needed a serious overhaul in week 5 and I decided I was going to pick a creature type or types and stick with it for a week, so I chose goblins. Why goblins? Other than that they’re in every cool fantasy and some random superhero movies, they’re quite fast at getting themselves onto the playing field, and it’s easy getting lots of them out. They also synergize fairly well with each other (at least as far as red decks synergizing goes).  After playing several different people in the class, I realized that most decks had either a focus on late game creature removal and late game card advantage or enormous creatures and ridiculous late-game pumping spells. So why not try to kill them off before they even put significant creatures on the field? This technique works when these two conditions are actually the case, but often fail horribly against any decks with fairly good midrange creatures that are dominating the battle field by turn 4 or 5. There were probably 3 different cards in my deck that were by far the most useful. One was the goblin bushwhacker, which for a kicker cost of one additional mountain it would give all creatures haste and + 1 attack. In conjunction with Dragon Fodder, it would be 3 creatures/tokens on the field with haste and a total of 6 attack for 4 mana.  Pretty awesome. To finish off an opponent I would usually employ Trumpet Blast after my opponent declares his blockers. This would give every one of my creatures on the field +2 attack, and if I use this in conjunction with the kicked goblin bushwhacker, assuming I have 3 creatures on the field, I do 12 damage to an opponent (assuming no blockers) Pretty devasting.  Although this technique is fun when it works, it’s sometimes hard to get this condition, but it’s definitely worth the losses sometimes. I very much enjoyed this Magic class, not just because it was a game, but because the theories explained in class were explicitly applied to Magic – which is awesome! Thanks for teaching this quarter and have a great break. It was a very enjoyable class, even for someone who had never touched Magic cards in the first place.

Magic: The Language by RJ W.

Wednesday, December 23rd, 2009

(This was one of the most interesting papers I saw, not only for the thought put into it but also for topicality. In it, RJ discusses what would happen were a programming language created to model Magic. Of course, programs that can play Magic exist, such as Modo or Duels of the Planeswalker. All of these, however, implement Magic using java (such as Forge), potentially with the card info in XML format (such as Wagic). You can see a couple different approaches in a great series of posts over at mtgrares, but RJ offers another look at how it might be done)

I’ve been especially impressed this quarter with my class on compilers – a system that initially seems so simple can easily reveal many layers of complication underneath.  Magic is no different, it is a game whose basic rules can be explained in a matter of minutes (as shown in class) but the deep technique and strategy is much more far-reaching and deep.  Thus, given these two systems, each of which is far more complicated than it seems, it was only natural that I wanted to combine them both somehow for this project.  Unfortunately, compiling magic is rather useless without a language to compile, so I began to wonder what designing a programming language explicitly for magic would take.  This paper discusses a possible approach to creating a programming language representative of Magic.

There is no shortage of programming systems in existence today that model magic.  Some are rather basic, in order to accomplish a specific task (such as the example Kevin presented in class), whereas others attempt to model the entire game.  In every case, the game is modeled using an existing programming language, such as C++, Java, or XML (for data representation).  These are not simple representations.  For example, consider cards that fundamentally alter the rules of gameplay (Necropotence, anyone?).  How is it simple to change the rules of the engine that runs the game?  Creating and battling creatures is simple enough, but when spells with complicated or unusual abilities are played, it’s difficult to alter the engine running the game.

So, if we’re to design a language, let’s start with the basics.  The important objects will have to be cards, which can be objects as in any other modern object-oriented language.  Decklists will serve as input to the program, as these allow a game to be run between two players, but since the game is part of the language itself, there is no need to model the game playing engine at all.  The game is run by the compiler, which when given two decklists as programs can compile an executable that simulates a game.

Since cards themselves fall into a limited number of basic categories, these can serve as the keywords for each object.  An initial list of creature, instant, sorcery, land, enchantment, and equipment will suffice for now.  Creatures will contain two attributes: power and toughness.  These can be set as integer values directly, or in the case of certain cards whose power and toughness change depending on the state of the game, methods which calculate the power and toughness appropriately.  Creatures can also have zero or more attributes, such as Flying, Vigilance, Shroud, etc.  Again, since these are language components, there is no need to write any additional code to handle these abilities, unlike existing systems.

Perhaps the most interesting aspect of any permanent, including creatures, lands, and enchantments, would be the abilities.  This is a list of activated and triggered abilities, which will act like the attributes on each card object.  Most abilities have two components: The cost or reason for why the ability would be activated, and then the result or action of the ability.  Given the appropriate encoding, any ability could be added in this way, since the environment is created and managed by the compiler for the language.

For other spells, a more advanced system would be needed.  Lands are relatively simple, only requiring an abilities list in the same way creatures do.  Enchantments only require what they enchant: for example, a regular enchantment is just a permanent, but other enchantments can attach to other permanents.  Equipment will contain a unique field that specifies the cost to equip the item to a card, then just an abilities list.  Instants and sorceries are similar, but different, as they contain a single ability that is the result of the action.

This establishes the basic structure for all the types of cards in the system, but it does not establish the most fundamental part, which is the encoding of abilities.  The critical feature here is that abilities can alter fundamental rules of the game, and the game needs to continue to operate correctly.  Given that there are virtually an unlimited number of abilities that could be encoded, it is impossible to describe all of them here.  Some of the potential options will be described, but given that there are almost ten thousand cards in existence, it would be unfeasible to try to describe all the potential cards that have been created.

First, consider a common ability keyword: target.  This keyword is found almost everywhere in Magic, and provides for the ability to direct the effects of a card to a specific location or group.  For example, “target player” selects a single player, “target creature” selects a creature.  If an ability is targeted, we can introduce a keyword to carry out its effect.  The language of the game will likely grow to include hundreds of keywords to specify all the potential abilities, but this is one critical item.  Other critical encodings would be life totals, players, and permanent typing, which could be accomplished via the card type system described earlier.

I deliberately avoid offering the encodings for cards, as the vastness of the game necessitates that each card could require a new keyword for the ability it specifies.  For instance, consider the landfall ability introduced in Zendikar.  When implementing a compiler, the designer has a choice as to whether to include this keyword in the language, or to introduce a new keyword, or to encode the ability using the existing framework (trigger land battlefield).  Thus, given an appropriate set of triggers and a large enough language, there would be no need to encode new abilities as keywords in the language, or if they were, it would be trivially simple to add a new dictionary of these to lookup.

There is no correct or best way to describe Magic programmatically, however these are some key decisions required when creating such a system.  The idea is that it becomes simpler to model if the game is abstracted away from the programmer, who is given a language powerful enough to create an entire game.  With this ability, Magic can clearly grow as a game, as the compiler for this new language is generic and extensible enough to allow for the creation of new features and attributes without fundamentally changing the language itself.

Appendix – includes example of what it might look like

Limited Format Standouts over the Years – Commons Edition by Reuben M

Tuesday, December 22nd, 2009

(Students have had varying experience coming into the class, and Reuben was one of the more experienced players. He gives a quick recap and analysis of past limited formats)

I’ve been playing Magic since 6th grade, which means I’ve seen my fair share of blocks rotating in and out over the years. I was never huge on the constructed format; as someone with a tendency towards creativity and a desire to do what no one else is doing, it was disillusioning to see my rogue decks go down to Fires of Yavimaya, Psychatog, or Arcbound Ravager.decs. I chose to set my energy on drafting because it was much more under my control. All I had to do was draft something a little sicker than the guys sitting around me and I’d be fine – I never really favored any particular colors (other than black in odyssey block); I would respond to signals and try to send some of my own. This was usually effective for me, other than one time where I first picked a Patriarch’s Desire over Overrun and Wild Mongrel because I didn’t want to compete for green (of course, there was no green in Torment anyway so I’m an idiot.)

The limited format, unlike constructed, is essentially run by commons. Though the bomb rare will win you games from time to time, you won’t have that many of them, and they tend to be slower. So the most important way to win drafts consistently is to have a good feel of the hierarchy of commons, because these are the cards that you’ll be seeing most often and constitute the majority of the draft decisions you’ll have to make. I was originally thinking of making a list of the best draft cards I’ve ever played with, but that’s kinda irrelevant – ultimately, what’s the difference between a huge green fatty and a 6/5 dragon? They’ll win either way. So instead, I wanted to just mention a few awesome commons that you may have otherwise underrated.

GUIDED STRIKE – Instant from Judgment

1W      Target creature gets +1/+0 and gains first strike until EOT. Draw a card.

I would get these passed to me all the time, and I can’t describe how sick they could be. +1/+0 isn’t much of a boost, but first strike means that in combat, this will be a removal spell at least half the time. For 1W. And, draw a card? Are you kidding? Compare this to I would first pick this and value it way higher than anyone – I’m just relieved no one seemed to catch on. Compare this card to second thoughts from odyssey, which exiles an attacker for 5 and cantrip. This is 3 mana cheaper and it can ruin an attacker or a blocker.

TIMBERWATCH ELF – Creature from Legions

2G     1/2     Tap: Target creature gets +1/+1 until end of turn for each elf you control.

Legions was the only set entirely comprised of creatures, which is why the best common in this set is a creature (it’s almost always a removal spell.) If this thing doesn’t get killed the turn it came in, it’s going to absolutely dominate. It’s almost sicker than Sparksmith even from Onslaught, which would ping a creature and you based on your goblins, because Twatch can save itself from removal as long as it’s untapped. I never really liked Legions, for some of the same reasons I don’t like Zendikar, in that it’s too offense intensive, but I had to draft Legions in Onslaught block, and Timberwatch Elf was the standout.

Mirrodin block was a little bit strange and featured an insane number of artifacts, as well as the emergence of Equipment as a new card type. The creatures themselves weren’t great as commons, but there was some key removal spells. I’m not sure whether Shatter or Electrostatic Bolt was better (shatter kills an artifact for 2, e-bolt can basically kill a creature for 1). Another really sick card was Viridian Longbow, an eqiupment which cost 3 to equip and make your creature a pinger. Usable in any deck, this card was fun when you had lots of open mana and some untapped creatures. You could deal a lot more than 1 per turn. And as long as we’re talking about Mirrodin, I know this isn’t a common, but the most dominant card in the entire block is Molder Slug. 3GG for a 4/6, beginning each players upkeep they sacrifice an artifact. Absolutely GG.

One of the best commons in Limited history has been printed and reprinted in several blocks, and it’s called OBLIVION RING. 2W Enchantment, When it comes into play exile a non-land, when it leaves play return it to play. This card slows them down so much and can deal with any permanent, including planeswalkers. No one ever main decked any enchantment hate (it’s not worth it), so this could essentially answer anything for 3. The only drawback to O-ring is that they could always kill it at instant speed during combat and bring their guy back and block you for extra card advantage. But it’s still totally dominant; hearkens back somewhat to Faceless Butcher, the face of Torment, with the same ability as O-ring (just creatures) and with a 2/3 frame no less. Butcher is probably worse overall – being a creature is somewhat of an advantage but also makes it much easier to kill, weakening the ability.

Notice a pattern here? The best commons are essentially always removal spells, ideally with some extra inherent card advantage (a la butcher, strike, etc.) A good removal spell is always more valuable than a good creature, because the best removal doesn’t discriminate, it can kill anything. One amazing common reappeared in Alara Reborn, possibly the simplest one I can think of:

TERMINATE    Instant, Ala Reborn

BR            Destroy Target Creature, it can’t be regenerated.

2 mana, no questions. This card was especially insane given the context of Alara Block, where mana fixing is abundant (rupture spire, panoramas, tri-lands, etc) because decks need to be at least 3 colors for the shard theme. I never really got the privilege to draft Alara Reborn because it was during Spring Quarter and I wanted to make a concerted effort to go outside. It would have been tough, the allure of cards like Terminate almost kept me in for good.

As far as Zendikar goes, I am on record as not being a big fan of the set, but there are three commons that could each make a strong argument for being on top. These cards are all removal spells – in white, Journey to Nowhere; in red, Burst Lightning; in black, Hideous End. These cards are so effective because they can all deal with more than 2 toughness. Two of these cards can even stop the least stoppable card in the set, Vampire Nighthawk. Of the three, I’d probably give the edge to Journey simply because it’s the most universally reliable, as well as being quite cheap (1 less than O-ring even!)

That about wraps up the bulk of my discussion. There’s a hierarchy in looking for cards to draft – first comes bombs, basically just rares or uncommons you can’t pass (Shower of Coals, Flameblast Dragon, Path to Exile, Visara the Dreadful), but removal spells are right on bombs’ tail. Keep the mana curve as low as possible while making sure you still have a win condition or two. Find as much synergy with your cards as possible, but that’s not really the priority – combo decks don’t work too well in Limited because they’re too unreliable what with having only 1 copy of most of your cards. And in general, unless you’re drafting Alara, stick to 2 colors, maybe with a splash. Having good mana is so key.

I just wanted to give one last shoutout to what I believe, no, what I know to be the best Limited Card of the Reuben Moss playing Magic era. This card is from Betrayers of Kamigawa…

UMEZAWAS JITTE                        Equipment, Betrayers

2            Whenever equipped creature deals combat damage, put 2 charge counters on this. Remove a charge counter: either equipped creature gets +2/+2 until EOT, or target creature gets -1/-1 until EOT, or gain 2 life. Equip 2

For how absurd these abilities are, what’s most absurd about Jitte is how insanely cheap it is. Play it on turn 2, equip on turn 3 and attack; you don’t even have to get damage through to immediately take control of the game. If you can keep building charge counters, there are no boundaries for the kind of stuff you can pull. Furthermore, it’s an artifact, so it will work (and be the best card) in any single limited deck.

Draft is awesome, and sealed is slightly less awesome, but still awesome.

Weekly Reports by Pablo C.

Sunday, December 20th, 2009

(We mentioned early on that students could easily do short weekly entries instead of having to write a massive paper in the end. Our intention was to have them post to here regularly, but no one ended up doing that. We do have a series of weekly reports from Pablo, however, in digest form. Perhaps you can see the evolution through the class.)

Week 2

I began building my deck by first deciding that I wanted to play a green deck. I looked through the green cards and quickly decided upon a theme, big creatures with trample using mana acceleration to get them in play fast.  I played the deck a few times and have a couple of observations. First of all I found that regeneration was very useful in keeping my creatures on the battlefield, in particular Refresh and Run Wild worked really well in my deck. I also noted that my mana acceleration did not work quite right. I was lacking Llanowar Elves and Wood Elves, but Elvish Pioneer and Elvish Visionary worked well. There was however one major shortfall of my deck which was the lack of a mechanism to deal with flying creatures. I’ve decided that I will be fixing this by modifying my deck to be red/green. I will add red burn cards that will help me maintain a creature advantage on the battlefield and help deal with flying creatures. I still also need to do quite a bit more research into what cards might complement my strategy.

Week 3

Last week I decided that my strategy against flying creatures would be to use burn cards. However, I looked through all of the red cards today and was not really able to find any good burn spells. Most were either too expensive (5 mana or more) or were too weak (only dealing 1-2 damage). I added red cards to my deck anyway and some of them worked pretty well. However, the element of burn I wanted to help deal with flying creatures simply was not there and my deck once again repeatedly lost to flying creatures. I’ve decided that perhaps a better strategy would be to incorporate flying creatures into my deck as well. Next week I will try to replace red with white. Hopefully I will be able to find some decent white flying creatures and add an element of control to my deck.

Week 4

This past weekend was the Zendikar booster draft tournament and I ended up making a pretty good green/blue deck for it. I realized that one of the important themes of Zendikar was landfall and I tried to build my deck around it. The deck ended up working pretty well and ended up going 5-3, with 2 of the losses being due to being mana screwed. For lab this week I decided to scrap my previous deck and try to build upon my booster draft deck. I simply added some of the green cards I already had and then play-tested it. It worked surprisingly well but still needs some modifications. First of all it lacks big creatures for the end game; the deck has plenty of mana acceleration but not many good high cost cards to bring out in the late-game. This should not be hard to fix with the available green cards in the environment. Dealing with flying creatures is no longer an issue as blue has plenty of flying creatures. However, the deck is also not using blue to its full potential, an infusion of card-drawing abilities and spells would definitely be useful.

Week 5

I participated in another Zendikar booster draft tournament this weekend and built a black/red deck that splashed white for Journey to Nowhere. It worked rather well and I managed to get decent cards even though the guy to my left drafted mono black. I won every game but 2 in the tournament and placed third overall. I continued modifying the green/blue deck I had tried the week before and added some of the black cards I got from the draft as well as some of the prizes I got. The deck is now green/blue/black. Surprisingly there is enough mana fixing in the deck that playing three colors has not been a problem at all in the few games I have played with it. On the other hand the creatures/spells in the deck have not been as effective as I had hoped they would be. However, it definitely feels like this deck could end up being successful with a few more tweaks. I will probably spend most of next week play-testing it to figure out its strengths and weaknesses and continue to modify it from there. I may have to end up dropping either blue or black from the deck depending on how things go.

Week 6

I went to office hours before class this week and picked up quite a few Zendikar cards for my deck. I eventually decided to cut blue from the deck and completely reconstructed it as a green/black deck. The deck uses green mana acceleration (Llanowar Elves and Harrow) for two purposes. The first of course is to quickly get more mana and play big creatures. The other purpose is to trigger landfall on Baloth Woodcrasher and Grazing Gladehart. Baloth Woodcrasher can easily become quite deadly when paired with either Harrow or Terramoprhic Expanse (which each trigger landfall twice and could potentially both be played on the same turn) while in the same vein, Grazing Gladehart can earn you quite a bit of life (I’ve reached 30 or more life several times while playing this deck). The black spells in my deck are mostly removal (Hideous End, Disfigure, and Marsh Casualties) and I’ve also included Vampire Nighthawk which can quickly make a big difference in a game if not countered. For support I’ve included Vines of Vastwood which works both as a counter to targeted spells and as a buff as well as Trusty Machete as a longer lived but less powerful buff. Play testing today was very encouraging and it looks like this is the first really solid deck (outside of drafts) that I’ve made. The highlight of the day was buffing Baloth Woodcrasher up to a 20/20 trample by playing Harrow and 2xVines of Vastwood.

Week 7

This week I made very few modifications to my deck but spent quite a bit of time play-testing instead. Unfortunately, I quickly discovered that my deck does not fare very well against decks that have a lot of removal and direct damage. I played against two such decks and both ended up being long drawn-out matches where we both traded removal spells and ended up just top-decking for creatures. Choosing when to play Vines of Vastwood to keep my creatures alive was absolutely crucial in these matches. I discovered that it’s often better to keep one in hand for when I eventually get the chance to play Baloth Woodcrasher, since my deck has a much smaller chance of winning without a Baloth Woodcrasher in play. I ended up adding a Cudgel Troll and 2 Khalni Heart Expeditions to my deck and next week I will look into adding a Soul Stair Expedition as well. It may prove useful in getting me more creatures in long drawn-out games such as the ones I played today.

Week 8

I realized today that my deck plays more like a combo deck than an agro deck. Just about the only way I can consistently win is by playing Woodcrasher Baloth with one of the several landfall triggering cards. If I don’t get a Woodcrasher Baloth or if it gets countered or removed in some way then my deck has little chance of winning unless my opponent is having serious issues with lack of mana or something similar. I need to devise some sort of effective Plan B that will still allow me to win without Woodcrasher Baloth. Preferably something that takes advantage of the multiple landfall triggering that my deck already employs. Unfortunately, landfall cards only exist in Zendikar and many are rares or mythic rares and are thus not in the environment. One possibility is to change my deck from green/black to green/red in order to incorporate the red landfall cards Zektar Shrine Expedition and Plated Geopede. I could also probably replace most of my black removal spells with red ones. I will probably try this out at office hours as an experiment.

Week 9

Today was the tournament. I spent most of the last week preparing my deck, making various tweaks and putting together a sideboard. My deck worked almost exactly as I expected it to, there were no real surprises at the tournament. I tied my first match, won the second, lost the third, and tied the fourth. It would have been nice to have a little more time for each round since ties don’t really feel satisfying but I’m reasonably happy with the way the tournament went. I was surprised at how powerful the decks were in the tournament given that they were constructed from relatively worthless cards.

Final Paper by Leah T.

Friday, December 18th, 2009

(Here’s one from a beginning player. Definitely a different perspective than most of the students in the class, and if we get a chance to teach it again, we’ll definitely take her comments to heart to make sure that the lectures are relevant to everyone)

I have a confession to make. Before this class, I had never played Magic: The Gathering. In fact, I had never seen a card much less held a deck in my hands.  My only previous experience with the card game was in 2nd grade, when a boy in our class chose to explain the rules of Magic during a talent show.  With a typical 2nd grader’s ennui, I chitchatted with my friends during the demonstration and proceeded to tease the boy mercilessly after the show.  Little did I know that I would eventually join his ranks, casually tossing around terms like “mana” and “swing.”

As I said, I never played Magic before coming to Stanford, but I have had experience with trading card games in the past.  I was an avid Pokémon card player back in the day, and Magic and Pokémon have many similar elements.  Pokémon is like a more scaled down version of Magic, with an “energy” system akin to “mana” but with bigger, more aggressive creatures from the get-go.  Armed with this meager knowledge of trading card games, I prepared to enter the world of Magic.

On the first day of class, I was given a deck that looked something like this:

Initial Decklist (Approximate)

24 Islands

Creatures

4 Sentinels of Glen Elendra

4 Faerie Soldiers

4 Merfolk

2 Changelings

1 Protection from Red Creature

Enchantments

2 Tribal Enchantments

3 Frozen Solid

Scry cards (look at the top two cards etc.)

It was a blue deck, full of merfolk, faeries, and changelings. I think it was meant to be a control deck, but given my limited knowledge of the game I floundered with the weak creatures and couldn’t wrap my mind around the trickier strategic elements.  It seemed like there was so much jargon that everyone understood but me.  That’s one of the main issues I had with the class. I felt like the learning curve was extremely steep and the basics were only covered in the first class.  Nearly all of my classmates were already well versed on how to play the game so we moved on to elements that are more sophisticated very quickly.  Fortunately, two of my classmates were also in my dorm (one of them a very dedicated player), and they helped me to understand the concepts like “flash” and “flying” or the difference between enchantments and instants.

As soon as I grasped the basic concepts of Magic, I quickly realized that my deck sucked.  It was full of weak 1/1 and 2/2 creatures.  The few creatures that were 2/3 or 3/2 had high mana costs.  I attempted to fix this in many different ways but I was essentially just throwing random cards together.  During one lecture, I saw that many pro-deck lists have a theme that helps combine the useful elements of different cards to their advantage.  With this in mind (and an annoyance with the weakness of mono blue decks), I decided to make a blue and white deck about halfway through the course.

My new “deck”, of course, was haphazardly plotted out during the lecture segments of the course.  The lectures were another place where I often felt hopelessly lost.  Many of the game theory concepts and AI seemed very interesting, and I’m sure they would have contributed to my grasp of Magic.  The problem was that most of the lectures seemed tailored to the advanced computer science types.  It felt like there was an unspoken prerequisite for the course, which wasn’t really that big of a deal seeing, as the emphasis was less on lecture material and more on the “lab” portion.  However, at the same time, I kind of “checked out” after the fifth lecture.  So in this environment, I cobbled the sullied remains of my blue deck with white cards from the card pool.  I ended up with something like this:

Previous (Approximate) Deck list

Lands (24)

12 Islands

12 Plains

Creatures

4 Sentinels of Glen Elendra

2 Veteran Armorsmiths

2 Veteran Swordsmiths

2 Deftblade Elites

2 Silvercoat Lions

Enchantments

4 Holy Strength

4 Pacifism

1 Pay No Heed

2 Lifelink

My intent was to create a blue and white soldiers deck. Capitalizing on the fact that the Sentinels of Glen Elendra are faerie soldiers and have flash, I planned to get out some Veteran Sword/Armorsmiths in order to use their soldier buff effects on the other soldiers.  The problem was the relatively high mana cost prevented me from getting them out quick enough.  In order to remedy this, I added some 1/1, 2/2 creatures and planned to use Holy Strengths, Pacifisms, Lifelinks and life gain cards to make up for the weaknesses of my creatures. It was a very crappy, haphazard deck and didn’t get me any wins.  If I had to make this deck over again, I would keep the Pacifisms and Deftblade Elites, mainly because they are a low cost and the Deftblade Elites have some tricky moves like “provoke” and the ability to nullify combat damage.

About a week before the tournament, I gave up on my crappy deck and consulted a long-time Magic player in the dorm for assistance.  Deciding that an aggressive deck would be the best move, I researched some basic aggressive decks on the internet, and found a green and white one to my liking.  It needed a lot of tweaking in order to fit the card pool and my limited skill, with green and with Magic in general.  My final deck is by far the most cohesive and fun to play with.  It’s (nearly) all common so the mana curve fits the low number of basic lands.  Wildfield Borderposts helped to alleviate the low land count by offering a multicolor mana source at a low cost.  I found myself getting out big creatures as well as extremely useful smaller creatures (such as Steward of Valeron’s “vigilance,” the Qasali Pridemage’s “exalted” etc.) very quickly, which was always a problem in the past.  Sigil Blessings and Giant Growths helped buff these creatures even more.  I also had good removals, like Journey to Nowhere or Qasali Pridemage’s nifty “sacrifice to remove enchantment” ability.  This saved me many times against Zendikar “expedition” cards, which put out huge tokens if left unchecked.  I think part of my initial issue with Magic was a desire to play aggressively but starting with the groundwork of a blue, control/combo leaning deck.

Current Deck list

Lands (20)

9 Plains

10 Forests

1 Graypelt Refuge

Creatures (23)

3 Llanowar Elves

4 Naya Hushblade

4 Steward of Valeron

4 Qasali Pridemage

3 Centaur Courser

4 Wild Leotau

1 Serra Angel

Other Spells (17)

4 Giant Growth

4 Journey to Nowhere

4 Sigil Blessing

1 Pitfall Trap

4 Wildfield Borderpost

Sideboard (15)

1 Fog

1 Holy Day

2 Pacifism

2 Kor Skyfisher

2 Pitfall Trap

2 Narrow Escape

2 Kor Sanctifiers

1 Kor Hookmaster

2 Windstorm

I have always loved card games and despite my rough start, I truly enjoyed learning how to play Magic.  I discovered the world of Magic can be at once incredibly strategic, cutthroat, nerdy, and fun.

Magic: The Gathering Paper by Kara A.

Thursday, December 17th, 2009

(I’m amazed at the range of papers that we’ve gotten. Some have been very scientific, but some have not. This is the latter. I think this essay was pieced together from several sources, which is why it’s turned out how it has, but you can take a look)

As evidenced by the balance of power attained in magic the gathering, we can definitively state the superiority of the attributes of the color green to those of blue.  Whilst a dotard may proclaim that the associations of the blue with the ephemeral may obscure the obvious, it is evident that this can be categorically proven false.  Quite the contrary, upon further inspection we find the wealth of positivitudes associated primarily with the azure variety compensate most directly for any shortcomings inferred or implied.  None were.  Upon closure of the aforementioned deal, an astute observer will undoubtebly associate a negative correlation between wavelength and badass.  For who are we to infer to overrupt the obvivity that is inherently associated with the ordration afformentioned —  Hereafter to be referred to as resultive proclivities of the bendifords.  Further upon the andromorphous suppositions of solution we obtain forclosure of the drain.

I am a druid, I live in the forest. More importantly, I’m a Fyndhorn Druid from Fyndhornia, the land of leaves and sorrow. I’m also a today Druid, I don’t think much about tomorrow. I cruise the limbs of the forested Trees and learn their ways through all my days. My ravens are dark, sleek, well-feathered. My wolves hunt with the night packs who know your mother’s cousins. But enough about me, let me tell you the ode to my land, Fyndhornia,

Oh we, the great Fyndhornians

Whose decks of elvish green

Destroy the other colors ‘cause they

Don’t know how to mulligan.

We own the shit out of red and blue,

White and black and we’re probably screwed-

Why must green be so weak-willed

When others just want to have us killed?

I once fell in love with a mermaid once, but one day I realized upon a walk on the beach that the ocean was not so beautiful as others had once proclaimed. That day, I discovered the seismic rift between blue and green and realized that I could only be on my own, without the influence of the ocean. The days of mermaids and counterspells were numbered, and so they finally came to an end. I am now only a monochrome, and so for monochrome we made an ode, an Ode to Green we call it in my homeland:

FOREST! You are my true mana.

ELVES! My faithful treefolk friends.

MARCELLO! Playing the ocarina

In the elevator

Being OH SO MAGICAL

All of us sailing up in skies

The smoke through the recorder billowed and flew forth

And dissolved, and dissipated, avast…

Thank you.

When you figure out how to develop a certain strategy in your game, you first encounter the different types of categories that influence your gameplay. For example, different types of cards may be very strong in certain properties, but you begin to know the values of those differences, at least among the most common enemy pairings, or even – when joint attacks begin to be available – the most common allies.

If you want a really nomadic type of strategy game, send one of your friends running through  the building, repeatedly calling the elevator from different floors. Sometimes she is harassing the general surrounding folks, but sometimes she is interacting with an element within the elevator.

Strategy-wise, she is most effective in games that are not required to be, well, finished any time soon. Say, one where both decks involved are completely lost. If you need the game for some sort of ranking engagement, well, it needs to be finished.

Important point: many people who you never knew played games have played, or even own, Magic.

Owning Magic is not quite as amazing as possessing magic in the Harry Potter™ manner, but it is still something.

Important point 2: Magic is not the same as Dungeons and Dragons.

Another important is the definition of Lost. Lost is what happens when a play does not go to your favor, that is, you lose everything that had been played. It is stored in the Lost file, at least for a while – though be warned, there have been known implementations of the game where the cards do, in fact, disappear.

I ate bagles with cream cheese from the place next door, right after getting my ass kicked by thirty year olds and before getting ripped off by some jackass highschooler. Oh, the magic shop, home to a hill boys weekly distraction: the magic  tournament.  I don’t remember much beyond the soaring feeling of victory (No bird soars too high, if it soars with its own wings, as William blake reminds us from the flavor text of Winged Drake, tempest edition) and the feeling of, if on;ly I hadn’t been mana skrewed, THEN I could of won (the chronic gambler’s mantra). Nothing actually sticks to mind except   “ … but the lack thereof would leave me empty inside, swallow my doubt, turn it inside out find faith find nothing… heart in a blender wanna spin around to a beautiful oblivion. “ That’s the only thing that matter from those warm or cold days, those bagles and skittering skirges, those thirty year old men and highschool jackasses (all highschoolers are, I promise.) The lyrics to an eve 6 song that I don’t know the name to (to which I don’t know the name).

Magic is a cool game because it has really complicated rules but actually really simple rules. The rulebook is like 600 pages but you don’t have to read it all. The rules are right on the cards! It’s like chess with 10000 interchangeable pieces that interact in crazy ways. If you play, you will gain both intelligence points and fun points, thus leveling up in an enjoyable fashion. The colors bring a nice personality to the game and the theory can get really deep. Sometimes if you tap the cards just right, you will feel one with the universe.

I love magic the gathering.  T

Be careful with magic. When mixing feather of lion into your cauldron, be sure to add some hemlock and stir counterclockwise unless you want your eyebrows singed off. Invest in a hairtye or perhaps a stylish rune-inscribed rybbon to hold back your long wizardly beard during potion preparation. I’ve accidentally dyed mine an obscene shade of pink that elicited much mockery from my colleagues. Those sexy wild witches with flowers and frog legs in their hair, chasing the moon and collecting the tears of stars at midnight, on their swift brooms…avoid them. They will break your heart, and you’ll be lucky if it’s metaphorical. And their damn black cats will love nothing more than clawing up your blood-written spellbooks, which are a bitch to replace given

the economic depression. Also, allow me to put in a good word for the pipeweed. My buddy Gandalf can even teach you how to blow ships. And my old flame Broomhilde can probably teach you how to blow dragons, but I wouldn’t show that trick off to the kids. The dragons might have privacy concerns. P.S. There’s these new-fangled fluffy pagans, Wiccans, whatever that spell it Magyck. Fuck them. Buy a dictionary, ladies. Changing the spelling won’t change how much you fail at spelling.

“Baby I want you long and sweet”. This essay will hit the page limit and then some.

Arthur C. Clarke said that “any sufficiently advanced technology is indistinguishable from magic.” Forget witches and wands, we’ve got iPods and TiVos, y’all! World of Warcraft – thousands (hundreds of thousands? Millions?) of people, enacting their nerdiest fantasies together, including yes, wizards, separated by thousands of miles, over wires in the ground or even through the air itself! – is nothing if not magic. Might it even be the new Magic – Magic the Gathering, that is? :-O The new pastime for a technologically magical generation.

And now for something completely different.  Let’s discuss how to incorporate a mana curve into a traditional booster draft.  Consider the following scenario: it’s your 11th pick in the first booster, and you have to choose between a (W) 1/1 flyer and a (2)(W)(W) pacifism.  In the abstract, there’s no way to determine which pick you should take.  I can easily construct picks 1-10 such that the cheap, aggressive flyer is clearly preferable to the slow, vulnerable removal spell.   But I could also easily construct picks 1-10 that predict a slow, card-advantage based UW control deck where early tempo not nearly as important as an abundance of removal spells.

In general, it is important to consider with each pick not only which card is objectively best, but which card best interacts with the cards you have already drafted.  For example, if you are drafting a UR tempo based deck, but have seven bounce spells and no burn, a bad burn spell is a much better pick than a quality bounce spell.  Or in a URGBW domain deck, if you have three great finishers but no mana-fixers, a land search spell is a much better pick than a fourth finisher.

Love, the Elevator and Breakfast Room Crews

Estimating the Number of Magic Game States by Frank L.

Tuesday, December 15th, 2009

(I think I might be posting mainly very technical ones, unless there’s interest in seeing the other ones. I don’t intend to post all of them, but I figure I should at least present the ones with the most innovative ideas. In this one, Frank does what he says in the title: estimates the number of Magic game states. I talked about the position space of Magic and how big it is, but Frank actually goes about quantifying it. Anyone want to check his math?)

Like many other games, Magic has a finite game state. That is, there are a finite number of combinations of cards in play, cards exiled, cards in the graveyard, cards in the library, cards in the hand, cards tapped, counters, life totals, etc., at least in normal gameplay. This fact arises from the finite set of cards in existence, and, as far as I know, no card exists that can lead to a repeated game state. This leads to a natural question: how complex is Magic?

I assume that the number of possible game states is a measure of the complexity of the game. Checkers, which has already been solved, has around 1018 board positions; chess has 1043 positions; go has a whopping 10190 board positions. The rules of Magic are significantly more complex than the straightforward rules and limited pieces of checkers, chess, and go, which makes it necessary to make a few simplifying assumptions.

First, I establish the definition of a board position in Magic. I simplify the set of all cards into three categories: lands, creatures, and other spells. With this trichotomy in mind, I consider life totals, number of cards in the library, number of cards in hand, creatures in play, land in play, creatures tapped, lands tapped, and number of cards in graveyard, but I do not consider counters, planeswalkers, cards exiled, cards morphed, etc. My game states are evaluated at the beginning of each turn, where each player takes a different turn. Because of the wide and ever-expanding rules of Magic cards, there are too many contingencies, too many twisted subtleties in the rules for me to include other parameters in this estimate.

Second, I consider only the case of a two-player game, with life totals starting at 20, each with 60 unique and distinguishable cards. I use averages of the top 11 decks listed on the Magic the Gathering site to establish 24 lands, 20 creatures, and 16 other spells in this deck. I assume a mana curve of 3. The assumption that the deck has 60 distinguishable cards may seem unfounded, especially considering that most decks will have 3 or 4 of the same crucial card. In some ways, this assumption serves to counterbalance the lack of treatment of other board situations that can arise in normal gameplay.

Third, I make the assumption that decks are randomly shuffled, that each player draws exactly one card each turn, that only damage is dealt by creatures, that creatures are X/X (where X is their converted mana cost), that all spells are colorless (and hence do not run into the issue of mana color), and that all non-creature spells are instants and deal X/2 damage, where X is their converted mana cost. The maximum hand size of 7 is not enforced. No spell-countering, life-gain, discards, mulligans, or other aberrations occur.

Fourth, I violate all rules of statistics and make the simplifying assumption that E[AB] = E[A] * E[B] for all A and B. That is, any two variables of interest are independent. This affords a convenient way of calculating the number of Magic game states. I calculate by simulation the number of possible board positions per game. The total number of Magic positions is this number, multiplied by all valid pairs of 60-card decks formed by permuting the 17,118 unique Magic cards in existence.

Let’s define a few terms and variables. A turn consists of a move by a single player, so player one will have odd turn numbers and player two will have even turn numbers. Let Ln be the life total on turn n. Then let Hn = HCn + HLn + HSn be the number of cards in hand at the end of turn n, where HC, HL, and HS are the number of creatures, lands, and other spells in the hand at the end of turn n. Let PCn and PLn be the number of creatures and lands in play at the end of turn n. Further subdivide these into TPCn and UPCn (tapped and untapped creatures) and TPLn and UPL (tapped and untapped lands) at the end of turn n. Let Tn = 3 be the average power/toughness of the creatures in play by turn n, and Cn = 3 be the average converted mana cost of the creatures and other spells in the hand.

A conceptual argument for the calculations of these two numbers follows. E[Hn] is the number of cards in the hand after the draw step of turn n. So the update for the draw step is

Hn := Hn + 1 Card draw

HLn := HLn + 24 / 60

HCn := HCn + 20 / 60

HSn := HSn + 16 / 60

Each turn, a player can play a land if E[HLn] > 1, play spells with a combined mana cost less than or equal to E[UPLn], attack with any combination of E[UPCn], and be blocked against by any combination of E[UPCn-1]. Since game states are evaluated at the beginning of each turn, the order of playing lands, playing spells, and attacking does not matter. To account for summoning sickness, I will assume that all spells are played in main phase 2, after attacking.

Let’s address attacking first. Random attacking is a binomial distribution with N = E[UPCn] and p = 0.5. The number of attacking possibilities is 2 ^ E[UPC], since each creature can either attack or not, and the expected number of attackers per turn is E[UPCn]/2. Random blocking is a multinomial distribution with N = E[UPCn-1] and p = 1/(E[UPCn]/2 + 1). Then the number of blocking possibilities by the opponent is (E[UPCn]/2 + 1) ^ E[UPCn-1]; that is, each of the opponent’s creatures can block one of the attacking creatures or not at all, and the expected number of blockers per attacker is E[UPCn+1] / (E[UPCn]/2 + 1), multiplied by a BLOCKING_COEFF that specifies players’ tendencies to block. Assuming that the creatures have roughly the same power and toughness by symmetry, the number of attacking creatures killed KAn roughly equals the number of defending creatures killed KDn: E[KAn] = E[KDn] = E[UPCn] * E[UPCn+1] / ((E[UPCn]/2 + 1) * 2). Then the following updates occur after the attack:

Ln+1 := Ln+1 – (UPCn/2 – KAn) * Tn Life total of the opponent

UPCn+1 := UPCn-1 – KD­n Defenders killed

PCn+1 := PCn-1– KDn

TPCn := PCn – UPCn/2 – KAn Attackers killed and tapped

UPCn := UPCn/2 Non-attackers remain

PCn := UPCn + TPCn Update creature count

After the attack, a land is played if possible:

UPLn := PLn + (HLn >= 1 ? 1 : 0) Land played

PLn+2:= UPLn

Then creatures and spells are played. The total number of E[HCn] creatures and E[HSn] other spells played follows a uniform distribution from 0 to E[UPLn] / E[Cn] , for an average number of x = min(E[HCn] + E[HSn], E[UPLn] / (E[Cn] * 2). Then the number of creatures played is E E[HCn] / (E[HCn] + E[HSn] ) * x, and the number of spells played is E E[HSn] / (E[HCn] + E[HSn] ) * x. This introduces 2 ^ (E[UPLn] / E[Cn]) possibilities at this stage. So the updates after main phase 2 are

UPCn := UPCn + E[HCn] / (E[HCn] + E[HSn] ) * x

PCn := UPCn + TPCn

HCn := HC­n – E[HCn] / (E[HCn] + E[HSn] ) * x Creature played

HSn := HS­n – E[HSn] / (E[HCn] + E[HSn] ) * x

Ln+1 := Ln+1 – E[HSn] / (E[HCn] + E[HSn] ) * x / 2 Spell played

TPL­n := PLn / 2 Lands tapped

UPLn := PLn / 2 Lands untapped

Hn := Hn – E[UPLn] / (E[Cn] * 2) Hand count update

Finally, plugging in the initial values and simulating on a computer:

E[Cn] = 3 E[Tn] = 3

L1 = L2 = 20 BLOCKING_COEFF = 0.5

H1 = 7 E[HL1] = 7 * 24 / 60 E[HC1] = 7 * 20 / 60 E[HS1] = 7 * 16 / 60

H2 = 7 E[HL2] = 7 * 24 / 60 E[HC2] = 7 * 20 / 60 E[HS2] = 7 * 16 / 60

n

L

H

HL

HC

HS

PC

UPC

TPC

PL

UPL

TPL

#poss

1

20

5.83

1.8

2.24

1.79

0.09

0.09

0

1

0.5

0.5

1.26E+00

2

19.96

6.83

2.2

2.57

2.06

0.09

0.09

0

1

0.5

0.5

1.59E+00

3

19.96

5.5

1.2

2.39

1.91

0.28

0.23

0.04

2

1

1

2.70E+00

4

19.76

6.5

1.6

2.72

2.18

0.27

0.23

0.04

2

1

1

4.61E+00

5

19.77

5

0.6

2.44

1.96

0.53

0.41

0.12

3

1.5

1.5

1.14E+01

6

19.28

6

1

2.78

2.22

0.51

0.41

0.1

3

1.5

1.5

2.88E+01

7

19.34

4.33

0

2.41

1.93

0.84

0.63

0.21

4

2

2

1.13E+02

8

18.49

5.33

0.4

2.74

2.19

0.78

0.61

0.18

4

2

2

4.51E+02

9

18.67

4.67

0.4

2.37

1.9

1.07

0.76

0.31

4

2

2

2.38E+03

10

17.42

5.67

0.8

2.7

2.16

0.97

0.72

0.25

4

2

2

1.22E+04

11

17.77

5

0.8

2.33

1.87

1.22

0.85

0.37

4

2

2

7.99E+04

12

16.18

4.83

0.2

2.57

2.06

1.19

0.89

0.3

5

2.5

2.5

6.20E+05

13

16.69

4.17

0.2

2.2

1.76

1.4

1.01

0.39

5

2.5

2.5

6.18E+06

14

14.82

5

0.6

2.44

1.96

1.32

0.98

0.34

5

2.5

2.5

6.09E+07

15

15.48

4.33

0.6

2.07

1.66

1.51

1.08

0.43

5

2.5

2.5

7.24E+08

16

13.35

4

0

2.22

1.78

1.5

1.12

0.37

6

3

3

1.03E+10

17

14.14

3.33

0

1.85

1.48

1.64

1.21

0.43

6

3

3

1.80E+11

18

11.83

4

0.4

2

1.6

1.59

1.19

0.4

6

3

3

3.16E+12

19

12.71

3.33

0.4

1.63

1.3

1.72

1.26

0.46

6

3

3

6.34E+13

20

10.24

4

0.8

1.78

1.42

1.65

1.23

0.42

6

3

3

1.23E+15

21

11.23

3.33

0.8

1.41

1.13

1.76

1.29

0.47

6

3

3

2.67E+16

22

8.6

2.83

0.2

1.46

1.17

1.77

1.34

0.43

7

3.5

3.5

6.96E+17

23

9.68

2.17

0.2

1.09

0.87

1.86

1.4

0.46

7

3.5

3.5

2.09E+19

24

6.96

2.67

0.6

1.15

0.92

1.84

1.39

0.45

7

3.5

3.5

6.42E+20

25

8.08

2

0.6

0.78

0.62

1.9

1.43

0.47

7

3.5

3.5

2.13E+22

26

5.27

1.33

0

0.74

0.59

1.96

1.51

0.46

8

4

4

8.80E+23

27

6.42

0.67

0

0.37

0.3

2

1.54

0.46

8

4

4

4.07E+25

28

3.59

1

0.4

0.33

0.27

2.02

1.56

0.47

8

4

4

2.00E+27

29

4.71

0.4

0.4

0

0

2.01

1.53

0.48

8

4.2

3.8

1.02E+29

30

1.88

0.8

0.8

0

0

1.99

1.5

0.49

8

4.4

3.6

5.24E+30

31

2.98

0.8

0.8

0

0

1.65

1.16

0.49

8

6.2

1.8

2.60E+32

32

0.28

0.2

0.2

0

0

1.72

1.16

0.56

9

7.2

1.8

1.31E+34

33

1.16

0.2

0.2

0

0

1.48

1.03

0.46

9

7.2

1.8

5.06E+35

34

-1.22

0.6

0.6

0

0

1.6

1.08

0.52

9

7.2

1.8

2.00E+37

According to this calculation, the average length of a Magic game is a reasonable 33 turns, with around 1035 different possibilities of play. However, this does not include the 60! possible permutations of cards drawn for each deck. So each game has 1035 * (60!)2 ~ 10200 possible outcomes. Then considering all possible pairs of 60-card decks, I derive the following for the number of possible Magic game states: 10200 * ((17118!) / (60! * 17058!))2 ~ 10550 .

This number is unfathomably large, much larger than the 10190 board positions of go. Even though the estimate of 10550 game states is necessarily extremely rough and simplified, it provides a glimpse into the true nature of the game’s complexity. In the end, all this math has simply confirmed what we perhaps knew all along: Magic is complex.

On the Application of Bayesian Analysis to Magic by Chris D

Sunday, December 13th, 2009

(Here’s one of the more technical papers I got. Very, very interesting analysis of Magic AI. Of course, the people out there who actually do Magic AI have a better idea how true these things are, but I think there a bunch of good observations. -Kevin)

Recently, deterministic computer systems have been shown to be highly effective in the solution of various games of strategy previously thought exclusive to the provenance of human thought.  Chess, and other chess-like games, are a primary example of this.  The ability of computer systems to play strategy games such as chess has presently surpassed all human players.  Indeed, for some simpler games, such as checkers, computer programs have successfully “solved” the game – creating an algorithm that, along with a corresponding database of predetermined calculations, can provably determine the best move in any position in a relatively short amount of time.  On the other hand, many other strategy games have not been successfully played by computers.  This lack of success can be attributed to a variety of vicissitudes, depending on the characteristics of the game being attempted.

Chess is a particularly auspicious candidate for computerized solutions, being that it is: (1) open in the information domain, that is, all aspects of the game state are known to all players at all times; (2) highly tactical, that is, many if not most variations involve lines of play in which each player is forced to play from among a very small number of good-looking moves, and where all other moves can be clearly shown to lose, which decreases the branch factor of the game tree; (3) simple to define, that is, each piece moves according to basic geometric factors and legal moves tend to remain legal over long periods of time; (4) drawish, that is, games tend to produce draws and wins always involve capitalizing on the opponent’s errors.  These factors combined make chess a good candidate for computer play.

Magic the Gathering, on the other hand, is, for many reasons, poorly suited to be played by an artificial intelligence.  These include the facts that it is: (1) closed in the information domain, that is, portions of the game state, such as the content of the players’ hands, is known by only one player, and, additionally, the order of cards within the players’ decks, which, overall, represents most of the information content of the game state, is hidden from both players.  This will present problems to any computer trying to play a good game of Magic, although it can be mitigated somewhat by considering the fact that the impact of the information of card order within the deck on the outcome of the game is much lower than that of the information that is available to the players.  Additionally, Magic the Gathering is: (2) highly strategic, that is, players are seldom forced to do anything, and there are many points of time within each “turn” where players may act or react (but usually choose not to), further increasing the time complexity of the game tree; (3) difficult to define, that is, as there are thousands of Magic cards in print, many of which have eccentric and difficult to implement rules that alter or create new aspects to the game state, it is difficult to represent and effectively analyze the game state; (4) random in outcome, that is, games tend to be won or lost often based upon random chance, and in many cases strategy is less important than drawing the correct card.

Many of the ways in which Magic is difficult to implement on a computer can be resolved, if only partially, through an aggressive use of Bayesian analysis.  In particular, Bayesian analysis allows the program to make decisions based only on a partial knowledge of the game state, and to update its decision algorithms depending on new information that becomes available.  However, since the expected behavior of the Magic the Gathering, when considered as a system, is highly dependent on the behavior of the opponent, it is difficult to use Bayesian analysis to determine the correct play in a given situation.

A computer should be able to manage Magic data from multiple perspectives.  In general, we can consider the effects of a play as an Aggro, Combo, or Control action.  Also, we can attempt to quantify the loss/benefits of an action in terms of variables such as (1) life lost/gained, (2) damage dealt, (3) field advantage, (4) card advantage, (5) mana acceleration, (6) information gained/lost.  An example of a card which would give card advantage is Divination, which draws two cards at the cost of one.  An example of a card which causes information loss is Time Spiral, since it causes cards from the hand/graveyard to be shuffled back into the library.

When designing a deck, it is important to keep a balance between many different factors.  For example, in decks which include mana acceleration, it is critical to have exactly the right number and kinds of cards which provide mana acceleration.  Even in decks which do not focus on card advantage, it is often beneficial to include it.  For example, I included two Sign in Blood cards in my class tournament deck, in order to provide card advantage at critical times.  I also included two Gravediggers, which are also intended to provide card advantage.  In general, I found the addition of the additional element of card advantage to be invaluable in defeating certain kinds of Aggro decks within the environment, specifically those which would go full Aggro for the first few turns of the game and then run out of cards to play.  Against these sorts of decks, I can trade my creatures one for one (or in many cases one for two) and, by gaining card advantage from such cards, still have one or two extra cards later on to play when my opponent has run out of cards.  Similarly, any computer program that attempts to play magic must be aware of elements such as card advantage, field advantage, and mana acceleration, which, although possibly orthogonal to their main strategy, will provide the additional push needed to dominate a similarly situated opponent.

One major barrier to the performance of the Magic the Gathering engine is the lack of professional Magic games recorded in a computer-readable format.  In comparison, chess has hundreds of years of history over which the rules of the game have remained basically the same, and millions of recorded games played throughout that history.  The nature of chess also lends itself to being recorded and analyzed by computer programs.  On the other hand, Magic the Gathering has rules that change every few months, and its games have no real ability to be recorded, partially due to the limited information available to players.

Several elements of strategy which I found useful during the tournament could, under the right conditions, be adapted to play using a computer algorithm.  I found that it was generally best to get out a creature on turn one, and to use the most powerful creature available when one does so.  So, for example, I started off many games with my tournament deck by playing a Swamp and then casting a Vampire Lacerator, which is a 2/2 with a negative ability of life loss for its controller.  If I am going second, this is especially useful because it discourages attacks from 1/1 creatures my opponent may have played on his or her first turn.  If I am going first, then I can usually attack on turn 2 for 2 damage, and then play an appropriate 2-drop creature, such as a Rathi Trapper 1/2 or a Putrid Leech 2/2, both of which can block enemy one-drop attackers.  A computer would also need to know when to trade its creatures for its opponent’s creatures; for example, if I played a Vampire Lacerator on turn 1, and my opponent played a Goblin Guide 2/2 and swung with it, I would probably block and trade my Lacerator for his Goblin; on the other hand, if instead I was playing green and had out a Llanowar Elves 1/1, and my opponent played a Raging Goblin 1/1 Haste and swung, I would probably not block and the computer ought not to block either.  On the other hand, there may be special conditions during which these actions would not be correct.  For example, if I controlled a Lacerator and my opponent swung with a Goblin Guide, and I noticed that I have a Child of Night and two Feast of Bloods in my hand, then I might not block in order that I can play my Child of Night on turn two, and then control two vampires in order to satisfy the cast condition for Feast of Blood.  So this situation is really more complicated than simple rules can determine.  This is why Magic is such a complicated game and is hard for computers to play well.

Excerpt from Ben’s Final Paper

Saturday, December 12th, 2009

I’m not exactly sure how I’m going to deal with these papers, but maybe some will be posted in full, some may just be parts, and some may get comments as well.

In any case, here’s an excerpt from a paper by Ben G., who wrote about his madness deck and the idea of information in Magic:

While studying epistemic logic, I found that the idea of controlling information was really interesting to me; what value do we place on information, and how do we control it with our actions? The general impression I got from the class is that information is valued relatively poorly, but is still valued. That is to say, the aspect of information shouldn’t change whether a player should perform an action, but it should change when or how an action is performed. If a player can play a creature, they should wait until after the combat phase so that they limit the information available to the opponent. Unless, of course, playing the creature earlier gives any advantage, in which case that value overrides that of the information revealed.

I think this is a really interesting point to make, about the when and how, not the whether. The way I see it, you use information primarily to let your opponent make mistakes. A classic example is “drawing the counter” when you slow-roll your hand or play cards in an atypical order to make your opponent waste counterspells on non-essential things.

Information is a favorite topic for Magic writers. I actually just saw one from Ben Stark on channelfireball about it that I actually haven’t read it. It’s a hard topic to address because I think the scope of Magic is too large to explain how information should affect your play-by-play. Instead, I think the general guidelines that writers give you are the best part because they make you think about playing Magic differently.

Magic AI by Gabriel Kho

Thursday, December 10th, 2009

My first experience with Magic: The Gathering was when I walked into my local comic shop one day at the tender age of 11. My only previous experience with card games was with the Pokemon: TCG. Then before my eyes I saw Magic: The Gathering Starter Set for some block I forgot about. Unfortunately, I found the card game’s instructions too complicated to follow so I abandoned it, though I must confess card games interested me, not because of the underlying strategy, but because I was interested in the art and the collecting aspect of TCG’s. Eventually, I saw the beauty in the strategy and metagme.

Flash-forward to freshman year of Stanford (2009), my RCC e-mails my freshman dorm about this Magic: The Gathering course. The fact that it was categorized under Symbolic Systems caught my attention because I was thinking about majoring in it. Also, I saw a video about a Starcraft class being taught in UC Berkley. I thought it might be a cool idea seeing how Magic: The Gathering implements game theory, game design, statistics and a breadth of other fields.

One of the areas of interest that I found fascinating was the AI. Unfortunately, I was absent for that lecture because I was busy taking a midterm. I am also not an expert in the field, the most advanced course I’ve taken to CS is the intro course. I heard Kevin made an AI that would run Magic: The Gathering. I am far from being even competently versed in this field, but I think it would be cool if someone could make an AI that could make strategies, or recognize combos when they exist. Maybe one day, there could be a Magic: The Gathering World Championship for AI. It would even cooler if it was a Draft or Limited format.

The different fields that contribute to your decision-making within the card game also fascinate me. Example, epistemal logic, knowing what your opponent knows helps determine your decision like if a player should play a creature or not. In that scenario, statistics helps a player understand the possibilities. Applying game theory to analyze what the best options are is something I never thought about. I think that all these fields coming together to produce an AI is an exciting concept.  I researched this and saw Wizards implemented it for Duels of the Planeswalkers. The article I read talked decisions tree. They talked about thinking about possible responses to each action. The main problem with the implementation was that they had to know how to use processors smartly. The solution was that they ruled out decisions that led to mostly bad scenarios for the AI or ones that made no sense like playing Giant Growth on an opponent’s creature. However, the developers did note that sometimes, those actions could have beneficial outcomes. The actions were self-segregated. However, the developers admitted that that there was no creativity or uniqueness to the AI. The AI couldn’t handle or create combos. I don’t know why that is so if they just have to check the decision tree for the most optimal result by scoring decisions and picking the one with the highest score. The AI can only think 3-6 levels deep.

Another blog (http://mtgrares.blogspot.com/2008/12/ai-overview.html) I read talked about how an AI the creator of the blog developed had code imbedded in the cards that would give guidelines to the AI on how to play the card. Example, Wrath of God is only played if there is a creature in play. Giant Growth is used on an attacking creature. However, the problem is that the selection of the cards is random. That means it isn’t the most efficient piece of code so it isn’t one that can beat humans. This is line with the Wikipedia article on the Xbox Live Magic video game, Apparently, since any card can override the game’s core rules, they had to program for special scenarios.

The blog (http://mtgrares.blogspot.com/2008/12/wizards-is-trying-to-kill-me.html) talked about how it troublesome to deal with new sets because they use weird mechanics. I can imagine landfall effect would cause problems for updating current AI. I imagine it would take incredible foresight to predict effects like cascading, landfall and quests. Implementing an AI that could handle these things without any modification before these concepts were introduced is something that is beyond the scope of the current AI.

I discovered certain things about my decision making and strategizing while playing Magic: The Gathering games and deck building. I didn’t just want cards that were effective. I wanted cards that had synergy in both effects and art. I wanted a deck with a very clear theme like birds or goblins, even if the theme didn’t create special effects like allies did. The cards I liked for their abilities were often the more useless ones that you couldn’t depend on like Hedron Crab, which has a random card effect that could be useful or useless depending on your luck. I wanted to win, but I wanted to win a fun way. I did not want a cold calculating sheer force way to victory (no offense to those who prefer this), I wanted to a strategy that would work 2/3 times or 3/5 times. I wanted a unique strategy that no one else uses or sees coming. I guess in the description of players I would be a Timmy, partly because I’m not good enough to be a Spike or Johnny. I would want to be a Johnny-Spike hybrid but I would need to increase my level of playing.

In fact, my favorite deck is one that isn’t my most effective, but rather one that follows a theme, Landfall. Ideally, when a land falls, multiple effects should occur. This was a deck I made during the booster draft of Zendikar, so it was obvious that I had a lot of Zendikar cards in supply within the draft. The Hedron Crab helped mess-up the tempo of my opponents when their bombs would just go to the graveyard. The deck depended on luck and would always have different results every time, as opposed to my deck that I used for the tournament which used a lot of creature removals from different blocks: Alara, Zendikar, and Magic X.

In comparison, people were better than me at deck building. The reasoning is that people used smarter methods. Example: Kotaro used permutation in order to design his five-color deck. People actually knew how to weigh the differences between cards, i.e. they knew which ones were better based on variables like mana cost, attack, toughness and mana abilities. I didn’t know much about possible alternatives. Once I found a card that did what I wanted, I stopped searching for cards to take its place. Needless to say, it was hard to part with my initial deck of birds, because I didn’t want to part with the theme.  However, sometimes you just have to throw it all away.

The meta-game affects how the deck was designed. I didn’t want to be green or black because everyone was black or green. I wanted originality so I decided to go either blue or multi-colored. However, I compromised and realized the power of the black cards in the pool. However, if I could have wanted to, I would have picked the color least represented in the tournament. The advantage of picking an unrepresented color is that no one would be prepared for it, and even if they sideboard for it, it’s a couple of cards.

Programming an AI that plays a flawed game like me solely because of personality would be very interesting. Instead of an AI that plays the game coldly and efficiently, it would very interesting because it’s an AI that has a personality. Like Wizards talked about, there’s Spike’s, Timmy’s and Johnny’s. Programming an AI to be a Spike would be boring, and it would be interesting if they were designed to be Timmy’s and Johnny’s. I remember Edgar talked in his presentation that he plays to annoy people instead of to win. Match-ups against AI like that would give more flavour to fighting against AI’s.