Can a neural network write good riddles? Maybe, but I sure didn’t prove it with this post. If you have a taste for the terrible, read on:

The too obvious:

The What Is It Riddle

What’s the first letter of the word ‘E’?



Answer: E.



The Why Does It Look Like A Man Riddle:

Why does it look like a man’s head?



Answer: It might be a man’s head.

The mysterious:

The Hairy Thing Riddle

My best friend is a monkey.

How can this be?



Answer: A monkey is a python.



The How Do You Get Home From Work Riddle

I can make something,

I can break it,

I can but it,

I can make it,

But I have no hands or feet.

What am I?



Answer: An Iron Man!



The Can I Use Two Other Words Riddle

I get around very easily,

I can’t ride a horse,

I can’t swim,

I am not a dog,

But some people would like me,

In small things I could be anything,

In large things I could be anything.

I have no smell, I have no taste,

I have no feel, but I will win any fight.

But that is enough for you, you have played enough games of find me on twitter at @PopperPunch.



Answer: Jason Vorhees

The ones that almost make sense:

The Why Am I Late? Riddle

Why am I always late?



Answer: Because I can’t run.



The White When You Look At Me Riddle

Why does a boy dye his hair blue?



Answer: Because when he dyes, he dies.



The What Am I? Riddle

What does a time traveler wear?



Answer: A clock.



The 2,100 Pound Dog Riddle

My mouth is as big as 2,100 pounds.

Why is this?



Answer: Because I eat 2,100 pounds a day.

The accidentally heartwarming:

The What Could Be Better? Riddle

If a dog has a family, what does it have?



Answer: A Family.



The Dear Mum Riddle

Dear Mum, How are you?



Answer: I’m fine. I’m ok.

The accidentally horrifying:

The Reason the World Breaks Riddle

I am a god that has yet to be born,

and I am always stopping things from happening.

What am I?



Answer: A Computer.

The ones that actually kind of work???

The What Am I? Riddle

I’m a vision, a secret. And when you look at me, you will be captured.

What am I?



Answer: An ideal.



The That Object Riddle

I can do almost anything.

I can be one thing or a lot of things.

I can be something you can do with me.

I can change.

I can be hidden.

What am I?



Answer: A button



The The Majesty Riddle

Sir, you rule but are not King of England,

You are not of France,

You are not of America,

You are not of Switzerland,

And not of Norway. What are you?



Answer: The Queen of England

And More Riddles!

Click Riddle Me Again to try your wits against the neural network! Thousands of riddles await!

Give Me A Hint

Show Answer

Riddle Me Again

Riddle Goes Here =)





(I would appreciate people posting any actually good riddles in the comments — those were the hardest to find! Funny/striking ones are appreciated too…)

Update 1: More ‘Solvable’ Riddles

‘Solvable’ riddles found by other people (many are just funny or striking, but some are solvable!) Thanks to everyone in the comments, we’re up to 33!

Give Me A Hint

Show Answer

Riddle Me Again

Solvable Riddle Goes Here =)

Update 2: Can A Fake News Detector Write Riddles?

Apparently yes it can.

How This Was Made

I started by searching for a prompt that made decent riddles without fine-tuning. I tried a bunch of options and noted the ones that were most consistent. A few were surprisingly ineffective — for example a prompt like this:

Riddle: There are 30 white horses on a red hill: first they champ, then they stamp, then they stand still. What are they? Answer: Teeth Riddle:

Tends to produce a conversation between two people named Riddle and Answer instead of a riddle:

Riddle: There are 30 white horses on a red hill: first they champ, then they stamp, then they stand still. What are they? Answer: Teeth Riddle: What a stupid answer! Answer: I'll come back and answer your question later. Riddle: Yes, but don't start with your mouth full if you don't have teeth. Riddle: I hate them too much! Answer: But I'll come back to this later when I don't. Riddle: I am a horse. Riddle: They say the white knight was one of them. Answer: It will help you explain the horse horse again? Riddle: We will explain your horse again when we get to it.

I subjectively judged the best prompt. For the main dataset I scraped 15,000 riddles from riddles.com and formatted them like the prompt. I thought that if the riddles were only lightly formatted, just enough to parse out, and in a format GPT-2 already responded well to even without training, then maybe I would need less fine-tuning and I could reduce the risk of of memorizing (over-fitting) the relatively small dataset.

I sampled every 25 iterations with half the default learning rate until I found what look like a sweet spot where I at least occasionally found some that made sense and weren’t copying from the training material. Then I ran that model with a few different parameters and picked my favorite (top_p 0.9 seemed better than top_k 40 at various temperatures, in this case.)

I processed the samples and grabbed any matching the format, discarded the top X most common answers like nothing, time, etc — these were heavily overused in the training data and in riddles generally.

Guessing is what makes a riddle fun so I hide the answers in the random generator portion. They were still generally impossible to guess so I added hint button. It didn’t help much…