How can we use AI to create a sense of humor?

  • Thread starter Thread starter kolleamm
  • Start date Start date
  • Tags Tags
    Humor Programming
Click For Summary
SUMMARY

The discussion centers on developing artificial intelligence capable of understanding and generating humor. Key insights include the definition of humor as "something that is unexpected and does not pose a threat," and the importance of context and cultural variations in humor perception. Participants emphasize the need for AI to possess extensive real-world knowledge to effectively recognize and create jokes, as humor often relies on wordplay and dual meanings. The conversation also highlights the challenges of programming humor into AI, particularly in managing ambiguities and understanding cultural references.

PREREQUISITES
  • Understanding of natural language processing (NLP) techniques
  • Familiarity with humor theory and cultural context
  • Knowledge of machine learning algorithms for context recognition
  • Experience with programming languages suitable for AI development, such as Python
NEXT STEPS
  • Research natural language processing libraries like NLTK or SpaCy for humor detection
  • Explore humor theory literature, including works on computational humor
  • Learn about machine learning models that handle ambiguity in language
  • Investigate cultural differences in humor to enhance AI understanding
USEFUL FOR

AI developers, researchers in computational linguistics, and anyone interested in the intersection of artificial intelligence and humor creation.

  • #31
rootone said:
I'm not so sure about that.
It would mean that if the author asserts that pushing a random person into a river is funny then our AI should consider the act to be amusing.
But only if the author is the AI developer. Otherwise other code (represented by the ellipsis) would determine whether it was funny.
But this may be a problem. If we want to market this, we should replace DEVELOPER_ID with a global value that can be reconfigured whenever the AI is resold (g_AI_Owner_ID).
 
Technology news on Phys.org
  • #32
Mark44 said:
It's not just the knowledge that a horse has a long face, but that there's another meaning for "long face." So is it that the horse has a long face (literally, because it's a horse) or it that the horse is sad, the other meaning of having a long face.

Humans can deal with these ambiguities, but computers and their software have a much harder time with ambiguous statements.
I think a computer could deal with these ambiguities just as well.

@Mark44 ' statement reminded me of an experiment I read about robot making life or death decisions, where a robot was programmed to keep another robot from falling into a hole. Everything works fine until you put two robots that need to be saved. Which should it choose? Too often, it was changing it's mind so often that it couldn't save either of one.

That is ambiguity. And it could be easy to program AI to recognize it. What's so different about a joke where a sentence could have two meanings? The AI searches its vocabulary and finds the two meanings that have the same value under the given context. It then knows it is a joke. Why? Because the sentence is constructed in such a way that no one can clearly tell which meaning is the right one. That is how a human knows it is funny. If a human (a kid or someone who doesn't master the language for example) doesn't have two references to its knowledge, it won't find the play on words funny either. That is even true for inside jokes.

This is for understanding a joke. Now, about creating one, that might be more difficult ... maybe not. It is probably creating one in the right circumstances that is hard (You shouldn't tell a joke when someone died).
 
  • #33
jack action said:
I think a computer could deal with these ambiguities just as well.

@Mark44That is ambiguity. And it could be easy to program AI to recognize it. What's so different about a joke where a sentence could have two meanings? The AI searches its vocabulary and finds the two meanings that have the same value under the given context. It then knows it is a joke. Why? Because the sentence is constructed in such a way that no one can clearly tell which meaning is the right one. That is how a human knows it is funny. If a human (a kid or someone who doesn't master the language for example) doesn't have two references to its knowledge, it won't find the play on words funny either. That is even true for inside jokes.
That may be a necessary condition for some jokes, but it is not sufficient. Sometimes word play is used to communicate a serious message.
How about this: "There are some things money can't buy. For everything else, there's MasterCard". There's a subtle ambiguity in the first sentence. It can be taken literally, or you can recognize it as a romantic reference to life experiences that transcend economics. The second sentence plays on that ambiguity. Combined, the two sentences follow the same semantic pattern of many jokes - with a setup and a punch line. But the message is not humorous.

Or is it? As you mentioned, context is important. Tell a quick story about a life event you wouldn't want to repeat, then follow it with this slogan as a sudden contrast to the stories in the MasterCard advertising campaign and it could be quite humorous. In this case, the core humor is in the notion of cherishing something that is distasteful - and perhaps the possibility that someone might be sold on that notion.

For AI to tackle this, it needs to be able to listen to the joke, see the ambiguities, determine how those different meanings might threaten or support a human listener, then see a sudden twist in this effect, then recognize that the change in this effect falls within the bounds of humor.

But, do you even need ambiguity. Sometime confrontation works just as well:
http://www.digitalsynopsis.com/wp-content/uploads/2014/08/honest-advertising-slogans-5.jpg
 
  • #34
People talk about different kinds of humour/laughter: nervous laughter, relief, absurdity, surprise, etc. but I think these all boil down to the same thing really, they are all "misapplications" of logic, basically a faulty premise that is taken to its logical conclusion, which is then proven wrong thus revealing the premise was false.

Laughing in relief is for example, you were frightened by a rustling in the bushes, you thought it might be a tiger but it turned out to be a sparrow. You adopted the false premise that the rustling was made by a tiger and you created a threat in your mind based on that only to be proven wrong and your whole line of thought was thus a wayward path. Maybe the rustling really was a tiger and you barely managed to escape it! Then you might also laugh because (thankfully) your logical deduction that you would soon be tiger dinner was proven wrong.

Laughing in surprise is almost exactly the same but with the added layer that initially you didn't suspect a thing, then you get the surprise which might shock you and cause your mind to quickly leap to assumptions about the situation (possibly another phantom tiger!) and then this is proved wrong too. So you are both laughing in relief and laughing at your inability to detect anything was afoot at all.

Nervous laughter happens when you are trying to reassure yourself that you have indeed made a mistake, the situation cannot be as bad as it seems, this must be a joke, right?

Absurdity is I think the purest form of humour, it is the most abstract form of this same "faulty premised" logic. It would be fairly simple to give AI a childish absurdist humour, for example, all you need to do is miscategorise something on purpose, eg, "Q: What type of car does my Dad drive? A: A banana!", we were expecting a type of car but instead got a type of fruit; hilarious, I'm sure you'll agree.

I think the secret to the most effective humour is maintaining the wayward path of reasoning for as long as possible. But this isn't as simple as drawing out our misdirection, eg: "Q: What has four wheels, a horn, a windshield and seats? A: A banana!", none of those descriptors lead us any closer to a banana so we weren't really misled, just delayed. Although the fact I used, "A banana!", again as the answer is kind of amusing, which I guess is funny because if every answer I give is, "A banana!", then everything I say is an illogical conclusion, the whole idea of there being a question with a real answer becomes a misdirection and a faulty premise.

So what if I use the same joke but try to fit an answer that matches the description, then I really will have made a wayward path to follow. "What has four wheels, a horn, goes very fast and is a danger to pedestrians? A rhinoceros riding a skateboard." Now we're getting somewhere, this looks like an actual joke and it has a simple, replicable format: "find two unrelated objects, a combination of whose descriptors are also descriptors of a third object." IN this case a car, a rhino and a skateboard.

Let's give it a go. First find two objects that have a common descriptor but other unmatching descriptors: a cup and a door both have handles but are quite different in other respects. Now find a third object that shares a different characteristic with both. We can also think about combinations, like something that might use a cup or have a door in it, these combinations don't have to make sense (like our rhino on a skateboard). How about a spaceship, a "flying saucer"? That would have a door in it and cups go with saucers. "What has a handle and is usually found on a saucer? A spaceship door." Okay, not a classic but it works. We choose "spaceship door" as the answer because this is the least common of the two possible answers (the other being a cup). In fact the combination is usually going to be the least common answer so it will probably be the funnier of the two.

Let's try another using a door and a cup again. "What has a handle and can be filled with tea? An Englishman with a door in his face.", this requires knowledge of a further connection to appreciate fully: a door and a mouth are both portals. The door replaces the mouth on the face of the man.

The rhino joke works better because the "horn" refers to two very different things in the case of the rhino and the car, so this makes misdirection easier. Utilising this kind of distinction to produce humour requires data that distinguishes between different definitions of the same word. It is clear that a sense of humour requires a lot of detailed data.
 
  • Like
Likes   Reactions: jack action

Similar threads

Replies
38
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 42 ·
2
Replies
42
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 40 ·
2
Replies
40
Views
6K
Replies
10
Views
5K
Replies
7
Views
6K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K