Scientists program a computer that understands knock-knock jokes

Here’s an interesting development: A couple of University of Cincinnati researchers have developed an artificial-intelligence program that can understand knock-knock jokes.

Knock-knock jokes, of course, frequently rely on a pun, as with: “Knock, Knock. Who is there? Wendy. Wendy who? Wendy last time you took a bath?” Humans intuitively understand when a pun is being made, because we’re able to notice that a crucial word in the punchline is being misused semantically — it’s an incorrect meaning — and is riding along purely because it sounds like the correct word. But computers have huge, huge problems with grasping semantics and homonyms.

So to create their knock-knock joke ‘bot, the researchers programmed their AI with a big list of homonyms and their various meanings — including, significantly, a lot of proper names (like “Wendy”) because a lot of knock-knock jokes rely on proper names. Then whenever the AI reads a new knock-knock joke, it identifies the crucial “joke” word, then pings its database of homonyms to see if any of the words’ rival meanings “fits” the joke. If it does, the bot flags the joke as “funny.”

Why bother doing this? Because one of the reasons computer systems make mistakes is that they can’t perceive human intent: They can’t tell when we’re being sardonic, or joking, or wry. As the other researcher, Larry Mazlack, said in a press release:

“Part of the difficulty lies with the formality that computers and people need to use to interact with each other,” says Mazlack. “A critical aspect in achieving sociable computing is being able to informally communicate in a human language with computers. Computationally handling humor is critical to being able to conduct an informal dialogue with a computer; Julia Taylor is making good progress in advancing knowledge in this area — other people in my lab are working on different aspects of less formal ways of using computers.”

I think their work is pretty interesting, but in a way, it’s also a testament to the towering difficulty of producing truly conversational AI. Back in the 70s, AI researchers figured they’d have this nut cracked in a couple of years … but now we have a much richer sense of how dense and nuanced human language and meaning can be. So now we’re seeing more and more brute-force approaches to encoding knowledge about human meaning. Much like Doug Lenat’s CyC database, the argument is that the only way to truly teach a robot the nuances of language is to bootstrap them like children: Teach ‘em one thing after another for years on end.

Of course, keep in mind that these poor AI folks at Cincinnati are spending months of work just to get a robot to grasp really bad jokes. Imagine the toil necessary to communicate the meaning of subtle humor! “Even leaden puns,” as Taylor sighs, “are very difficult to understand.” It also reminds me of one of the reasons that knock-knock jokes are so widespread: Their very unsubtlety means they have the largest possible audience — i.e. the largest possible group of people who’ll understand them. The more nuanced and allusive a joke becomes, the fewer and fewer the number of people who’ll grok it.

This is why humor, in a way, is a sort of Turing test for humans. One of the surest ways to figure out that someone comes from a totally different background, culture, generation, whatever, is to make a joke … and then realize they’re staring at you with a completely blank expression. It’s as if you tried telling a joke to one of the Whites from Alpha Centauri, and they are now regarding you with interstellar incomprehension, unable to unpack cultural assumptions you figured were nigh-universal. Your parents find your uberironic, media-satured in-jokes annoying and meaningless; you find their humor painfully obvious and Catskillian. No wonder we’re trying to develop robots who’ll listen patiently, and then laugh.

(Thanks to the Bioethics Blog for this one!)

blog comments powered by Disqus

Search This Site


I'm Clive Thompson, the author of Smarter Than You Think: How Technology is Changing Our Minds for the Better (Penguin Press). You can order the book now at Amazon, Barnes and Noble, Powells, Indiebound, or through your local bookstore! I'm also a contributing writer for the New York Times Magazine and a columnist for Wired magazine. Email is here or ping me via the antiquated form of AOL IM (pomeranian99).

More of Me


Recent Comments

Collision Detection: A Blog by Clive Thompson