Twitter Follow my Twitter RSS Subscribe to my RSS feed
Enter your email address to get updates!

Ads

12/2/10

Tarmogoyf -- a Design Failure? [Design]

Hey guys,

I'm not here to argue that Tarmogoyf is a legendary card. There's a reason it's been played heavily in all formats, justifying the $60.00 price tag for a single copy.

Rather, I'm here to argue that Tarmogoyf is a mistake in terms of data management for the player. Allow me to elaborate...

The problem I find is that Tarmogoyf is too complex.  The description "complex" is incredibly vague, so I'll explain it in terms of computational complexity.  In short, computational complexity is how programmers measure the time necessary for a piece of code to execute fully.

Defendant: Tarmogoyf


Tarmogoyf


Certain frames of code have a known complexity.  For example, a loop (or a set of code that will be repeated until a condition is met) will have an n-value complexity.  Loops are especially important since the n-value serves as a multiplicand for any relevant complexity within the loop.

An example of adding complexity in Magic the Gathering would be finding out how many cards are in an opponent's hand.  To accomplish that, first that opponent must be asked.  Then, the opponent will count the cards in his hand.  Finally, the opponent will back with his count.

Another important caveat exclusive to Magic the Gathering is that actions should be multiplied by the number of players in the game.  That way, each player can make sure that all actions taken are legal.

Going back to the original question of Tarmogoyf being a design failure, I'll provide 2 similar creatures which utilize the graveyard to determine their power and toughness.

First, Mortivore:

Exhibit A: Mortivore


Mortivore


According to its text box: "Mortivore's power and toughness are each equal to the number of creature cards in all graveyards".   The computational complexity can be computed as follows (it's in JAVA if you're curious):

public int getCreatureCount(List<MagicCard> graveyardList)
{
   int i             = 0;
   int creatureCount = 0;
     while (i < graveyardList.size()){
        if (graveyardList.get(i).isCreature())
          creatureCount = creatureCount + 1;
        i = i + 1;
     }
}


Since each player can count the number of creatures in a graveyard without knowledge of another player's graveyard, each player can count at the same time.  In computing terms, this is known as concurrency -- running multiple processes at the same time to reduce time.  While players will differ in time due to graveyard size and counting speed, the difference is not significant enough.

Hence, the complexity of running both counts is (n * time determining creature status).

It's time to up the ante.

Exhibit B: Umbra Stalker


Umbra Stalker


Umbra Stalker is different in that it only needs information from the owner's graveyard.  The computation for the creature is more complicated, check it out:

public int getChromaValue(List<MagicCard> graveyardList)
{
    int i = 0;
    int j = 0;
    int chromavalue = 0;
    while (i < graveyardList.size()){
      while (j < graveyardList.get(i).getCastingCost().size()){
        if (graveyardList.get(i).getCastingCost().get(j).getColor().equals(ManaColor.BLACK))
          chromaValue = chromaValue + 1;
        j = j + 1;    
      }
      j = 0;
      i = i + 1;
    }
}

The main point I want to make is that computing the Chroma value for Umbra Stalker is n-squared complexity due to a nested loop.   The first loop comes from traversing the list of cards in the graveyard. The second loop comes from traversing the mana symbols of each individual card.

N-squared complexity uses more resources than n-complexity, so Umbra Stalker is a more complex card than Mortivore.

And now to Goyfmeister himself.  Goyf is more complex than both Umbra Stalker and Mortivore since all graveyard information needs to be known, thus losing the time advantage provided by concurrency.  That way, players can make sure no card types overlap.

I'll talk about the algorithm rather than provide the code this time.  First off, all of the cards in the graveyard need to be pooled (not necessarily physically).  Next, the collective list needs to be traversed for card types.  If a new card type is encountered, add one to the power and toughness and add the new card type to the list of encountered types.

Compared to Mortivore and Umbra Stalker, Tarmogoyf is not as easy to compute.  You can't ask a player to count the number of creatures in his graveyard.  You can't count the number of black mana symbols in your own graveyard.  Instead, you must take the steps described to get the correct power and toughness of Goyf.

Now it's your turn.  Do you think Tarmogoyf is too complex?  I've made my case, now it's time for me to hear yours.  Drop a comment in the box below or message me on Twitter @shadowsketched.
See you soon,
@shadowsketched

2 comments:

  1. His maximum power/toughness is only 8/9, so it would not take too long to count, especially since you should know if you use planeswalkers, tribal cards, artifacts, etc., so it saves you some of the counting time.

    ReplyDelete
  2. True. I don't think knowing the number of used card types is something a player should keep track of continuously though.

    ReplyDelete

Blog Archive

Wizards of the Coast, Magic: The Gathering, and their logos are trademarks of Wizards of the Coast LLC in the United States and other countries. © 2009 Wizards. All Rights Reserved. ShadowSketchedMTG is not affiliated with, endorsed, sponsored, or specifically approved by Wizards of the Coast LLC. ShadowSketchedMTG may use the trademarks and other intellectual property of Wizards of the Coast LLC, which is permitted under Wizards' Fan Site Policy [link]. MAGIC: THE GATHERING® is a trademark of Wizards of the Coast. For more information about Wizards of the Coast or any of Wizards' trademarks or other intellectual property, please visit their website at (www.wizards.com).