# Can AI write good jokes yet?

Just watched a recent WIRED video on virtual assistants' performance on telling jokes. They're composed by humans, but I'd like to know if AI has gotten good enough to write some.

I don't think the AI has gotten to that point yet. Here are some of the interesting papers on the subject:

• A paper was recently written that attempted to generate jokes using unsupervised learning. The jokes are formulaic: they're all of the form "I like my X like I like my Y: Z" where X and Y are nouns, and Z is an adjective that can describe both X and Y. Here are some of the jokes generated in this paper:

I like my relationships like I like my source, open
I like my coffee like I like my war, cold
I like my boys like I like my sectors, bad


How funny these jokes are is a matter of personal taste I guess.

• Another paper by Dario Bertero and Pascale Fung makes use of an LSTM to predict humor from a dataset of the Big Bang theory shows. This is not generating jokes but finding out where the jokes are said in this dataset (so theoretically, the resulting labelled dataset can hopefully be used to train a model to create jokes).

• Yet another paper is that by He Ren, Quan Yang. Unlike the first paper mentioned above which was unsupervised, this is a supervised learning model. Their neural network model, generates jokes such as:

Apple is teaming up with Playboy Magazine in the self driving office.
One of the top economy in China , Lady Gaga says today that Obama is legal.
Google Plus has introduced the remains that lowers the age of coffee.
According to a new study , the governor of film welcome the leading actor of Los Angeles area , Donald Trump .


My two cents:

As of this writing, it appears that Multi-layer Recurrent Neural Networks (LSTM, GRU, RNN) for character-level language models are by far the most promising way to go about it. Maybe if you find some really cool data you can come up with some funny jokes, similar to how Janelle Shane was able to generate what I find to be really funny pickup lines such as:

Are you a 4loce? Because you’re so hot!
I want to get my heart with you.
You are so beautiful that you know what I mean.
I have a cenver? Because I just stowe must your worms.
Hey baby, I’m swirked to gave ever to say it for drive.
If I were to ask you out?
You must be a tringle? Cause you’re the only thing here.
I’m not on your wears, but I want to see your start.
You are so beautiful that you make me feel better to see you.
Hey baby, you’re to be a key? Because I can bear your toot?
I don’t know you.
I have to give you a book, because you’re the only thing in your eyes.
Are you a candle? Because you’re so hot of the looks with you.
I want to see you to my heart.
If I had a rose for every time I thought of you, I have a price tighting.
I have a really falling for you.
Your beauty have a fine to me.
Are you a camera? Because I want to see the most beautiful than you.
You’re so beautiful that you say a bat on me and baby.
You look like a thing and I love you.
Hello.

• I found those pretty hilarious tbh – BlueMoon93 Jun 6 '17 at 12:53
• @Tshilidzi Mudau Thanks for posting!!! I am extraordinarily interested in this subject, because humor (and even irrationality, which can constitute humor) can have utility value. – DukeZhou Jun 6 '17 at 17:47
• Those are a selection of "entirely new ones" - and they are a bit wierd, as the person saying the joke claims to like something that could easily offend a lot of other people. I am guessing that is one reason they are "entirely new", i.e. it is not that they are so new, it is more that people who think them have probably learnt toto keep them to themselves. Interesting post though. – Mike Wise Jun 18 '17 at 6:42
• The last "hello" line reminds me of this. – user7478 Sep 13 '17 at 19:40

As of now we don't have a satisfying cognitive theory of humor (or at least, one that can evaluate the hilarity of a joke), so a quick survey of the literature seems shows that we don't have much of a clue on how to build a model.

Because of that, and the fact that existing methods don't seem to reliably produce good jokes free form, there seems to be little reason to believe that ML methods can produce good jokes.

But of course this is all normative.

• Part of the model would need to be real-time continuously dynamic because jokes are dependent on current/recent events. And if it's a standup AI comedian, then the audience's mood changes and reactions determine its timing. What a great idea, you know how Jeopardy had "Watson"? Well, maybe SNL or CC could have "Chaplin," the first standup AI comedian. ^_^ – user7478 Sep 13 '17 at 0:58
• yeah the point you raise is a very good one. it doesn't seem that our ML methods can encode things like that (timing, historical context, audience reaction) and stuff in a meaningful fashion. more worryingly is that we also don't know ow these things affect humor, more less how to quantize its effect. or to put it more succinctly, we don't know how we even or how to even – k.c. sayz 'k.c sayz' Sep 13 '17 at 1:53

Amazingly, I just found a claim about that. I just read it in twitter and the model is simply a GPT-2 WITH 355M params trained with 200,000 raw title and body-based jokes. what is amazing is that GPT-2 is the most advanced text generating model it even can translate or answer math questions if trained well.

Let's see example output from twitter.

• "I asked my girlfriend if she knew what sex was like || she said that you can kiss her and she'll think you're a queer."
• Why does the teacher have her own car? || She's a car company for Santa.