Wednesday, June 24, 2009

Booster Draft AI - Part 2

It would also help if the drafting AI considered the deck's mana curve. Having a smooth mana curve will improve any deck's performance. Below is a general outline for a good curve for a draft deck.

2 mana: 3 cards
3 mana: 5 cards
4 mana: 4 cards
5 mana: 2 cards
6 mana: 2 cards

One rule of thumb for draft decks is to have at most five spells that cost five or more mana. Also a draft deck should have a few powerful win conditions like Might of Oaks or Shivan Dragon. (In case you don't know Might of Oaks is a +7/+7 Giant Growth.)

I would love to draft against some sort of "reactive AI" that reads signals and everything but it doesn't seem very realistic. How does a real human player draft and how could I put that logic into a computer program?

While drafting in MTG Forge is easy compared to real life, it does provide the "drafting experience" that other games don't have.

Monday, June 22, 2009

Booster Draft AI - Part 1

In case you didn't know, MTG Forge supports booster drafts. The computer AI simulates the other seven players that you are drafting against. Before the draft starts each of the AI players chooses the two colors that they will draft. Each AI player picks creatures first and then spells. Each AI deck has 12-20 creatures, various spells and 18 land, 9 of each color.

The drafting AI is very weak since it only chooses a random card in one of its colors. The simplest way to improve the AI is to have a pick order for all of the cards. Each color could have a separate file and the cards at the top of the list would be chosen first. (You could have a "global pick order" by putting all of the cards into one file and but it would be hard to compare the power levels of various cards across all of the colors.)

This is a sample of what would be put into the "red-draft" file.

Lightning Bolt
Shock
etc...
2/2 creature with haste
2/2 creature

Since archetypes do exist in drafting, it would be nice if the AI could draft them. One way to implement this is to create a file that lists all of the cards that work well for a specific archetype. Another idea is that the AI could draft using a simple plan. For example an aggro AI drafter would pick many 2/2 creatures.
This article talks about both pick orders and archetypes, you can read it here.

"While I am not completely opposed to the idea of having a pick order for a specific archetype, or ranking cards for first-pick, first-pack purposes, having a "pick order" for the entire set strikes me as being more harmful than helpful.

The key to successful archetype drafting is to take cards that not only work well with what you've already drafted, but will allow you to maximize the value of cards that you will draft. So if you're trying to draft an awesome Esper deck, you need to draft artifacts—and lots of 'em."

p.s.
I'm a huge believer of using plain text files like the above example.

Friday, June 19, 2009

Xbox Game

(The Xbox videogame was supposed by to released but Wizards made an announcement that the game is delayed.)

I just wanted to tell everyone that there is now an Xbox Magic game. “Duels of the Planeswalkers” from the Xbox LIVE Arcade (XBLA) network. You don’t buy booster packs like Magic Online, it has around 280 cards and a 40 hour single player campaign. You can also play against someone else over the Internet or in a Two-Headed Giant game. It also supports free-for-all multiplayer with up to three other players.

If you have played this game please leave a comment. I am especially curious to know how good is the AI? I am guessing that each deck has an AI designed especially for that deck which should make the AI relatively smart. MTG Forge has a more general AI that can use any deck.

Wizards Announcement

You can also read an article written by the lead developer, here.

Wednesday, June 17, 2009

New Version

I’m glad to announce that there is a new version of MTG Forge that has 90 new cards which brings the grand total number of cards up to 1691. New features include land stacking, equipment, persist, and flashback. Multiple lands are grouped together making the user interface less cluttered. Equipment cards include Loxodon Warhammer, Lightning Greaves and the insane Skullclamp which should spice up your favorite deck.

Other changes include "champion" creatures like Wren’s Run Packmaster. The changeling champion cards are also included: Changeling Hero, Changeling Berserker, and Changeling Titan which can fit into almost any white, red, or green deck. Blue mages can control the board with Capsize while green mages can hold their own with Survival of the Fittest. (I love blue versus green.)

And as a hint, in the deck editor you can put the new card first by selecting the menu option "Sort By" then "Newer cards first". This puts the cards that were recently added first in the lineup. This option doesn’t sort by the date the card was printed but by the location that the card is in according to the file cards.txt. New cards are added to the beginning of cards.txt. (I keep meaning to add a sort option that sorts cards by their set: Alara Reborn, Conflux, Shard of Alara, etc…)

All of the credit for this new version goes to Dennis and Rob from MTG Forge's forum. Thanks and keep up the good work.

MTG Forge 06-12
Readme (also included in the above file)

p.s.
You may also want to download the official card token artwork. It isn't necessary but most of them look pretty good.
Tokens (1.5 MB)

And if you can't download the card pictures, this file has most of them.
Card Pictures (41 MB)

Monday, June 15, 2009

Rules Changes - My Opinion

The biggest rules change is combat. (In case you missed the memo, Wizards has updated a few things.) Last night I read and re-read the combat section but I’m not sure that I fully understand it. While the old way of doing combat was more complicated, I had spent many hours fully understanding all of the intricacies. Much as if the rules of chess were changed and pawns could now move diagonally, I’m not sure how the new combat rules differ greatly from the old ones.

The new combat rules deal damage as the damage is assigned, so there is not a step between assigning and dealing damage. That seems simple enough but the rules about multiple blockers is still fuzzy in my mind. The new rules state that the attacking players puts the blocking creatures in order, assigning them 1,2,3 and so on and then deals damage to them in that order.

Personally I don’t see a difference between putting the blockers in order (1,2,3) and not putting them in order. You will still kill the creatures that you want to. Hopefully the nuances of this new combat scheme will be explained in further detail. I would love a computerized demo like the one that is packaged with the 10th Edition starter kit and hopefully Wizards will put out a new version when Magic 2010 comes out. You can download the Windows demo here (85 MB).

Thursday, June 11, 2009

Magic 2010 Rules Changes

There have been rumors about rules changes for the upcoming Magic 2010 set and Wizards has finally put up an announcement. I’ll go over the high points.

1. Simultaneous Mulligans – because technically one player mulliganed and then the second player mulliganed.

2. Terminology Changes – "In Play" becomes "Battlefield", "Removed from the game" becomes "Exile"

"Cast" is being reinstated as the verb used when referring to the act of playing spells or types of spells. "Play" is being kept as the verb associated with lands (and with cards of unspecified types). Activated abilities are also no longer "played" but rather "activated.

3. Changing "end-of-turn step" to the "end step" – to help clarify the difference between "at end of turn" and "until end of turn" effects.

4. Mana Pools now empty at the end of every step and phases, instead of only at the end of every phase. And mana burn is no more which helps a few cards and hurts other cards like Spectral Searchlight.

5. Token Ownership was changed from "the controller of the effect that put it into play" to "the player under whose control the token entered the battlefield".

6. Combat Damage No Longer Uses the Stack - As soon as damage is assigned in the combat damage step, it is dealt. This is probably the biggest change.

7. Deathtouch and Lifelink are being changed from a triggered ability into a static ability.

Hopefully MTG Forge can implement all of these changes. The biggest difficulty will be changing how combat damage is assigned. What do you think of these rule changes?

Personally I don't have much to say about the rules changes. Some of them will help out new players. I don't think the rules changes will really improve the game but every little bump in the right direction (if this is the right direction) is a good thing. The weather changes, the winds blow, and Wizards changes a few rules, nothing more, nothing less.

Wednesday, June 10, 2009

What is a Card?

MTG Forge has a card object which represents a real-world, cardboard card. This sound simple but it gets a little bit complicated. Let's say that I want to destroy one of your Forest's but you want to bounce it, so you have to know which specific Forest card that I am targeting. In the real world you can just point to the specific Forest, while a computerized game of Magic has to show the user. Magic Online uses nicely drawn arrows while MTG Forge just tells you the targeting card name and its unique number.

At the beginning of the game MTG Forge gives each card a unique number much like the old Shandalar game. Whenever a card is copied, the card's unique number is copied also. In MTG Forge every time a card's attributes need to be reset, like when a creature is going to the graveyard, a new copy of the card is made that has the same unique number. In MTG Forge, every time a card changes zone a new copy is made. I think that making a new copy of a card is easier than saving all of the base attributes and then resetting them, Card.reset().

The card name is important but so is the unique number. Ideally the unique number would not be shown to the user and little arrows would be drawn to show targets.

p.s.
Nothing I write about it really rocket science just one guys opinion about programming Magic. Just finding the subject is the hard part, the rest is usually straightforward.