While artificial intelligence may be putting millions of people out of a job - dispassionately flipping hamburgers, making cars, and doing freaky things in bed your wife absolutely won't - there's one thing that AI still can't do, yet;

Understand jokes.

"Artificial intelligence will never get jokes like humans do," says Kiki Hempelmann, a computational linguist who studies humor at Texas A&M University-Commerce. "In themselves, they have no need for humor. They miss completely context."

Never say never Kiki!

Robot1: So there I was, exterminating all these screaming humans - and one goes 'I gotta wife, I gotta kid, you can't do this!' Robot2: What did you do? Robot1: I thanked him for notifying me of the additional illegal humans and exterminated them all! [laughing in robot]

For now, however, it looks like we're relatively safe.

"Creative language — and humor in particular — is one of the hardest areas for computational intelligence to grasp," said computers scientist and linguist at Darmstadt University of Technology in Germany - who has analyzed over 10,000 puns, which he called torture.

"It’s because it relies so much on real-world knowledge — background knowledge and commonsense knowledge. A computer doesn’t have these real-world experiences to draw on. It only knows what you tell it and what it draws from."

Allison Bishop , a Columbia University computer scientist who also performs stand-up comedy, said computer learning looks for patterns, but comedy thrives on things hovering close to a pattern and veering off just a bit to be funny and edgy. Humor, she said, “has to skate the edge of being cohesive enough and surprising enough.” For comedians that’s job security. Bishop said her parents were happy when her brother became a full-time comedy writer because it meant he wouldn’t be replaced by a machine. “I like to believe that there is something very innately human about what makes something funny,” Bishop said. -AP

Heather Knight, a computer scientist at Oregon State University, created the first comedy-performing robot named Ginger in the hopes of designing better machines that interact with - and respond better to - humans. Ginger tells jokes and stories written by humans - including a little Shakespeare.

"If you prick me in my battery pack, do I not bleed alkaline fluid?" asks Ginger, in reference to "The Merchant of Venice."

And while comptuers can be programmed to both tell and even understand puns, their humor breaks down from there, according to Purdue University computer scientist Julia Rayz.

"They get them — sort of," said Rayz. "Even if we look at puns, most of the puns require huge amounts of background."

Rayz has spent 15 years trying to get computers to understand humor, and at times the results were, well, laughable. She recalled a time she gave the computer two different groups of sentences. Some were jokes. Some were not. The computer classified something as a joke that people thought wasn’t a joke. When Rayz asked the computer why it thought it was a joke, its answer made sense technically. But the material still wasn’t funny, nor memorable, she said. -AP

IBM is trying too...

Noam Slonim, a former writer for Israel's version of "Saturday Night Live," has been working on IBM's Project Debater - an attempt to create an AI based on language that can win structured arguments with people. Slonim has integrated humor into its programming in the hopes that the occasional one-liner could help it win in a debate - only to find that it backfired spectacularly by making jokes at the wrong time or in the wrong way. Needless to say, Slonim has dialed back the attempts at humor to one per debate.

"We know that humor — at least good humor — relies on nuance and on timing," says Slonim. "And these are very hard to decipher by an automatic system."

That’s why humor may be key in future Turing Tests — the ultimate test of machine intelligence, which is to see if an independent evaluator can tell if it is interacting with a person or computer, Slonim said. There’s still “a very significant gap between what machines can do and what humans are doing,” both in language and humor, Slonim said. There are good reasons to have artificial intelligence try to learn to get humor, Darmstadt University’s Miller said. It makes machines more relatable, especially if you can get them to understand sarcasm. That also may aid with automated translations of different languages, he said. -AP

Dangerous?

According to Texas A&M's Kiki Hempelmann, programming AIs with humor may not be the best idea.

"Teaching AI systems humor is dangerous because they may find it where it isn’t and they may use it where it’s inappropriate," said Hempelmann. "Maybe bad AI will start killing people because it thinks it is funny."

Of course when the robot uprising is eventually upon us, we should probably assume that now-sentient AIs will have at least a basic grasp of comedy. Maybe we can distract them with Adam Sandler movies while we run the other way?