I’ve been training a neural network (based on open-source char-rnn) on a variety of datasets, including recipes, Pokemon, knock-knock jokes, pick up lines, and D&D spells.

The neural network trains itself by looking at chunks of text from the training dataset and trying to predict what comes next. Then, when you give it a bit of seed text (maybe even a single letter), it generates text by predicting what comes next. It does best with short, simple phrases because it only looks at a few tens of characters at a time. Also, its grammar isn’t always the best. So, fortune cookie messages would seem like a perfect task for a neural network - but I had the darndest time getting fortunes out of the neural network.

The problem is the dataset. At the moment, there aren’t that many unique fortunes you can find in a cookie, maybe only a few hundred or so in common enough use that you can find them online. Intrepid blog reader Kiwi Carlisle found pretty much all of them, and very kindly gave them to me as neural network food.

But annoyingly, the neural network went straight from nearly complete incomprehensibility:

A pleasant and on your pirents.
You will will have life, so the right thing.
The man where you wornd with a wind love to be procers.
Life is finally gime.
Hand is always on happiness.
The wind a fail is hondow on your parsone think you want.
A pleace khom yourself of ore cose from cowings are sheeping.
There is no right, don’t surprise
People will come true.

to word-for-word plagiarism of the complete input dataset of fortunes.

Finally, I managed to stymie it by giving it an even shorter-than-usual memory: it can only look at 35 characters at a time, which is shorter than your average cookie fortune. That finally prevented the neural network from memorizing the dataset, forcing it to come up with something unique.

And it was unique, all right.

First thing I learned is that for some reason the neural network likes fortunes with birds:

You cannot become better than a bird in the present.
Follow activaty will dramatically impossion bird work.
Mife is like a good listener in the mind of a flying birds.
Whange you have a lifetine of the flying birds.
A short pencil is usually better than a bird on the future.

It also is significantly more pessimistic than your average cookie fortune:

Now is the time to go ahead and not prepare to live.
Never understand.
Never upset the friends
Love will diss your changes.
Hell! It’s the onset of a friendship
Do not have a peaceful place where you will feel better.
There’s no success and friendship.
You cannot love life until you live the life you don’t good luck.

And it is full of impressive absolutely ancient wisdom:

A short simples are the suction for you.
Don’t love light, you will not always a pat.
Whale success is no high-lore will become tree.
Someday everything will be happy and proven a poet.
People are savituded.
Carve your name on your parents.
Be on the finest men like the floor.
You will make mead.
Our deeds determine up, the weather is wonderful.
Po Says: Pandan, like eating bamboo, but I prefer on the horizon.
Better ask doods when you can do it, you will never be disappointed.
Feep is never conquered by hate.
Subscribe now