Posts Tagged ‘artificial intelligence’

Fighting robots

Friday, 12 March, 2010

I do semi-regular Magic: The Gathering draft tournaments with friends. For anyone who doesn’t know, this involves getting packs of randomly sorted game cards and the drafting them, usually in the following fashion:

  1. Each player opens a pack of 15 cards and picks one card to keep and play the tournament with. The remaining cards are passed to the next player around the table (to the left, initially).
  2. Continue picking one card and passing the rest until everyone has 15 cards.
  3. Repeat for two more packs of cards, reversing the direction of passing each pack.
  4. Each player now has 45 cards, with which to construct a deck to play in the tournament. You typically use about 23 of the cards and add enough basic land cards from a common pool to total a deck size of 40.

So obviously choosing which cards to draft is an important tactical part of the overall tournament performance. It’s also a lot of fun in itself.

One of us had the idea to write a computer code framework to handle the administrative details, with an API that allows it to talk to other programs. Then each of us would write a program to make drafting decisions based on card details given to the program by the framework. We’d abstract a lot of the fiddly details out of the actual Magic cards and work with a much simpler system that basically gives certain card combinations scores based on properties of the cards. Then we’d run about 1000 drafts using the programs and analyse the statistics. The goal is to see which of our programs can draft a “better” deck in this system.

This was proposed to us in an e-mail, suggesting we might want to do this for something fun. The e-mail concluded with the following lines:

* Creating robots to fight each other is always fun.

* Complete waste of time.

I thought this was amusing… but also slightly inaccurate. After all, something this unutterably geeky should be a complete waste of time in order to be worth doing!

Anyway, since the proposal was made – less than 24 hours ago as I type – one of us has already written a framework program to enable this AI robot card drafting tournament. You can’t keep a good geek down! If we get some interesting results, I’ll be sure to share them.