Live data from Hacker News

Generating Magic cards using deep, recursive neural networks

mtgsalvation.com

41–50 of 69 posts

Re: Generating Magic cards using deep, recursive neural networks

#41
post #17

Magic is an interesting game just from an text analytics perspective. Using a source like mtgjson you get a reasonably sized corpus of text that looks natural enough for a human to comfortably grok but sufficiently templated to apply even naive methods and acquire awesome results. I built a tool that uses n-grams to find cards similar to each other. The result is comparable to manual suggestions done by users but tak…

Are you the creator of mythicspoiler? I know they wanted to do something like that. As of a few sets ago the 'Similar Cards' in their spoilers were chosen manually.

Re: Generating Magic cards using deep, recursive neural networks

#43
post #35

> 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 That's actually a fairly plausible card, in terms of mechanics. It's thematically appropriate for black, it's about the right cost, it's powerful but specialized (returns creature cards only, and only to hand rather than to play), and it's legendary to…

How long until someone draws up artwork for Shring the Artist?

How long before the neural network draws Shring the Artist?

Re: Generating Magic cards using deep, recursive neural networks

#44
post #40

Reminds me: it feels to me like MTG card text (excluding flavor text) obeys a formal grammar of some sort. Does it? If it does, the NN's could possibly be made a lot more powerful if you put a "parser" in front of its input end (so it was being fed ASTs instead of text) and a "code generator" on the output end (to convert confabulated ASTs back into text).

I'm not sure if it's officially a formal grammer, but there are definitely correct and incorrect phrasings for certain effects, and those are changed over time with official rewordings posted for old cards.

It's one of the ways that unofficial card spoilers are judged. If there are phrasings that sound "out-of-style" for the effect, its usually judged as a fake from the first pass.

Re: Generating Magic cards using deep, recursive neural networks

#45
post #40

Reminds me: it feels to me like MTG card text (excluding flavor text) obeys a formal grammar of some sort. Does it? If it does, the NN's could possibly be made a lot more powerful if you put a "parser" in front of its input end (so it was being fed ASTs instead of text) and a "code generator" on the output end (to convert confabulated ASTs back into text).

My understanding (based on some old blog posts[1]) is that while there's no (published) formal grammar there's definitely a set of internal rules that WoTC uses for determining how things are phrased. What is considered "technically correct" has changed somewhat over the years. I believe Sixth Edition was the first attempt to standardize and make consistent card text. Generally though cards that do the same or very similar things are going to follow consistent word ordering.

For example take Shrewd Hatchling[2] and Coral Reef[3]. Both are fairly different cards, but notice the wording of the first part of their respective card text:

> Shrewd Hatchling enters the battlefield with four -1/-1 counters on it.

and

> Coral Reef enters the battlefield with four polyp counters on it.

Cards with that sort of ability are (almost) always going to have it phrased in a way that fits the pattern of " enters the battlefield with counters on it."

Lots of other sorts of common mechanics are the same. Additionally, there are the so called "Golden Rules"[4] which are important to take note of when parsing the text of a card.

While Googling for links for this reply I found Gleemin[5], a "rules engine that aims to fully and correctly implement the game's tournament rules, an AI player programmable with expert knowledge and an interpreter for the game's language (the rules text on the cards)"! Seems you're not the first person to think about this!

[1]: http://archive.wizards.com/Magic/Magazine/Article.aspx?x=mtg...

[2]: http://gatherer.wizards.com/Pages/Card/Details.aspx?multiver...

[3]: http://gatherer.wizards.com/Pages/Card/Details.aspx?multiver...

[4]: http://mtgsalvation.gamepedia.com/Magic_Golden_Rules

[5]: https://github.com/stassa/Gleemin

Re: Generating Magic cards using deep, recursive neural networks

#46

> 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 That's actually a fairly plausible card, in terms of mechanics. It's thematically appropriate for black, it's about the right cost, it's powerful but specialized (returns creature cards only, and only to hand rather than to play), and it's legendary to…

I'm not so sure this card is on cost.

My neural network is telling me that it's actually too good at 4 mana.

Don't forget about potential combos like having a bunch of zero cost creatures in your graveyard + anything else that triggers when you play a spell or when a creature enters the battlefield. But even without that, this is a card advantage machine.

Re: Generating Magic cards using deep, recursive neural networks

#48
post #46

> 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 That's actually a fairly plausible card, in terms of mechanics. It's thematically appropriate for black, it's about the right cost, it's powerful but specialized (returns creature cards only, and only to hand rather than to play), and it's legendary to…

I'm not so sure this card is on cost. My neural network is telling me that it's actually too good at 4 mana. Don't forget about potential combos like having a bunch of zero cost creatures in your graveyard + anything else that triggers when you play a spell or when a creature enters the battlefield. But even without that, this is a card advantage machine.

It's rather good at 4 mana, though that could be balanced in the metagame by making it rare or mythic.

What zero-cost creatures did you have in mind? Those aren't incredibly common. And in any case, a combo that requires 3-4 specific cards is not overpowered; one that only requires 2 specific cards often is.

Re: Generating Magic cards using deep, recursive neural networks

#49

Probably offtopic, but the second or third poster in that thread had "Stormfront" in the sig. Well.

The full signature is:

    My Custom Sets
    
    Avant Block: Avant -- Stormfront
Which suggests that it's the name of the in-progress second set of a block of custom user-created cards the person is working on. Quick glance at the posts the signature links to gives me the impression it was chosen simply as a generic "storm is coming" fantasy-setting name.

And for people who know a bit about Magic: seems a lot like "Scars block without the Phyrexians", even down to the user posting a variation on Koth.

Post reply on HN