Saturday, March 16, 2013

It's a kind of Magic, The Gathering

Most of you might have heard one day about Magic, The Gathering (MTG): a famous trading card game. I played this game when I was 12, only for a few months while the game was very popular at school.

And 2 years ago, I discovered Magic once again. But this time I realized that it was totally different than what I could have understood so far. Far more complex, fascinating and entertaining than I thought  when I was a young teenager. Not a simple collectible card game. Maybe you already know MTG and you don't need to read this article further. If you don't know it, let's discover why I definitely love this game.


In a few words, each game consists in a battle with 2 players starting with 20 life points and a 60 cards deck (= the "library"). Basically a player loses when its life is reduced to zero. Decks are shuffled and each players draws 7 cards, then the battle begins. Players can cast spells, summon creatures and attack their opponents to reduce their total life amount. A spell needs "mana" to be cast, and this mana can be produced with cards called "lands", and everything take place in a fantasy universe closed to the Dungeons & Dragons one. Here is the most simple overview of the game, real rules take much more time to be be read. You can even find a concept of "stack"; yes, this is a real stack (you know, the data structure with push() and pop() methods) that describes how spells will be resolved.

One of my current favorite card.

You are a manager!

In the Magic world, if you're expecting to win, you have to manage efficiently different kind of resources:
  • Cards in hand: basically, the more cards you have, the better chance you have to be able to play the great card at the great time).
  • Mana sources: you need to have enough mana to play your other spells, but you need to not only draw mana source cards. Remember, you need to play spells if you want to win...
  • Creatures on the battlefields: put pressure on your opponent with lots of great creatures.
  • Graveyard (cards you've discarded): some cards can be played even if they've already been played! Once you've discarded these cards, you can play them almost whenever you want/need, that's powerful!
  • Cards in your library: instead of putting pressure with creatures, some players are focusing on improving the "quality" of cards they will draw. Some spells allows you to draw more cards than your opponents, this way you might draw a spell that can destroy all your opponent's creatures.
  • Time: if you think you're going to lose a game, you can try to "lock" it and ensure getting a draw game, that's still better than losing it...
These are the main resources you have to handle in a MTG game. To increase your victory rate in a tournament, you must handle your resources better than everyone else. Don't waste your mana, draw cards, don't let statistics beating you.

Statistics and behavior models

With the most traditional game rules, there are some rules you have to follow when building your own deck:
  • At least 60 cards in your deck.
  • You can put as much land cards (= mana) as you want.
  • Regarding the spells, you can put at most 4 times the same card in your deck.
Most of the time, a good deck is composed in the following way:
  • EXACTLY 60 cards (only the best, discard the rest).
  • Between 25 and 30 land cards (by the way, there are 5 different mana colors, but let's keep it simple...)
  • Some spells requiring 1 mana source (it's called "converted mana cost (CMC) = 1"), then 2 mana, 3 and so on. Basically "expensive" spells are more powerful than the cheapest ones but... they are more expensive, you'll need to survive several turns before playing your "game breaker" card and thus be sure to be still alive. In the opposite way, playing only cheap spells will probably not be enough to deal the last damages to your opponent.
  • This way, the dream hand you can get after drawing 7 cards would be, for instance, 3 land cards, 1 card with CMC=1, one with CMC=2, 3 and 4. This way you are sure to put stronger pressure each turn, if everything is going well. But remember: your opponent is also playing good cards and can counter your plans.
Now I hope I've described the game mechanisms clearly enough so that you understand the role the statistics are playing in a classical Magic game. According to me, the best player is the one who picks the right card at the right moment. This way, that player will get a solution for each problem the opponents will play. This requires strong building skills, metagame knowledge (what is considered as the current deck-to-beat ?). Now, you can deal with game theory, rational choice models and so on.

Kind of statistics you might want to deal with.

But as shown in a previous part, even when getting a perfectly built deck ready-to-win, you still have to  optimize your resources usage. Nowadays thanks to the Internet, lots of players are just copying deck lists from world champions and try to play and win. That's not enough at all.

Even graph theory can help

Some decks are expected to win when gathering 2, 3 or more cards that make a perfect lethal combo. When playing with a such deck, you have to know the shortest path to gather these cards and to build your deck so that you will get the best chance to easily gather these cards.

Oh, and it's also a game. It's an opportunity to share fun and meet great people.

References :