Future Tense

An A.I. Dreamed Up a Bunch of Dungeons & Dragons Spells. They’re Surprisingly Perfect.


“I wield the mighty power of the Hold Mouse spell!”


Bruce Rolff/thinkstock.com

Imagine this: You are a skilled sorcerer, part of a mighty group of adventurers exploring an ancient catacomb. You and your allies have hacked and slashed your way through hordes of skeletons and zombies, but now you face the maze’s true master, the deadly lich Azalin. The warriors around you have fallen to his arcane trickery, leaving you alone to fell this dread lord. Wracking your brain, you struggle to remember a spell that might turn the tide of battle. Your powers spent, you realize to your horror that only one remains in your arsenal: Mous of Farts.

This odiferous enchantment isn’t one that you’ll find in any Dungeons & Dragons rulebook. Instead, it comes courtesy of an unlikely source: A neural network—or an algorithm built on the model of human cognition—trained to invent the names of new spells for the venerable roleplaying game. It’s the work of a puckish researcher named Janelle Shane, who explains on Tumblr that she primed the network with a dataset of 365 official spells culled from the franchise’s long history.

Though they’re clearly the work of a computer, the appealingly silly results are just close enough to the real thing that you might not question them if one or two showed up in an old issue of Dragon magazine. Shane told me by email that her favorite creation is “Barking Sphere,” but there are plenty of other winners on the full list. Here are a few of the best:

  • Hold Mouse
  • Gland Growth
  • Wrathful Hound
  • Grove of Plants
  • Conjure Velemert
  • Vicious Markers

Glossing the process, Shane told me, “As the algorithm generates text, it predicts the next character based on the previous characters—either the seed text, or the text it has generated already.” She sets it to a “high temperature,” meaning that it attempts avoid common choices as it selects each subsequent letter. As a result, it tends to make spelling errors and produce nonsense words. When that happens, Shane wrote, “[I]t will often finish the entry with the next-closest phrase from the original dataset.” By way of example, Grove of Plants and Gland Growth might be picking up on the real D&D spell Plant Growth. The result is a list of new spells that approximate familiar ones while leaving room for zany novelty.

Shane has used similar systems to autonomously invent previously undiscovered Pokemon (Quincelax, Tortabool), the name of your next metal band (Sköpprag, Dragorhast), and even “adorable” pickup lines (“You look like a thing and I love you”). The idea for the spell list came to her from a blog reader, and though she doesn’t play the game regularly, she knows enough people who do that she “can get the jokes.”

While those jokes are good, the results also line up surprisingly well with the history of Dungeons & Dragons, partly because its spellcasting system was always fundamentally peculiar. The game’s rulebooks have long been riddled with spells similar to those created by Shane’s algorithm, many of them dumb at best—and likely to get your character killed at worst. Fans occasionally list some of the dopiest offenders: i09’s Rob Bricken, for example, has rounded up 20 of the “most useless” ensorcellments including Snilloc’s Snowball (shoots a single snowball at your enemy), Hold Portal (locks a door), and Guise of the Yak-man (“Self-explanatory,” Bricken writes). While it’s almost possible to imagine some application for these spells, it would take a great deal of luck, and a great deal of creativity, to find the right circumstance for them. You’re typically going to be better off sticking with standbys like Magic Missile or Fireball.

To understand why these spells are part of the game, you have to look to its distant origins, which overlap with the output of Shane’s neural network in striking ways. Some of the goofiest spells have names attached to them—say, Tenser’s Floating Disc—and in many cases those names refer to characters from initial home experiments with the game conducted by its co-creator, Gary Gygax, experiments in which he was often joined by his own children. As Kent David Kelly explains in Hawk & Moor, a meticulously researched history of the game’s early sessions, Otto’s Irresistible Dance—which lands at No. 13 on Bricken’s list—was named for a wizard that they encountered and charmed, a fellow famed for his love of partying. Many other spells have similar origins: They’re silly because they’re the products of a father’s silly interactions with his children.

In other words, Gygax, an improvisatory raconteur, was akin to a parent telling bedtime stories to and with his children; elements of those stories just happened to become canonical details in a game that has since been played by millions. Magpie-minded, he would take bits and pieces of rules from other games and from other players, welding them into constructs that held together, but just barely. As a game designer, then, Gygax himself was a bit like the open-sourced neural network employed by Shane, trying to come up with new ideas from a familiar set of influences. While Shane’s spells may be more consistently comical, they’re not that far off the mark.

Shane, for her own part, is modest when it comes to the value of her project, telling me that it mostly serves to “showcase the adaptability of neural networks.” Nevertheless, there’s something unusually apt about her spell list that gets at—and possibly goes beyond—the limitations of other attempts to engineer “creative” artificial intelligence, many of which tend to leave humans doing most of the work, as I’ve argued before. A Japanese novel “written” by a computer, for example, turned out to have been mostly mapped out by humans—and the A.I.-scripted short film Sunspring would have been gibberish without the emotive performances from its lead actors.

If Shane’s list works better than some other algorithmic inventions, it’s largely because spell names are simpler than novels or scripts, but it also helps that Dungeon & Dragons is necessarily participatory: You can’t, after all, play a roleplaying game without people playing the roles. Simultaneously, Shane’s system captures the recombinatory quality of real creativity, the way we imagine habitable worlds as we contemplate the ruins of dead civilizations. In the process, it arguably suggests a more honest path for artificial intelligence, one that would encourage it to work with us by making it work a little like us.