Player Teaches AI To Create Hearthstone Cards

Illustration for article titled Player Teaches AI To Create Hearthstone Cards

Creating Hearthstone cards isn’t easy—unless you’re a robot.

Scfdivine created a neural network that spits out new Hearthstone cards by analyzing all pre-existing cards. It’s hardly flawless, but it’s actually kinda shocking how often it’s on the money given the way it works. Scfdivine explained:

“The way it works is the network is trained on a set of plaintext input data (the normal card list). The output is actually remarkably simple: based on the previous characters the network has encountered, it predicts what the next character should be. This way, it creates a list of entirely new cards one character at a time, with no concept of what a Hearthstone card even is. The fact that it works at all is really impressive.”

“What is the network good at? The class and rarity distribution is accurate. There are no neutral spells, and weapons are usually given to the weapon classes. Minions, on average, have reasonable stats for their cost. You don’t see things like spells with Taunt or Battlecry effects. It recognizes things like how hunter minions are usually beasts and that shaman has totems. It knows that Battlecry and Deathrattle are followed by an effect. It also tends to make 9 mana legendaries into 8/8 dragons.”

Advertisement

But it also bad at things. Many things. This stems in part from the fact that Scfdivine wasn’t able to assemble as large of a data set as, say, the Magic The Gathering neural network that inspired this one, so for every time it miraculously combines chocolate and peanut butter, there’s another time it hands you a peanut-butter-slathered sandal. Scfdivine continued:

“It doesn’t really limit class-specific abilities like Overload to the proper classes. It can’t distinguish weapons and minions very well, so you sometimes get, say, a weapon with Taunt. It doesn’t understand Secrets, probably because there’s a limited number of them and they tend to have unique effects (if an effect only occurs once in all cards, it can’t really learn context). Similarly, most spells are boring, because outside of basic effects like ‘deal damage,’ spell effects aren’t repeated enough. The same goes for rare keywords like ‘Immune’ or ‘Freeze.’ It doesn’t really understand how most abilities affect cost, so it will make minions with below-average stats and give them ‘Give your opponent an extra mana crystal.’”

As PCGamesN points out, it’s tough to decide which cards are more fun: the interesting ones or the comically absurd ones.

Here are a few interesting options, cards I could see actually ending up in the game someday (note: Scfdivine added the art; everything else—including names—was generated by the neural network):

Illustration for article titled Player Teaches AI To Create Hearthstone Cards
Illustration for article titled Player Teaches AI To Create Hearthstone Cards
Illustration for article titled Player Teaches AI To Create Hearthstone Cards
Advertisement

And here are some, well, just read them. They speak for themselves—or scream incoherently, as it were:

Illustration for article titled Player Teaches AI To Create Hearthstone Cards
Advertisement
Illustration for article titled Player Teaches AI To Create Hearthstone Cards
Illustration for article titled Player Teaches AI To Create Hearthstone Cards
Advertisement

If you’re feeling daring (and like time killed your puppy, and you want to kill that fucker back), you can learn how to set up your own card-generating neural network here. Now then, can someone do this with Pokemon? Yu-Gi-Oh? Pogs?

To contact the author of this post, write to nathan.grayson@kotaku.com or find him on Twitter @vahn16.

DISCUSSION

Ghost-who-walks
Ghost-who-walks

Am I the only one who thinks a weapon or spell that gives your hero temporary Taunt would actually be a really cool idea? Say a Warrior, Druid or Paladin spell (since they are the classes with tank specs in WoW) that gives your hero taunt for one turn, perhaps packaged in with some armor or health. It would be a unique form of board control and the drawback, making your hero a big target for a turn, could be worked around due to how many aggro decks just roll face every turn anyway. Would also be a strong counter to control decks who avoid attacking the hero until the late game when they have a lot of big minions or a combo. Perhaps there could even be an effect that utilizes the “tank swap” tactic in WoW by giving your hero Taunt for one turn, then a target friendly minion Taunt the following turn...

1 durability Weapon: Your hero has Taunt. Deathrattle: A random friendly minion gains Taunt.