Comedy written by artificial intelligence (AI) is no laughing matter.
Writing in a blog post, neural network fiddler Janelle Shane explains how she trained a next-generation neural network to write one-liner jokes. The results are so unbelievably unfunny, they are hilarious.
“I train neural networks, a type of machine learning algorithm, to write unintentional humor as they struggle to imitate human datasets. Well, I intend the humor,” Janelle explains.
She started by plugging in a dataset of over 43,000 jokes that use the basic structure of “What do you call a something that somethings?” or “How do you something a something?” In theory, the neural network would learn the structure and relevant content of the jokes, meaning it could create some gags of its own. However, just as numerous projects like this have shown, they can’t seem to get a grip on our sense of humor.
Here's a selection of the jokes:
“What do you call a cat does it take to screw in a light bulb? They could worry the banana.”
“What did the new ants say after a dog? It was a pirate.”
“Why did the monsters change a lightbulb? And a cow the cough.”
“What do you call a pastor cross the road? He take the chicken.”
“What do you call a farts of tea? He was calling the game of the dry.”
To further test/humiliate the neural network, Janelle then set out to see if the neural network could successfully finish some classic jokes. The results speak for themselves:
“Why was six afraid of seven? Because he doesn’t have a birthday?”
“Why did the chicken cross the road? To screw in a light bulb.”
“What’s black and white and red all over? A confuse on the bull!”
“What’s brown and sticky? A potato, on the space.”
Unless the neural network is aiming for some kind of surrealist anti-joke, beyond the comprehension of mere humans, then it’s fair to say the jokes suck.
Nevertheless, if AI is going to become an integral part of human social life, it will certainly be an asset to recognize jokes, understand sarcasm, or take irony into account. That’s why many researchers are putting energy into it.
So, what is it about humor that is so alien to AI? Well, humor has many interconnected nuances – like context, timing, content, double-meanings, relevance, delivery, etc – that it’s a lot to factor in.
Jason Rutter, a research fellow at Manchester University, told New Scientist in 2001: “Humour is a very interesting way to look at artificial intelligence because at some point something has to have two meanings, which is not easy to do with a computer.”
You can check out some of its equally odd attempts at writing poetry, which was featured in a study on computer science, here.