here's a joke my grandpa would have
loved what do you call a murderer with
moral fiber that's right a serial killer
sorry I should have warned you now I'm
not proud to admit this but there's a
part of me that actually really loves
this joke too and I love it because it's
so weird and so quintessentially human
it's when the last things we'd expect a
computer to understand and yet this joke
was written by a computer that's right
I'm talking about computational humor
that's using computers to generate and
understand humor it's an actual field no
joke sorry so computers today see
they're getting smarter they're getting
smarter but they're also developing a
sense of humor and as these algorithms
of humor so to speak as they continue to
develop they have the potential to
change how we relate to our mechanical
friends but also how we relate to each
other and to be clear I don't think this
is just a curiosity as computers
increasingly surround us in our lives I
think it's gonna be a necessity now I
wasn't always convinced to the value of
relatable machines let alone making you
laugh with software why would I need my
software to lighten the mood right but
then I took a closer look at myself see
I'm not an angry man but I routinely
fantasize about taking my laptop and
smashing it against a rock and it's
always for the stupidest reasons like
maybe the Internet's a little slow it's
not even the laptops fault no people
people frustrate me too but the
difference is that with people I have a
safety valve called humor even on a call
with Comcast someone cracks a joke it
changes the whole dynamic and this is
because humor has a way of instantly
connecting us with each other even
complete strangers you're more than 30
times as likely to laugh when you have
company than when you're by yourself
more broadly we can look at humor as
sort of the wd-40 of human interactions
in a world we were increasingly
surrounded by computers we're gonna
desperately need some of that
lubrication or we're gonna drown in the
frustration
now it's really important to recognize
the significance of this problem like
computers today aren't just word
processors they're on our wrists they're
in our toasters they're inside our
medical devices there are becoming our
our assistants our companions even our
caretakers and it's not just the movie
her that I'm talking about here I mean
Watson Siri Cortana Google now these
these machines interact with people
every day and we're starting to see that
humor can be helpful Siri for instance
often has to deal with some pretty
boneheaded questions like this one Siri
what color are your eyes and Siri says
in response I don't have eyes but if I
did I think I'd be rolling them a lot
okay that's great but now even though
this is clearly a can joke I do think it
hints at the ways that humor can reduce
some of the friction between us and our
machines especially as they surround us
but this is where computational humor
gets really interesting it's not just
about connecting us with our machines it
can also help connect us with each other
especially for those of us who have
trouble in social situations now in many
ways I I experienced this firsthand see
I wanted to be a comedian when I was a
kid and there was a reason for that see
I I was an only child my parents moved
around a lot and the only constant
friends I had really were and my
computers are in the shows that I
watched but that's not really a
substitute for human connection so at
every new school and every new town I
sort of found myself back in the same
place trying to make friends with
strangers and for someone who's shy or
socially awkward that's terrifying so I
decided I was going to connect with
people by making them laugh now this
might sound like a fairy tale but
unfortunately comedy is really hard and
I was really bad at it so I took what
could very generously be described as an
algorithmic approach to humor okay so I
start with a joke like this one what do
you call a bee that eats too much chubby
okay I was in elementary school cut me
some slack
now I'd recognize not being a total
the third that the humor in this
joke comes from the similarity of chubby
and B and then I'd replicate this tons
of times what do you call a B that's
good for your health of
what do you call a newborn be a baby
what do you call it be in the spring a
maybe you get the idea now you can give
gone with us now what's what's
interesting is I mean sometimes even
this would be too much effort and I just
copy the original joke outright you can
probably see why I became an engineer
now know what's what's interesting
though is that this this process that I
described for you this very hackish a
nun creative process it may not sound
like an algorithm but it is in fact at
the same time that I was pulling this
Carlos Mencia act in the early 90s Kim
Binsted Graham Richey and a bunch of
other researchers were busy
jump-starting the field of computational
humor using what was essentially very
sophisticated ideas using these same
fundamental ideas that I was using right
and these stupid little examples that I
shared with you let me show you a
simplified view of their process what do
you call it when dinosaurs collide
trying to service Rex okay that's our
pun can laugh there's four words here
dinosaurs collide trying to source Rex
those are our key words and they relate
to each other in very specific ways both
in terms of how they sound some of them
sound alike and in terms of what they
mean some of them means similar things
so we can ask a computer to go hunt
through dictionaries and corpora for
other combinations of words and phrases
that have a similar pattern of
relationships right and what comes back
it's usually pretty awful but every once
in a while we get something that my
grandpa would approve of for instance
this one what do you call a material
with the bright side a silver linin so
again you see there's four words here
and they relate to each other in a very
similar way as the previous example so
this is a lot of fun but it's also more
than that just as in my example this two
can help connect people with each other
in the mid-2000s a group of researchers
from Aberdeen Edinburgh and Dundee
created a version of the system called
standeth and it the goal of the system
was to help kids who have communication
disabilities of some sort now a lot of
what we call humor we we acquire through
interacting with each other and
participating in wordplay and sadly some
kids don't have very many opportunities
for that and that's where the software
comes in it gives them sort of a
playground where they
play around with puns generating puns
and modifying the generation of puns as
well you can actually play with it a
version of it yourself it's called the
joking computer now it's admittedly a
focused example but I think there's
something more profound happening here
it's not unusual for those of us who
have trouble interacting with each other
to go to computers as sort of a safe
place as a safe haven and there's
something really powerful about taking
that same space and using it to teach us
how to laugh and how to make other
people laugh I find that really
beautiful but to use this more generally
and broadly we're gonna have to go
beyond puns to the more unstructured and
and subtle humor that we humans engage
in pretty regularly I mean think about
the last thing that made you laugh
chances are not only was it not a pun it
probably wasn't even a joke in some
sense the real goal for us here it's not
necessarily to create machines that are
gonna write jokes for us but to create
machines with personalities that we find
humorous or amusing and they get two
personalities though we often have to go
through language and language is a bear
your average English speaker knows tens
of thousands of words and breaks
grammatical rules about as often as he
follows them and even if you can get
past that there's issues of ambiguity
context and and general common sense
knowledge when I ask you how much does
President Obama make somehow you know
I'm asking about his salary not about
how much soupy makes this is very hard
to encode into an algorithm but in
recent days we may have caught a break
we may have found a back door and this
back door has a big sign on it that's a
hint and the sign reads data the amount
of data specifically human generated
data that's available to us today is
unprecedented and it's growing and the
reason it's so valuable one of the many
reasons I should say is that with it we
can teach our machines how to
communicate with us you've actually
experienced this yourself if you've used
an internet search engine in recent days
like Google Bing duck duck Oh what have
you these machines have been trained by
data how to understand your queries and
your questions but data could also go a
step further and teach machines how to
have amusing personalities my favorite
example of this actually happened
earlier this
and interestingly I don't think it's
typically seen as an example of
computational humor but it is so several
months ago a graduate student at
Stanford named Andre Karpov II
introduced a piece of software called
char rnm now what this software does
like some other pieces of software and
algorithms out there is it is it trains
machines to imitate a data set of your
choice so for instance I compiled a very
large list of tweets from Beliebers
these are fans of Justin Bieber and I
fed it to this machine this machine
digested all these examples and gave me
back a trained machine that could
generate fake belieber tweets basically
yeah basically imitating the style of
this data set right
so when I asked this machine to talk
here's the kinds of things it says I
love the way he is so beautiful baby and
hashtag MTV hottest I love you so much
crying emoji okay so so I'm not an
expert on believers but to my untrained
eye this seems like a pretty good
imitation of the real thing right now
what's interesting is in recent days
people have been trying this with all
sorts of data political speeches the
Bible Fifty Shades of Grey is actually
one of my favorite examples I would
apologize for all the white out but
honestly you're not missing much all
right now the point I'm the reason I'm
showing you all these example is this I
want you to notice something in none of
these examples is the machine cracking a
joke it's not running a stand-up routine
it's just the humor is a lot more subtle
than that it's buried inside the style
of language you could say that we've
painted this machine's personality with
data and I think that's a step in the
right direction but it's also just the
tip of the iceberg there are so many
ways in which computational humor can
take advantage of data today researchers
have built irony detectors install
generators even even there's even a
there's even a double entendre
recognizer out there called deviance
it's actually the acronym for the
algorithm now we're also just really at
the very beginning with these algorithms
there's so much about humor that they're
not even remotely capturing yet to take
things forward the timing couldn't be
better I on one hand we have this
incredible tool called data that's
getting more powerful by the day
and on the other hand our computers are
surrounding us more and more every day
and and the need for them to be more
personable and relatable that's just
gonna get stronger
I think computational humor could be the
key to making healthy relationships
between us and our machines and also
less frustrating lives for us and in the
process it might even connect a few of
us some may disagree
to quote an Wilson shafe I recognize
that humor isn't for everyone it's only
for those of us who want to have fun
enjoy life and feel alive and here's to
the algorithms that are helping us get
there thank you