A neural network learns to create better D&D spells

Neural networks are a type of machine learning program that learns from examples they’re given, rather than relying on a human programmer to invent rules.

In an earlier experiment, I trained a neural network to write new names for Dungeons and Dragons spells based on a list of 365 examples. That’s a really small dataset for a neural network to work with, and I ended up struggling to find training parameters that would strike a balance between word-for-word mimicry of the original list of spells, versus a series of completely made-up words. By filtering extensively through the nonsense, I was able to come up with a short list of interesting new spells. (My favorites were Barking Sphere and Gland Growth).

However, blog reader Jo Scott was kind enough to collect the entire 4th edition list of spells - more than 1,300 spells in all. She explained that she’s playing a character who’s an artificer trying to create an autonomous spellcasting golem - essentially, a magical AI - and she’d like to have more weird spells for the golem to invent. (Her Dungeon Master okayed this and thus only has herself to blame when she has to deal with some of the spells listed below.)

Using the new dataset I was able to train a much better-performing neural network. It simply had many more examples of spells to work with; that is, more examples of the words and letter combinations that appear in D&D spells, and thus was able to deduce better rules about how to create them.

For comparison, here’s what the neural network trained on the original spell dataset was producing after it had looked through the spell list 30 times. This is raw, unfiltered output from the neural network.

Original dataset

Wome on frr

Eser Wold

Sereisk

Lelent Warder

Cleater Secfen

Spiritul Plage

Arawen

Speak with Alanc

Plonting Cloud

Aurars

Ensntalice

Stige Dling

Comenthon of Prost

Monsen

Scink

Warrifg

Resser RestractiGn

Cloud

Sreeat

Glasp

Blenss

Bline Ons

Dood to Stone

Aside from a couple of spells that just might work, most of the list is magicky-sounding nonsense, sometimes barely pronounceable.

By contrast, this is what the neural network was producing after it had been trained on the dataset that included all the 4th edition spells:

Full dataset

Curse Word

Crackling claus

Tidal treket

Swirk with

Wall of Storm

Acter Lor distertion

Glib ton

Grasping Mane

Tweel Strike

Revitalizing Strike

Truneming fortune

Fall of the Wild

Tunesrite

Trickstrak empester

Phantasmal assault

Tidalt Atight

Hadabol

Leging Blade

Bund Wind

Dance of Sack

and Prime

Poxsare

Dumination

Mass Cure Fortion

They’re not ALL winners, but the difference is dramatic. This is why, although I can often have fun with small datasets, the really large ones (100,000+ metal bands, or 19,000 IPA beers) tend to produce the most consistently convincing results.

Even this more-sophisticated neural network is not without some oddities. For example, you’ll notice in the results below that it seems to have a particular fondness for bears. And it has invented the name “Dave” which is now, for some reason, its favorite.

I leave you with a selection of Dungeons and Dragons spells generated by the latest neural network.

Mister of Light

Storm of the gifling

Song of goom

Forceful Boor

Chorus of the dave

Maine storm

Frames of Death

Song of the doom goom

Death’s Death’s Proud Bear

Wall of Distraction

Date wards

Plant of Peace

Shield of Farts

Song of the darn

Ward of Snade the Pood Beast

Ice shop

Primal Rear

Summon Storm Bear

Divine Boom

Soul of the bill

Charm of the dave

Spirit of the Spirit

Fire shop

Song of blord

Song of distraction

Forceful Force

Spirit Boating

Song of the ball

Hail to the Dave

Crusading Disk

Summon ass

Call to the Daring

Treeking of Star

Grasping Light

Clinging blade

Primal Prayer Bear

War Cape

Find Strike

Song of the Unworthy

Gate Sail

Icon of Thorns

Song of the door

Star warper

Stone of Death

Chilled arrow

Storm of the dave

Fark Mate

Charm of the cods

Death of the Sun

Greater flick

Curse Clam

Claming Blow

Cursing wink

Conjure Mare

Remorse?

Conjure Bark

Darkworm Colt

Daving fire

Healing of Bat

Mordenkainen’s lucubrabibiboricic angion

There are more of these because I had way too much fun generating spells, but to include them all here would make this post ludicrously long. As usual, you can get the extended list by entering your email at this link (even if you’re already on my mailing list). Just for fun, the extended list isn’t QUITE as filtered to remove all the sweary words.

Also, I thought it would be fun to generate D&D character names for a future project. If you go to this form (no email required), you can enter your character’s name, race, and class. Once I have enough of these, I’ll give them to the neural network and see what happens. Edit: wow, over 3500 responses so far! (Check them out at this link) Keep them coming!

NEW POLL! Neural networks want to hear your character’s backstory! Submit as many as you like. https://goo.gl/forms/ReInNw0Tz0mwzTLO2