Return to Video

Can a computer write poetry?

  • 0:01 - 0:02
    I have a question:
  • 0:03 - 0:05
    Can a computer write poetry?
  • 0:07 - 0:09
    This is a provocative question.
  • 0:10 - 0:11
    You think about it for a minute,
  • 0:11 - 0:14
    and you suddenly have a bunch
    of other questions like:
  • 0:15 - 0:16
    What is a computer?
  • 0:17 - 0:18
    What is poetry?
  • 0:19 - 0:20
    What is creativity?
  • 0:22 - 0:23
    But these are questions
  • 0:23 - 0:26
    that people spend their entire
    lifetime trying to answer,
  • 0:26 - 0:28
    not in a single TED Talk.
  • 0:28 - 0:31
    So we're going to have to try
    a different approach.
  • 0:31 - 0:33
    So up here, we have two poems.
  • 0:34 - 0:36
    One of them is written by a human,
  • 0:36 - 0:38
    and the other one's written by a computer.
  • 0:39 - 0:41
    I'm going to ask you to tell me
    which one's which.
  • 0:42 - 0:43
    Have a go:
  • 0:43 - 0:47
    Poem 1: Little Fly / Thy summer's play, /
    My thoughtless hand / Has brush'd away.
  • 0:47 - 0:51
    A I not / A fly like thee? /
    Or art not thou / A man like me?
  • 0:51 - 0:54
    Poem 2: We can feel / Activist
    through your life's / morning /
  • 0:54 - 0:58
    Pauses to see, pope I hate the / Non
    all the night to start a great otherwise
  • 0:58 - 0:59
    Alright, time's up.
  • 1:00 - 1:04
    Hands up if you think Poem 1
    was written by a human.
  • 1:06 - 1:07
    OK, most of you.
  • 1:07 - 1:10
    Hands up if you think Poem 2
    was written by a human.
  • 1:11 - 1:12
    Very brave of you,
  • 1:13 - 1:17
    because the first one was written
    by the human poet William Blake.
  • 1:18 - 1:21
    The second one was written by an algorithm
  • 1:21 - 1:24
    that took all the language
    from my Facebook feed on one day
  • 1:24 - 1:27
    and then regenerated it algorithmically,
  • 1:27 - 1:31
    according to methods that I'll describe
    a little bit later on.
  • 1:31 - 1:34
    So let's try another test.
  • 1:34 - 1:36
    Again, you haven't got ages to read this,
  • 1:37 - 1:38
    so just trust your gut.
  • 1:38 - 1:42
    Poem 1: A lion roars and a dog barks.
    It is interesting / and fascinating
  • 1:42 - 1:47
    that a bird will fly and not / roar
    or bark. Enthralling stories about animals
  • 1:47 - 1:51
    are in my dreams and I will sing them all
    if I / am not exhausted or weary.
  • 1:51 - 1:55
    Poem 2: Oh! kangaroos, sequins, chocolate
    sodas! / You are really beautiful!
  • 1:55 - 1:59
    Pearls, / harmonicas, jujubes, aspirins!
    All / the stuff they've always talked about
  • 1:59 - 2:00
    Alright, time's up.
  • 2:00 - 2:03
    So if you think the first poem
    was written by a human,
  • 2:03 - 2:05
    put your hand up.
  • 2:06 - 2:07
    OK.
  • 2:07 - 2:10
    And if you think the second poem
    was written by a human,
  • 2:10 - 2:11
    put your hand up.
  • 2:12 - 2:16
    We have, more or less, a 50/50 split here.
  • 2:16 - 2:18
    It was much harder.
  • 2:18 - 2:19
    The answer is,
  • 2:19 - 2:23
    the first poem was generated
    by an algorithm called Racter,
  • 2:23 - 2:26
    that was created back in the 1970s,
  • 2:26 - 2:29
    and the second poem was written
    by a guy called Frank O'Hara,
  • 2:29 - 2:32
    who happens to be one
    of my favorite human poets.
  • 2:33 - 2:36
    (Laughter)
  • 2:36 - 2:39
    So what we've just done now
    is a Turing test for poetry.
  • 2:40 - 2:45
    The Turing test was first proposed
    by this guy, Alan Turing, in 1950,
  • 2:45 - 2:46
    in order to answer the question,
  • 2:46 - 2:48
    can computers think?
  • 2:48 - 2:51
    Alan Turing believed that if
    a computer was able
  • 2:51 - 2:54
    to have a to have a text-based
    conversation with a human,
  • 2:54 - 2:57
    with such proficiency
    such that the human couldn't tell
  • 2:57 - 3:00
    whether they are talking
    to a computer or a human,
  • 3:00 - 3:03
    then the computer can be said
    to have intelligence.
  • 3:03 - 3:07
    So in 2013, my friend
    Benjamin Laird and I,
  • 3:07 - 3:10
    we created a Turing test
    for poetry online.
  • 3:10 - 3:11
    It's called bot or not,
  • 3:11 - 3:13
    and you can go and play it for yourselves.
  • 3:13 - 3:15
    But basically, it's the game
    we just played.
  • 3:15 - 3:17
    You're presented with a poem,
  • 3:17 - 3:20
    you don't know whether it was written
    by a human or a computer
  • 3:20 - 3:21
    and you have to guess.
  • 3:21 - 3:24
    So thousands and thousands
    of people have taken this test online,
  • 3:24 - 3:26
    so we have results.
  • 3:26 - 3:27
    And what are the results?
  • 3:28 - 3:31
    Well, Turing said that if a computer
    could fool a human
  • 3:31 - 3:34
    30 percent of the time
    that it was a human,
  • 3:34 - 3:36
    then it passes the Turing test
    for intelligence.
  • 3:37 - 3:39
    We have poems on the bot or not database
  • 3:39 - 3:42
    that have fooled 65 percent
    of human readers into thinking
  • 3:42 - 3:43
    it was written by a human.
  • 3:44 - 3:47
    So, I think we have an answer
    to our question.
  • 3:48 - 3:50
    According to the logic of the Turing test,
  • 3:50 - 3:52
    can a computer write poetry?
  • 3:52 - 3:54
    Well, yes, absolutely it can.
  • 3:56 - 3:58
    But if you're feeling
    a little bit uncomfortable
  • 3:58 - 4:00
    with this answer, that's OK.
  • 4:00 - 4:02
    If you're having a bunch
    of gut reactions to it,
  • 4:02 - 4:06
    that's also okay because
    this isn't the end of the story.
  • 4:07 - 4:09
    Let's play our third and final test.
  • 4:10 - 4:12
    Again, you're going to have to read
  • 4:12 - 4:14
    and tell me which you think is human.
  • 4:14 - 4:17
    Poem 1: Reg flags the reason
    for pretty flags. / And ribbons.
  • 4:17 - 4:22
    And wearing material / Reasons
    for wearing material. / Give pleasure.
  • 4:22 - 4:26
    Poem 2: A wounded deer leaps
    highest, / I've heard the daffodil
  • 4:26 - 4:29
    I've heard the flag to-day /
    I've heard the hunter tell; /
  • 4:29 - 4:33
    'Tis but the ecstasy of death, /
    And then the brake is almost done ...
  • 4:33 - 4:35
    OK, time is up.
  • 4:35 - 4:38
    So hands up if you think Poem 1
    was written by a human.
  • 4:40 - 4:43
    Hands up if you think Poem 2
    was written by a human.
  • 4:43 - 4:45
    Whoa, that's a lot more people.
  • 4:46 - 4:49
    So you'd be surprised to find that Poem 1
  • 4:49 - 4:53
    was written by the very
    human poet Gertrude Stein.
  • 4:54 - 4:59
    And Poem 2 was generated
    by an algorithm called RKCP.
  • 4:59 - 5:02
    Now before we go on, let me describe
    very quickly and simply,
  • 5:03 - 5:04
    how RKCP works.
  • 5:05 - 5:09
    So RKCP is an algorithm
    designed by Ray Kurzweil,
  • 5:09 - 5:11
    who's a director of engineering at Google
  • 5:11 - 5:13
    and a firm believer
    in artificial intelligence.
  • 5:14 - 5:18
    So, you give RKCP a source text,
  • 5:18 - 5:22
    it analyzes the source text in order
    to find out how it uses language,
  • 5:22 - 5:24
    and then it regenerates language
  • 5:24 - 5:27
    that emulates that first text.
  • 5:27 - 5:29
    So in the poem we just saw before,
  • 5:29 - 5:32
    Poem 2, the one that you all
    thought was human,
  • 5:32 - 5:33
    it was fed a bunch of poems
  • 5:33 - 5:35
    by a poet called Emily Dickinson
  • 5:35 - 5:37
    and looked at the way she used language,
  • 5:37 - 5:39
    learned the model,
  • 5:39 - 5:43
    and then it regenerated a model
    according to that same structure.
  • 5:45 - 5:47
    But the important thing to know about RKCP
  • 5:47 - 5:50
    is that it doesn't know the meaning
    of the words it's using.
  • 5:50 - 5:53
    The language is just raw material,
  • 5:53 - 5:55
    it could be Chinese,
    it could be in Swedish,
  • 5:55 - 5:59
    it could be the collected language
    from your Facebook feed for one day.
  • 5:59 - 6:01
    It's just raw material.
  • 6:01 - 6:04
    And nevertheless, it's able
    to create a poem
  • 6:04 - 6:07
    that seems more human
    than Gertrude Stein's poem,
  • 6:07 - 6:10
    and Gertrude Stein is a human.
  • 6:11 - 6:15
    So what we've done here is,
    more or less, a reverse Turing test.
  • 6:16 - 6:21
    So Gertrude Stein, who's a human,
    is able to write a poem
  • 6:21 - 6:25
    that fools a majority
    of human judges into thinking
  • 6:25 - 6:27
    that it was written by a computer.
  • 6:27 - 6:31
    Therefore, according to the logic
    of the reverse Turing test,
  • 6:31 - 6:33
    Gertrude Stein is a computer.
  • 6:33 - 6:35
    (Laughter)
  • 6:35 - 6:37
    Feeling confused?
  • 6:37 - 6:39
    I think that's fair enough.
  • 6:40 - 6:44
    So far we've had humans
    that write like humans,
  • 6:44 - 6:47
    we have computers that write
    like computers,
  • 6:47 - 6:50
    we have computers that write like humans,
  • 6:50 - 6:54
    but we also have,
    perhaps most confusingly,
  • 6:54 - 6:56
    humans that write like computers.
  • 6:57 - 6:59
    So what do we take from all of this?
  • 7:00 - 7:03
    Do we take that William Blake
    is somehow more of a human
  • 7:03 - 7:04
    than Gertrude Stein?
  • 7:04 - 7:07
    Or that Gertrude Stein is more
    of a computer than William Blake?
  • 7:07 - 7:09
    (Laughter)
  • 7:09 - 7:11
    These are questions
    I've been asking myself
  • 7:11 - 7:13
    for around two years now,
  • 7:13 - 7:15
    and I don't have any answers.
  • 7:15 - 7:17
    But what I do have are a bunch of insights
  • 7:17 - 7:20
    about our relationship with technology.
  • 7:21 - 7:25
    So my first insight is that,
    for some reason,
  • 7:25 - 7:28
    we associate poetry with being human.
  • 7:28 - 7:32
    So that when we ask,
    "Can a computer write poetry?"
  • 7:32 - 7:33
    we're also asking,
  • 7:33 - 7:35
    "What does it mean to be human
  • 7:35 - 7:38
    and how do we put boundaries
    around this category?
  • 7:38 - 7:42
    How do we say who or what
    can be part of this category?"
  • 7:42 - 7:46
    This is an essentially
    philosophical question, I believe,
  • 7:46 - 7:48
    and it can't be answered
    with a yes or no test,
  • 7:48 - 7:49
    like the Turing test.
  • 7:50 - 7:53
    I also believe that Alan Turing
    understood this,
  • 7:53 - 7:56
    and that when he devised
    his test back in 1950,
  • 7:56 - 7:59
    he was doing it
    as a philosophical provocation.
  • 8:01 - 8:07
    So my second insight is that,
    when we take the Turing test for poetry,
  • 8:07 - 8:10
    we're not really testing
    the capacity of the computers
  • 8:10 - 8:13
    because poetry-generating algorithms,
  • 8:13 - 8:18
    they're pretty simple and have existed,
    more or less, since the 1950s.
  • 8:19 - 8:22
    What we are doing with the Turing
    test for poetry, rather,
  • 8:22 - 8:27
    is collecting opinions about what
    constitutes humanness.
  • 8:28 - 8:31
    So, what I've figured out,
  • 8:31 - 8:34
    we've seen this when earlier today,
  • 8:34 - 8:37
    we say that William Blake
    is more of a human
  • 8:37 - 8:38
    than Gertrude Stein.
  • 8:38 - 8:41
    Of course, this doesn't mean
    that William Blake
  • 8:41 - 8:42
    was actually more human
  • 8:42 - 8:45
    or that Gertrude Stein
    was more of a computer.
  • 8:46 - 8:50
    It simply means that the category
    of the human is unstable.
  • 8:51 - 8:54
    This has led me to understand
  • 8:54 - 8:56
    that the human is not a cold, hard fact.
  • 8:57 - 9:00
    Rather, it is something
    that's constructed with our opinions
  • 9:00 - 9:03
    and something that changes over time.
  • 9:05 - 9:09
    So my final insight is that
    the computer, more or less,
  • 9:09 - 9:13
    works like a mirror
    that reflects any idea of a human
  • 9:13 - 9:15
    that we show it.
  • 9:15 - 9:17
    We show it Emily Dickinson,
  • 9:17 - 9:19
    it gives Emily Dickinson back to us.
  • 9:20 - 9:22
    We show it William Blake,
  • 9:22 - 9:24
    that's what it reflects back to us.
  • 9:24 - 9:26
    We show it Gertrude Stein,
  • 9:26 - 9:28
    what we get back is Gertrude Stein.
  • 9:29 - 9:31
    More than any other bit of technology,
  • 9:31 - 9:37
    the computer is a mirror that reflects
    any idea of the human we teach it.
  • 9:38 - 9:40
    So I'm sure a lot of you have been hearing
  • 9:40 - 9:43
    a lot about artificial
    intelligence recently.
  • 9:45 - 9:48
    And much of the conversation is,
  • 9:48 - 9:49
    Can we build it?
  • 9:50 - 9:54
    Can we build an intelligent computer?
  • 9:54 - 9:56
    Can we build a creative computer?
  • 9:56 - 9:58
    What we seem to be asking over and over
  • 9:58 - 10:01
    is can we build a human-like computer?
  • 10:02 - 10:04
    But what we've seen just now
  • 10:04 - 10:07
    is that the human
    is not a scientific fact,
  • 10:07 - 10:10
    that it's an ever-shifting,
    concatenating idea
  • 10:10 - 10:13
    and one that changes over time.
  • 10:13 - 10:16
    So that when we begin
    to grapple with the ideas
  • 10:16 - 10:18
    of artificial intelligence in the future,
  • 10:18 - 10:20
    we shouldn't only be asking ourselves,
  • 10:20 - 10:22
    "Can we build it?"
  • 10:22 - 10:24
    But we should also be asking ourselves,
  • 10:24 - 10:27
    "What idea of the human
    do we want to have reflected back to us?"
  • 10:28 - 10:31
    This is an essentially philosophical idea,
  • 10:31 - 10:34
    and it's one that can't be answered
    with software alone,
  • 10:34 - 10:39
    but I think requires a moment
    of species-wide, existential reflection.
  • 10:39 - 10:40
    Thank you.
  • 10:40 - 10:43
    (Applause)
Title:
Can a computer write poetry?
Speaker:
Oscar Schwartz
Description:

more » « less
Video Language:
English
Team:
closed TED
Project:
TEDTalks
Duration:
10:56
  • Just a question:
    shouldn't the subtitles for the poems be written between square brackets since they are shown in slides and not spoken?

    Thank you!

  • A typo at 04:13 It should read "Red" instead of "Reg"

English subtitles

Revisions Compare revisions