char-rnn does Kingdom of Loathing

How this all got started:

A co-worker sent me an Ars Technica article about neural-network-generated paint colors. This led me to the tumblr of Janelle Shane, which is pretty funny and mostly deals with neural networks being applied to various things.

I went to the github site for char-rnn, a character-based neural network. And the rest is history. I also did video game names using char-rnn which may also be interesting.

Feb 9, 2018

Based on the God Lobster link that somersaulter posted in the official KoL forums, I thought it'd be a fun thing to do to retrieve the complete monster list of Kingdom of Loathing and feed it to a neural network. This was reasonably easy to do, but it really didn't work as well as I'd hoped.

My neural network really, really liked "bugbear" and "black crayon". This is only to be expected, because there are a lot of bugbears and black crayon monsters in the monster list. Anyway:

Gorgen Clown Giant (NOPE!)
Animated Nork
Cold Pinch
Snowed Chomp
Giant Spider Skulf
The Bard Cray (Definitely not spoony?)
Stoopy Crayon Man
Snob Goblin Dlate
Zombie Mombeer
Spader Girl (wouldn't this be a player, not a monster?)
Fraty Humpire
Boob Goblin Bomble
Spooky Grampy Fooky Ancient Brow
The Skeleton Orspork
Mombie Batter
Spooky Creepy Dooks
Warm Bag
Beer (It's simple, at least)
Giant Bad (A monster is you?)
Bugbear Bugbean
War Frat Beering
Spider Bugbear
Musy Bat

This was the best of 4 runs of the fully trained network at various temperatures. At this point, I realized I'd screwed up by training the thing on a data set with capital letters in it. Neural networks have fewer things to learn (and so can possibly learn better) if you convert everything to one case. I did that, trained a new network, and ran it 4 times:

Bugbear Bat
Spare Father
Mer-kin Rat (how would that even work?)
Brack Crayon Wire Serf
Furk of Groot (Vin Diesel's most idiosyncratic role yet!)
Mombie Zombie
Hooter Frater
Swarm of Skeleton Lime (Wait, do limes even have skeletons?)
Spider Monk
White Spire Toose Wirate Frat of Red Whesty Pirattry Hippy (Networks can get stuck sometimes.)
Ming Sorcing Bugbear
Bugbear Spooker
Mostroose
War Hoopy Giant (You sass that war hoopy giant? There's an overplayed nerd joke who really knows where his towel is.)
Willy Pirate (I really hope this is a pirate named Willy.)
Mignt Beebear (Bees. Bears. Battlestar Galactica.)
Meating Straking Animal
Wear Frat Barbanger
Striking Bugbear
The Torkile Tupe Ghost

So: Not as good as I'd hoped. Part of the problem is that the data set's not really large enough.

Technical details: The input file I used. The command I ran to train the network was th train.lua -data_dir data/kolmonsters/ -gpuid -1 -savefile kolmonsters -batch_size 20 -seq_length 20 . The command I ran to generate output was th sample.lua cv/lm_kolmonsters_epoch36.59_2.3867.t7 -gpuid -1 -length 2000 -temperature 0.5 >> output/kolmonsters.txt , and I repeated that a few times and then pruned the output file of the most incoherent lines. (This may be cheating, but I'm going for comedy, not purity.)

This could probably be improved.