Sam Gustin/Wired

Over the years, we've become accustomed to computers besting humans in tests of raw intelligence. Deep Blue out-maneuvered world chess champion Garry Kasparov in 1997, and in 2011 Watson trounced

Jeopardy! winners Brad Rutter and Ken Jennings. Sure, computers can play the Sicilian Defense better and have a firmer grasp of obscure geography -- but facts and analysis aren't everything. We wanted to establish a different litmus test for computer supremacy, so we devised a new matchup between man and machine to establish once and for all who's funnier. Your contestants in the bout: stand-up comic Myq Kaplan versus Manatee the joke-telling computer.


It's perfect timing for such a duel. Computers in the comedy business are becoming an increasingly big deal. Last fall, the Association for the Advancement of Artificial Intelligence held its first-ever symposium on artificial intelligence and humour. Comedic robots are making a splash at SXSW Interactive and garnering GQ profiles. And a few years ago, Manatee caused a political stir when pundits learned its designers at Northwestern University had scored more than $700,000 in federal stimulus funds to help develop it.

Artificial Irreverence

Read next There's a day for everything, from cake tossing to plant walking There's a day for everything, from cake tossing to plant walking

It's no surprise, really. The name of the game in the tech industry is making interactions between people and their gizmos ever more human -- and human often equals humorous. That means everything from computer programs that make fun of themselves when they make a mistake to a GPS device that sarcastically acknowledges when you ignore its directions. "'Just the facts, ma'am,' isn't going to play as machines get more and more involved in our lives," says Northwestern University professor Kristian Hammond, who helped design Manatee and now develops news-writing computer programs for the company Narrative Science. "It's all about making the communication between people and the machine a smooth, compelling interaction."

There's another reason computer scientists are eager to tackle comedy: jokes are some of the toughest tests of their programs. If artificial intelligence programs are truly going to model human intelligence, they have to be able to grasp all the clever ways people make things funny.


In fact, scientists have been hard at work for decades designing robo-jokesters. Among the efforts are JAPE, the Joke Analysis and Production Engine; STANDUP, the System To Augment Non-speakers'

Dialogue Using Puns; LIBJOB, the light bulb joke generator; SASI, a sarcasm-detecting program; and DEviaNT, the Double Entendre via Noun Transfer program, which finds the perfect spots in natural language to insert "That's what she said."

Plus, for computer programmers looking for just the right witty acronym for the next big comedy computer, there's the HAHAcronym Generator.

Read next Gallery: Kids' inventions made real: ladybird brollies to skip-rope drones Gallery Gallery: Kids' inventions made real: ladybird brollies to skip-rope drones

What have most of these attempts discovered? That up until now, computers have been able to tell jokes, but only really dumb ones.


Consider the following computer-generated zingers:

What kind of animal rides a catamaran?

A cat.

What is the difference between leaves and a car?

Read next Kids' inventions made real: ladybird brollies to skip-rope drones Kids' inventions made real: ladybird brollies to skip-rope drones

One you brush and rake, the other you rush and brake.

If robots ever conquer the world, in other words, we're in for a dystopian future of horrible puns.

What Makes Things Funny?

One problem is that for a computer to truly be humorous, most people agree that first you have to program into it what, exactly, makes things funny -- and that's something experts have struggled with for millennia. Plato and Aristotle, for example, long pondered the issue and came up with the superiority theory, the idea that people laugh at the misfortune of others. Sigmund Freud, meanwhile, argued for his relief theory, the concept that humour was a way for people to release psychic energy pent up from repressed sexual and violent thoughts. Then there's the incongruity theory, the idea put forward by seventeenth-century French philosopher Blaise Pascal that humour arises when people discover there's an inconsistency between what they expect to happen and what actually happens (a concept well illustrated by jokes with punch lines).

We're partial to the benign violation theory (BVT), an idea developed by McGraw and his collaborator Caleb Warren that humour arises when something seems wrong or threatening, but simultaneously seems okay or safe.

Read next Watch: eagle attacks drone, drone loses Watch: eagle attacks drone, drone loses

According to the theory, tickling is funny because it involves violating someone's physical space in a benign way. People can't tickle themselves because it isn't a violation. Nor will people laugh if a creepy stranger tries to tickle them, since there is nothing benign about the violation.

Still, there's no general agreement yet as to whether the BVT of any of the other contenders are the end-all, be-all of humour theories. So it's not yet clear which of these models should be programmed into comedic computers.

There's another stumbling block for computer-generated humour:

Computers excel in working with simple, fixed data sets. It's why most joke-generating programs have so far focused on puns and other wordplay, since finite word lists and specific definitions are easy for computers to scan and parse. But most comedy trades in concepts that aren't simple or fixed at all. The best comedy mines a wide world of attitudes, assumptions, morals, and taboos, most of which aren't even mentioned in the joke, just subtly hinted at. So if we aim to have computers truly "get" jokes -- much less to come up with their own and know when and to whom to tell them -- we're essentially going to have upload into them all of humanity.

Plus, whether you're partial to the incongruity theory, the benign violation theory, or some other concept about what makes things funny, it seems pretty clear that good comedy breaks the rules and revels in the peculiar. And that's exactly the sort of stuff computer programs aren't very good at.

Read next You can now play Doom inside Doom You can now play Doom inside Doom

Let's Get Ready to Rrrrrriposte!

Still, have we reached the point where technology can overcome some of these hilarity-killing digital limitations? To find out, we're holding a joke-off. In one corner, there's Myq Kaplan, a stand-up comic based in New York and Boston who's known for his comedic word-smithing. In the other corner, there's Manatee, the joke-generation system developed by Northwestern professor Kristian Hammond and then-PhD student Patrick McNally. To create its jokes, Manatee scours the Internet for word combinations that fit into well-known humorous phrases, such as "I like my X like I like my Y..." Then it combines the resulting witticism with a related photo to create a three-panel webcomic, like this:

Wired

The design is based off the webcomic A Softer World, says McNally, who's now a visiting assistant professor of computer science at Pomona College. "I gave it a try and felt the structure provided a very nice abstract backdrop for the expressions I was getting my computer to make," he says. "The Manatee system is not a very smart system. It doesn't understand language in the ways that you and I understand language. It cheats its way around intelligence. But it also produces funny text on occasion."

Can a human beat Manatee at its own game? To find out, we gave Kaplan the same instructions as Manatee: Come up with three jokes in the vein of "I like my X like I like my Y...," and find an appropriate photo backdrop for each of them. The results:

Read next Gallery: Mr Bingo's 'Hate Mail' Kickstarter offers artisinal online abuse Gallery Gallery: Mr Bingo's 'Hate Mail' Kickstarter offers artisinal online abuse

Manatee's jokes:



Wired

Kaplan's jokes:



Wired


Has the computer bested the comedian? Kaplan, for one, thinks that that's an inevitability. "If computers keep getting smarter and humans keep getting dumber, absolutely!" he writes in an e-mail. "But what do I know, I'm just a human. Can we program this question into a question-answering robot and see what it thinks?"

Joel Warner and Peter McGraw are co-authors of the book The Humor Code: A Global Search for What Makes Things Funny.

This article originally appeared on Wired.com