Hello! I'm a PhD candidate researcher in computer science who has been investigating the use of deep neural networks for classification and problem solving tasks. I saw a fun article about training a neural network on arbitrary data to generate novel sequences. For example, you force the network to read Shakespeare over and over and eventually it can write its own texts in the style of Shakespeare. I saw that and thought: hey, why not Magic cards instead of Shakespeare? So I downloaded the source code (
here) and a json corpus of Magic cards (
here). I decided to feed a deep neural network all of the Magic cards ever made in the hopes that it might be able to conjure up some new ones. The network was relatively simple (I can give you the details, if you'd like, but that gets technical). I would have done a more robust and complex network but it would have taken far too long to do the computations; I'm waiting on some new GPU hardware to come in to speed up the process.
Anyway, here are a few example cards produced by my network about two hours into the training process. The results produced by the recursive neural network (RNN) early on were either verbose garbage or sensible-sounding cards that did absolutely nonsensical things. Keep in mind that the RNN has no prior knowledge of what Magic even is, let alone English, so it's interesting that the results were even vaguely intelligible.
--------
Amarogge Warfos
2U
Artifact Creature - Kavu Shaman
Morph B B/B G/W (You may cast this card from your graveyard to the battlefield, you may pay [mana]1[/mana]. If an enchantment card, then put the rest of target creature card from your graveyard for its flashback cost. If exile is you sacrifice it unless you pay [mana]1[/mana][mana]g[/mana]. If you do, put a 3/1 green Soldier creature token onto the battlefield. Put it into your graveyard.)
1/1
#I'm tickled by the absurd reminder text. The RNN knows that keyword abilities often come with reminder text, but it has no idea what "morph" means, so it just makes up stuff to put there. Oh, and the morph cost has a hybrid black/black mana symbol in it.
Slidshocking Krow
U
Creature - Dragon
Tromple,Mointainspalk
4/2
#Slidshocking Krow is ridiculously overpowered. A 4/2 for 1? In blue? With Mointainspalk AND Tromple? I see power creep is alive and well.
Grirerer Knishing
4G
Instant - Arcane
Exile target creature you control.
#The price is a little steep on this one, but maybe it's worth it for the synergy with other Arcane spells...
Fransunn's Ent
1B
Sorcery
Counter target spell with five toughness 2 or greater.
#Almost a meaningful conditional counterspell. Almost, but not quite.
Adiswen Agenter
1U
Enchantment - Aura
Enchant creature
At the beginning of each player's upkeep, sacrifice a white Zombie creature.
#Although very bizarre, it is a "legal" card.
Skengi Hellldadietsn
1BU
Creature - Zombie
[mana]{T}[/mana]: Add G to your mana pool. If you do, put a -1/-1 counter on Skengi Hellldadietsn.
3/4
#Notice that it picked a creature type that actually matched the colors.
--------
I decided to let the training process continue over night. When I came back, I found that the text was starting to make a little more sense (not always, but more so than before). I noticed that the network, now more fully trained, could generate meaningful, novel cards. However, it also had a knack for generating profoundly useless cards. Here are a few snippets from the output:
* When $THIS enters the battlefield, each creature you control loses trample until end of turn.
* Whenever another creature enters the battlefield, you may tap two untapped Mountains you control.
* [mana]3[/mana], [mana]{T}[/mana] : Add [mana]2[/mana] to your mana pool.
* Legendary creatures can't attack unless its controller pays [mana]2[/mana] for each Zombie you control.
Other times it would start with an idea, like giving a creature kicker, but then forget about having a "if kicked" clause, or it could have a card with X in the mana cost but then deciding to do nothing with the X. Also, the network gets planeswalkers confused with level up creatures (admittedly they do look very similar), which often results in messy combinations of the two. For planeswalkers, the problem is that, unlike run-of-the-mill creatures, they are few and far between, so there aren't many examples for the network to learn from. In any case, here are some of the typical examples I found the network churning out this morning:
--------
Tenjer Desineer
1
Artifact - Equipment
Equipped creature has fuseback.
Equip [mana]1[/mana]
#The RNN likes to make up new keywords. This one is a portmanteau of flashback and fuse. What it does for a creature, who knows? The RNN certainly has no idea.
Gravimite
1 G/W G/W
Creature - Dryad
[mana]1[/mana][mana]{G/W}[/mana]: Regenerate $THIS.
When Gravimite enters the battlefield, draw a card.
2/3
#I think this is a reinterpretation of Carven Caryatid.
Light of the Bild
2WW
Creature - Spirit
Flying
Whenever Light of the Bild blocks, you may put a 1/1 green Angel creature token with flying onto the battlefield.
2/2
Horror
[mana]b[/mana]
Horror deals 3 damage to target creature or player.
#A colorshifted Lightning Bolt. I find the name to be simple and evocative!
Mided Hied Parira's Scepter
2
Artifact
3, T: Put a 1/1 white Advisor creature token onto the battlefield.
Shring the Artist
2BB
Legendary Creature - Cat
Flying
Whenever you cast a spell, you may return target creature card from your graveyard to your hand.
2/2
--------
In conclusion, I've learned quite a bit from this process. Originally, I designed the network to avoid overfitting because I feared it would generate cards that were mere carbon copies of the ones it had seen. However, I made the network too conservative and as a result it's unwilling to experiment with multi-part abilities like kicker. It's also worth exploring whether I can improve training on scarcely seen cards like planeswalkers, planes, schemes, etc. With any luck, I should be able to come up with a generative model for Magic cards that produces more robust and complex output.
Let me know what you think!