AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Joke generating bot
 
 

How do computers generate humorous responses?  Can it be “programmed”?  There are some interesting projects out there, and it is something I have been playing around with recently- and now have a bot that is ready (with occassional crashes) for you all test test. 

Please have give the bot a spin.  To get it to generate a joke on the fly, just enter:

“tell me a joke about x”  where “x” is a word you want to generate a joke around.

There is no way to rate the jokes other than to tell the bot what you think of the joke- I will be looking at the transcripts for ways to better respond.

It will also do ‘poetry’, but I have not yet put that bit online yet.

-cb

 

 
  [ # 1 ]

So are you going to enter the Funniest Computer Ever contest, Carl? cheese

 

 
  [ # 2 ]

I suspect that the problem of consistently generating (as opposed to merely reciting) good jokes is AI-hard.

 

 
  [ # 3 ]

Maybe so, but it’s fun to try, just the same. smile

 

 
  [ # 4 ]

True, I think passing a properly conducted Turing test is probably AI-hard too, but that doesn’t stop most chatbot authors from trying. raspberry

 

 
  [ # 5 ]
Jarrod Torriero - Aug 29, 2013:

I suspect that the problem of consistently generating (as opposed to merely reciting) good jokes is AI-hard.

I also suspect it is hard for humans too. If someone asked me to create a funny, original joke about a random subject, i too would struggle.

 

 
  [ # 6 ]

Good point, Steve. Any one of us can recite a joke (some of us more easily than others), but very few of us can create one that makes people laugh. I’ve tried my hand at standup comedy in the past, and let me tell you, being funny is HARD. smile

 

 
  [ # 7 ]

The original goal of Yoko was to build a chatbot that can generate jokes. But, when starting coding, first I just needed some groundwork to have it converse naturally. Of course, ‘some groundwork’ turned out to be a problem humanity hasn’t solved yet, so I’m a bit stuck at that phase smile

Anyway, I wrote quite a bit on the humor section Yoko’s ‘about’ pages on the subject.

(The words ‘class’, ‘objects’, ‘properties’ etc etc used in the text have pretty much the meanings they do in OO programming.)

EDIT: btw, as of this moment Yoko does none of the things described there yet - but to satisfy the humor-craving visitor I made a quick plugin that has her tell knock knock jokes when you ask about a joke.

 

 
  [ # 8 ]
Steve Worswick - Aug 29, 2013:
Jarrod Torriero - Aug 29, 2013:

I suspect that the problem of consistently generating (as opposed to merely reciting) good jokes is AI-hard.

I also suspect it is hard for humans too. If someone asked me to create a funny, original joke about a random subject, i too would struggle.

I agree.  It’s difficult enough just being funny without requiring a topic.  A search engine would do a better job of it, and more easily.

If you’re interested in just being funny, I’d suggest that you examine ElBot ( http://www.elbot.com/ ).

Jester 4.0 uses an algorithm and might give you more information if you’re interested in jokes.  http://eigentaste.berkeley.edu/user/index.php

 

 
  [ # 9 ]

IPod-AI—I sync, therefore I am.

 

 
  [ # 10 ]
Merlin - Aug 29, 2013:

IPod-AI—I sync, therefore I am.

This suggests another possible approach to humor: taking advantage of phonetic representation of a word (which one might store simply next to the word in the knowledge base).

I do not find it inconceivable for a bot to come up with this joke. It would take LOTS of advancements and LOTS of meta-information to be stored with each ‘fact’ (and, as always, LOTS of facts).

But I can see it done, and at the heart of such a joke algorithms (and many others) would be lookups for ‘phonetically similar’ (of which ‘rhyming’ is a useful special case) terms.

ALGORITHM:
[ol][li]Start with a famous quote[/li]
[li]look for the main (or any?) verb (or noun or…)[/li]
[li]look for another verb (or noun or…) phonetically similar (I think best would be rhyming) to it.[/li]
[li]look up which entities are able to perform that verb (or noun or…), and nouns that are closely related to the noun [/li]
[li]fake the ‘author’ of the quote to that entity (a famous instance of it perhaps?), and replace the verb in the quote[/li]
[/ol]

Like I said, thinking ‘algorithmically’ about humor is how I got into this whole chatbot game in the first place, so I think I am adding this mechanism to Yoko’s to-do list. Each of these steps is doable to implement in her framework, though I should do some studying on how to best store phonetic information.

A consideration I’ve had with other forms of humor as well (see my linked article above), is here relevant to step 3: when playing around with associations like that, the more UNIQUE the association is, the more likely
people are able to get the joke, or in other words the more effective the joke is.

If your algoritmically generated joke depends on tomatoes being red, it’s more likely to work than if it depends on tomatoes being a vegetable.

LET’S TEST MY ALGORITHM TO GENERATE SOME OF THE FUNNY. From the top of my head:

[ol][li]‘Seize the day!’ - unknown[/li]
[li]main verb: seize, main noun: day[/li]
[li]phonetically similar verbs: squeeze, please. Nouns: hay, clay[/li]
[li]entities also linked to the similar vebs: respectively rubber ducks, (nothing comes to mind for ‘please’ except general people). Entities linked to the nouns: donkey, pottery resp. A big bonus would be an entity linked to phonetically similar words to BOTH the verb and the nouns. That would be a zinger, but it would also be performance-intensive, and very often, not get any hits. But, doable. [\li]
[li]This is all we need! For a bonus, if we have a famous instance of our joke entities, let’s use that for originality. Famous rubber ducks? Nope. Famous donkeys? Nope. Famous pottery stuff? Ok, again not, but others may know more of English popular culture.[/li]
[/ol]

Let’s have a look at the output of my algorithm here:

[ul]
  [li]‘Squeeze the day!’ - Mr. Rubberduck[/li]
  [li]‘Please the day!’ ... No entity found for ‘please’, so nothing here[/li]
  [li]‘Seize the hay!’ - Mr. Donkey[/li]
  [li]‘Seize the clay!’ - my local pottery store[/li]
[/ul]

Not too bad if you ask me! Bear in mind that this was all done using simple, algorithmic steps, and with both the quote and the associations being the first ones that popped in my head. With the right ‘seed data’ you can easily generate hundreds of these.
Regarding my remark above, two interesting considerations:

- I didn’t know an author here, but finding a phonetically similar AUTHOR out of our related would of course be bonus funnypoints. I wonder how much of a combinatorial explosion this is all gonna result in.
- the more universally known the quotes, and any specific instances of our ‘replacement’ entities to make as the author, the better these will work.
- the more unique the relation is, the better these will work. ‘universally known’ may be hard to judge objectively, but this second criterion is just a simple counting matter.

A FINAL REMARK: Something the above would also play a part in generating original poetry. I know at one point bot-generated poetry was kinda ‘hot’ in AI (probably around 1970, like always smile). Did those bots work like this? Or am I being too optimistic again smile

God I love this stuff.

And yes, I am definitely resolving to store phonetic information in Yoko’s knowledge base at some point now. Her architecture perfectly allows implementing the above algorithm, and much more importantly: the joke that started this post is proof that even though us Turing-folk tend to focus on WRITTEN conversation, pronounciation still often plays a crucial role in natural conversation.

 

 
  [ # 11 ]

Well, it seems to make jokes well enough, but I seem to fail at getting most of them tongue rolleye.
Would be fun if it participated in the “funniest computer” contest. I’m sure you could have it run jokes on the last noun it comes across without strictly requiring the format “tell me a joke about..”

I have to get something off my chest though, lads. I also happen to be a manga artist of some experience, and it just makes me cringe to see chatbots accompanied by random scantily clad manga chicks from the 90’s. Surely you can pick something that matches the style of the website better, and you should be aware that all art is copyrighted. If anyone wants some custom-tailored art of their chatbot persona, I’d be happy to direct you to some decent artists up for the job.

 

 
  [ # 12 ]

I have to get something off my chest though, lads. I also happen to be a manga artist of some experience, and it just makes me cringe to see chatbots accompanied by random scantily clad manga chicks from the 90’s. Surely you can pick something that matches the style of the website better, and you should be aware that all art is copyrighted.

I’ve had similar thoughts the past few days - and I kinda regret not coming up with another name for my chatbot, many years ago before I ever looked online to see what was already out there.

For some reason, choosing a ‘cute’ yet a tad ‘distant’ young-woman name for a chatbot seems to lead naturally to something Japanese-sounding! At least for me.

Maybe I’ll change my chatbot name at some point, it not like she (sorry, IT) has any fame at this point, so better sooner than later.

 

 
  [ # 13 ]

“Sneeze the day”—Jimmy Durante
http://en.wikipedia.org/wiki/Jimmy_Durante

 

 
  [ # 14 ]

Nice post, Wouter. smile The real challenge, it seems, is being aware of your audience. What sorts of references/quotes are they likely to recognize? Which people? (Jimmy Durante? Didn’t know him, but now glad I do. smile ) And then couple this with an expansive knowledge base and NLP capability to manipulate your reference material. Phew! Daunting, but definitely feasible.

As for encoding phonetic information, you might want to check out Metaphone and its variants.

 

 
  [ # 15 ]

Well, I figured it would stir some debate!  Humor is an intersting topic for chatbots because a bot that can create humor AND recognizing humor would conotate a “thinking computer” for many users. 

As a first step, generating humor ad hoc from a random subject is pretty hard to pull off for anyone, let alone a simple chatbot, but Laybia does a remarkable job considering the complexity of gathering the appropriate input word/phrase, gettting rhyming words, getting concepts that are related to the original words and the rhyming word(s), etc. etc. 

I have gotten more than few outputs that look nonsensicle until I look up the “nonsense” and it turns out to be a real, albiet essoteric,  word that makes the joke at least plausable.

tell me a joke about coffee
A coffee joke: 
What do you call a dish coffea canephora?  A teriyaki coffee?

tell me a joke about coffee
A coffee joke: 
What do you call a shoshonian language robusta coffee?  A comanche coffee?

tell me a joke about clowns
A clown joke: 
What do you call a Tin Pan Alley Kelly?  A downtown clown?

tell me a joke about X
A x joke: 
What do you call a second-class cardinal?  A ranks x?

tell me a joke about jokes
A joke joke:
What do you call a roll pun?  A wolk joke?

tell me a joke about cortex
A cortex joke: 
What do you call a chest adrenal cortex?  A pix cortex?

Tell me a joke about computers.
A computer joke: 
What do you call a floater site?  A beachcomber computer?

tell me a joke about AI
A ai joke: 
What do you call a overstock mt?  A oversupply ai?

tell me a joke about you
A you joke: 
What do you call a tewed you’re?  A tew you?

tell me a joke about chatbots
A robot joke: 
What do you call a étagère humanoid?  A whatnot robot?

tell me a joke about bots
A robot joke: 
What do you call a photo humanoid?  A longshot robot?

 

 1 2 3 >  Last ›
1 of 4
 
  login or register to react