Can a computer write poetry? | Oscar Schwartz

89,277 views ・ 2016-02-10

TED


請雙擊下方英文字幕播放視頻。

譯者: 易帆 余 審譯者: Tim Lan
00:12
I have a question.
0
12881
1230
我有一個問題,
00:15
Can a computer write poetry?
1
15422
1943
電腦可以寫詩嗎?
00:18
This is a provocative question.
2
18959
2077
這是個有爭議的問題。
00:21
You think about it for a minute,
3
21715
1718
你稍微想一下,
00:23
and you suddenly have a bunch of other questions like:
4
23457
2590
腦海裡突然就會浮現出 很多其他的問題:
00:26
What is a computer?
5
26769
1381
例如,甚麼是電腦?
00:28
What is poetry?
6
28710
1575
甚麼是詩?
00:30
What is creativity?
7
30707
1689
甚麼是創造力?
00:33
But these are questions
8
33650
1172
但這些問題,
00:34
that people spend their entire lifetime trying to answer,
9
34846
3070
很多人窮盡一生才能試著給出答案,
00:37
not in a single TED Talk.
10
37940
2224
單單一場TED演說並不能回答。
00:40
So we're going to have to try a different approach.
11
40188
2445
所以,我們必須用不一樣的方法,
00:42
So up here, we have two poems.
12
42657
2143
上面這裡有兩首詩,
00:45
One of them is written by a human,
13
45839
2276
其中一首是人類寫的,
00:48
and the other one's written by a computer.
14
48139
2102
另一首是電腦寫的。
00:50
I'm going to ask you to tell me which one's which.
15
50754
2410
我會讓各位來分辨哪首是誰寫的,
00:53
Have a go:
16
53858
1156
我們開始吧:
00:55
Poem 1: Little Fly / Thy summer's play, / My thoughtless hand / Has brush'd away.
17
55038
4056
1號詩:小蒼蠅,夏天的嘻戲, 我輕率的手,已揮走。
00:59
Am I not / A fly like thee? / Or art not thou / A man like me?
18
59118
3394
難道我,不是像你一樣的蒼蠅, 抑或妳,是像我一樣的人?
01:02
Poem 2: We can feel / Activist through your life's / morning /
19
62536
3299
2號詩:我們可以感受到, 激進派在妳每日生活的清晨出沒
01:05
Pauses to see, pope I hate the / Non all the night to start a / great otherwise (...)
20
65859
4247
暫且停下感受,那我憎惡的教皇 並非每晚都能開始,一個偉大的其他可能...
好的,時間到。
01:10
Alright, time's up.
21
70130
1359
01:11
Hands up if you think Poem 1 was written by a human.
22
71513
4096
認為1號詩是人寫的請舉手,
好的,你們大部分都是。
01:17
OK, most of you.
23
77547
1490
01:19
Hands up if you think Poem 2 was written by a human.
24
79061
3023
認為2號詩是人寫的請舉手,
你們很勇敢,
01:23
Very brave of you,
25
83172
1190
01:24
because the first one was written by the human poet William Blake.
26
84855
4285
因為第一首詩是由詩人William Blake所寫,
01:29
The second one was written by an algorithm
27
89784
2949
第二首詩是由一個演算法所寫出來的,
01:32
that took all the language from my Facebook feed on one day
28
92757
3692
這裡所有的文法是從我 臉書裡一天灌進去的,
01:36
and then regenerated it algorithmically,
29
96473
2763
然後,用演算法重新製作出來的,
01:39
according to methods that I'll describe a little bit later on.
30
99260
3590
關於方法我稍後會提到一些。
01:43
So let's try another test.
31
103218
2404
我們來做另一個測驗,
01:46
Again, you haven't got ages to read this,
32
106398
2093
我再次說明, 你不用花太多時間去讀它,
01:48
so just trust your gut.
33
108515
1612
所以,相信你的直覺。
01:50
Poem 1: A lion roars and a dog barks. It is interesting / and fascinating
34
110151
4045
1號詩:獅吼,狗吠, 鳥飛,卻不吼也不吠,這真迷人且有趣吶
01:54
that a bird will fly and not / roar or bark. Enthralling stories about animals
35
114220
4303
我夢裡有著關於動物的迷人故事
01:58
are in my dreams and I will sing them all if I / am not exhausted or weary.
36
118547
4060
如果我不筋疲力盡或疲憊不堪 我會為他們歌頌。
02:02
Poem 2: Oh! kangaroos, sequins, chocolate sodas! / You are really beautiful!
37
122631
3985
2號詩:喔!袋鼠、亮片、 巧克力蘇打!你們真漂亮!
02:06
Pearls, / harmonicas, jujubes, aspirins! All / the stuff they've always talked about (...)
38
126640
4358
珍珠、口琴、棗子、阿斯匹林! 全是他們一直提到的東西(...)
02:11
Alright, time's up.
39
131022
1158
好的,時間到。
02:12
So if you think the first poem was written by a human,
40
132204
3137
如果你認為第一首詩是人寫的,
02:15
put your hand up.
41
135365
1215
請舉手。
02:17
OK.
42
137687
1154
好的。
02:18
And if you think the second poem was written by a human,
43
138865
2675
如果你認為第二首詩是人寫的,
02:21
put your hand up.
44
141564
1155
請舉手。
02:23
We have, more or less, a 50/50 split here.
45
143779
3810
我們這裡大約是50/50比例,
這題比較難一點。
02:28
It was much harder.
46
148157
1436
02:29
The answer is,
47
149617
1712
答案是,
02:31
the first poem was generated by an algorithm called Racter,
48
151353
3483
第一首詩是一個名叫Racter的 電腦演算法
02:34
that was created back in the 1970s,
49
154860
3002
在1970年所創造的,
02:37
and the second poem was written by a guy called Frank O'Hara,
50
157886
3189
第二首詩是一位叫 Frank O'Hara的傢伙寫的,
02:41
who happens to be one of my favorite human poets.
51
161099
2668
他意外地成為我最喜歡 的“ 人類詩人”其中之一,
02:44
(Laughter)
52
164631
3058
(笑聲)
02:48
So what we've just done now is a Turing test for poetry.
53
168046
3228
所以,我們為這首詩 做了「圖靈測試」。
02:52
The Turing test was first proposed by this guy, Alan Turing, in 1950,
54
172018
4547
「圖靈測試」在1950年, 由Alan Turing做第一次發表,
02:56
in order to answer the question,
55
176589
1564
是為了回答一個問題:
02:58
can computers think?
56
178177
1637
「電腦會思考嗎?」
03:00
Alan Turing believed that if a computer was able
57
180245
2770
Alan Turing相信,如果電腦能夠
和人類進行一場流暢的以文字交流,
03:03
to have a to have a text-based conversation with a human,
58
183039
3078
結果讓人無法分辨
03:06
with such proficiency such that the human couldn't tell
59
186141
2770
03:08
whether they are talking to a computer or a human,
60
188935
2966
對方是人還是一台電腦,
03:11
then the computer can be said to have intelligence.
61
191925
2856
那麼這台電腦可以被稱呼為 擁有人工智慧。
03:15
So in 2013, my friend Benjamin Laird and I,
62
195270
3295
所以在2013年,我的朋友 Benjamin Laird和我,
03:18
we created a Turing test for poetry online.
63
198589
2988
我們創造了一個 詩的線上圖靈測試程式,
03:21
It's called bot or not,
64
201601
1277
叫做「bot or not」(是不是機器人),
03:22
and you can go and play it for yourselves.
65
202902
2044
你可以上線自己玩玩看。
03:24
But basically, it's the game we just played.
66
204970
2251
但基本上,它就是我們剛剛玩的遊戲,
03:27
You're presented with a poem,
67
207245
1528
你會看到一首詩,
03:28
you don't know whether it was written by a human or a computer
68
208797
3028
你不知道它是人寫的還是電腦寫的,
03:31
and you have to guess.
69
211849
1166
然後你必須猜一猜。
03:33
So thousands and thousands of people have taken this test online,
70
213039
3191
好幾千人已經在線上做測驗,
03:36
so we have results.
71
216254
1449
所以,我們有一個結論,
03:37
And what are the results?
72
217727
1428
那結論是甚麼呢?
03:39
Well, Turing said that if a computer could fool a human
73
219704
2879
Turing說如果電腦可以騙過30%的人,
03:42
30 percent of the time that it was a human,
74
222607
3019
那它就可以被當作人,
03:45
then it passes the Turing test for intelligence.
75
225650
2397
它就通過了圖靈測試。
03:48
We have poems on the bot or not database
76
228625
2438
我們在 bot or not 資料庫裡的詩集
03:51
that have fooled 65 percent of human readers into thinking
77
231087
2979
已經騙過65% 的人,
認為裡面的詩是人寫的。
03:54
it was written by a human.
78
234090
1395
03:55
So, I think we have an answer to our question.
79
235959
2817
所以,我認為我們的問題有答案了,
03:59
According to the logic of the Turing test,
80
239546
2348
根據圖靈測試的邏輯,
04:01
can a computer write poetry?
81
241918
1928
電腦可以寫詩嗎?
04:03
Well, yes, absolutely it can.
82
243870
2351
是的,它絕對可以。
04:07
But if you're feeling a little bit uncomfortable
83
247782
2346
但,如果你覺得對這答案 有點讓你不太舒服,
04:10
with this answer, that's OK.
84
250152
1927
也沒關係,
04:12
If you're having a bunch of gut reactions to it,
85
252103
2316
如果你花了很多時間與它互動,
04:14
that's also OK because this isn't the end of the story.
86
254443
3205
這也沒關係,因為這還沒完。
04:18
Let's play our third and final test.
87
258594
2324
我們來玩第三個 最後一個測驗,
我再說明一下,你們要讀完後,
04:22
Again, you're going to have to read
88
262000
1750
04:23
and tell me which you think is human.
89
263774
1909
告訴我哪一個是人寫的。
04:25
Poem 1: Red flags the reason for pretty flags. / And ribbons.
90
265707
3718
1號詩:紅旗之所以漂亮 除了紅色,還有緞帶
04:29
Ribbons of flags / And wearing material / Reasons for wearing material. (...)
91
269449
4321
旗上的緞帶及耐磨的材質 耐磨材料之所以(...)
04:33
Poem 2: A wounded deer leaps highest, / I've heard the daffodil
92
273794
3918
2號詩:受傷的鹿跳最高, 我聽見水仙在訴說,
04:37
I've heard the flag to-day / I've heard the hunter tell; /
93
277736
3446
我今天聽旗子說、 我聽到獵人說;
04:41
'Tis but the ecstasy of death, / And then the brake is almost done (...)
94
281206
3702
這是對死亡的狂喜, 而傷害幾乎已經造成(...)
04:44
OK, time is up.
95
284932
1599
好的,時間到。
04:46
So hands up if you think Poem 1 was written by a human.
96
286555
3837
認為1號詩是人寫的請舉手,
04:51
Hands up if you think Poem 2 was written by a human.
97
291973
3038
認為2號詩是人寫的請舉手,
04:55
Whoa, that's a lot more people.
98
295035
2331
哇!多很多人!
04:58
So you'd be surprised to find that Poem 1
99
298327
2968
你會很驚訝地發現,
05:01
was written by the very human poet Gertrude Stein.
100
301319
3993
1號詩由一位純正的人類詩人Gertrude Stein所寫的,
05:06
And Poem 2 was generated by an algorithm called RKCP.
101
306100
5038
而2號詩是一個叫 RKCP演算法所創造的,
05:11
Now before we go on, let me describe very quickly and simply,
102
311162
3319
在我們要繼續以前, 讓我簡單快速描述一下
05:14
how RKCP works.
103
314505
1781
RKCP是如何運作的。
05:16
So RKCP is an algorithm designed by Ray Kurzweil,
104
316873
3850
RKCP是Ray Kurzweil 所設計的演算法,
05:20
who's a director of engineering at Google
105
320747
2222
他是一位谷歌的工程師主管,
05:22
and a firm believer in artificial intelligence.
106
322993
2360
也是一位人工智慧的堅定支持者。
05:25
So, you give RKCP a source text,
107
325822
3991
那麼,你給 RKCP一個來源文字,
05:29
it analyzes the source text in order to find out how it uses language,
108
329837
4469
為了找出要如何使用這個語言, 它會分析來源文字,
05:34
and then it regenerates language
109
334330
1948
然後,它會重新創造一段話來模仿源文字。
05:36
that emulates that first text.
110
336302
2528
05:38
So in the poem we just saw before,
111
338854
2113
所以,我們剛剛看到的詩,
05:40
Poem 2, the one that you all thought was human,
112
340991
2625
你們認為是人類寫的2號詩,
05:43
it was fed a bunch of poems
113
343640
1550
它被灌入了很多一位名叫 Emily Dickinson詩人的詩,
05:45
by a poet called Emily Dickinson
114
345214
2035
05:47
it looked at the way she used language,
115
347273
2189
它取用了這位詩人的語言,
05:49
learned the model,
116
349486
1165
學習她的模式,
05:50
and then it regenerated a model according to that same structure.
117
350675
4258
然後它依據同樣的結構 重製一首詩出來。
但我們對RKCP最需要了解的是,
05:56
But the important thing to know about RKCP
118
356732
2178
05:58
is that it doesn't know the meaning of the words it's using.
119
358934
2838
它不明白它自己用的文字意義,
06:02
The language is just raw material,
120
362359
2276
語言只是它的原料,
06:04
it could be Chinese, it could be in Swedish,
121
364659
2160
它可以是中文,瑞典文,
06:06
it could be the collected language from your Facebook feed for one day.
122
366843
4179
它可以是你臉書上一天的文字。
06:11
It's just raw material.
123
371046
1652
它就只是個原料而已。
06:13
And nevertheless, it's able to create a poem
124
373380
2697
除此之外,它還有辦法寫一首
06:16
that seems more human than Gertrude Stein's poem,
125
376101
3327
比Gertrude Stein寫的還要更有人味的詩,
06:19
and Gertrude Stein is a human.
126
379452
2153
但Gertrude Stein才是人啊...
06:22
So what we've done here is, more or less, a reverse Turing test.
127
382846
4072
所以,我們剛剛做的 差不多就是,反向圖靈測試。
06:27
So Gertrude Stein, who's a human, is able to write a poem
128
387940
5179
所以Gertrude Stein這位人類,
可以寫出讓大部分人 誤認為是電腦寫出來的詩。
06:33
that fools a majority of human judges into thinking
129
393143
3738
06:36
that it was written by a computer.
130
396905
1826
06:39
Therefore, according to the logic of the reverse Turing test,
131
399176
4141
所以,根據圖靈測試的邏輯,
06:43
Gertrude Stein is a computer.
132
403341
1916
Gertrude Stein這人是個電腦...(笑聲)
06:45
(Laughter)
133
405281
1462
感覺很困惑嗎?
06:47
Feeling confused?
134
407358
1294
06:49
I think that's fair enough.
135
409193
1515
我認為這情有可原。
06:51
So far we've had humans that write like humans,
136
411546
4116
目前為止,我們有人可以寫出 像是人寫出的詩、
06:55
we have computers that write like computers,
137
415686
3111
我們有電腦可以寫出 像是電腦寫出的詩、
06:58
we have computers that write like humans,
138
418821
3055
我們有電腦可以寫出 像是人寫出的詩,
07:01
but we also have, perhaps most confusingly,
139
421900
3632
但我們同時也有會讓我們搞混 寫詩像電腦的人。
07:05
humans that write like computers.
140
425556
2375
07:08
So what do we take from all of this?
141
428938
1766
所以,我們從這裏面了解到甚麼呢?
07:11
Do we take that William Blake is somehow more of a human
142
431611
3157
我們會認為William Blake
比Gertrude Stein更像是個人嗎?
07:14
than Gertrude Stein?
143
434792
1249
07:16
Or that Gertrude Stein is more of a computer than William Blake?
144
436065
3046
或者Gertrude Stein比 William Blake更像是個電腦?
07:19
(Laughter)
145
439135
1552
(笑聲)
07:20
These are questions I've been asking myself
146
440711
2323
這兩年來,
我一直在問我自己,
07:23
for around two years now,
147
443058
1465
07:24
and I don't have any answers.
148
444547
2309
但我沒有任何答案,
07:26
But what I do have are a bunch of insights
149
446880
2330
但我真的有領悟到很多有關於
07:29
about our relationship with technology.
150
449234
2534
我們與科技的關係。
07:32
So my first insight is that, for some reason,
151
452999
3609
所以,我的第一個領悟是,
07:36
we associate poetry with being human.
152
456632
3111
為了一些原因,我們把 人與詩結合一起,
07:40
So that when we ask, "Can a computer write poetry?"
153
460197
3715
所以,當我們問,"電腦會寫詩嗎?"
07:43
we're also asking,
154
463936
1193
我們也在問,
07:45
"What does it mean to be human
155
465153
1798
人的定義是什麼?
07:46
and how do we put boundaries around this category?
156
466975
3172
我們要如何界定、分類呢?
07:50
How do we say who or what can be part of this category?"
157
470171
3658
我們要如何分辨誰或是東西 是歸於哪一類?"
07:54
This is an essentially philosophical question, I believe,
158
474376
3351
我相信,本質上這是一道哲學的問題,
07:57
and it can't be answered with a yes or no test,
159
477751
2229
而且,這不是像圖靈測試是個
08:00
like the Turing test.
160
480004
1327
對或錯的測試,
08:01
I also believe that Alan Turing understood this,
161
481805
3045
我也相信,
Alan Turing在1950年發明這個理論時, 也了解這一點,
08:04
and that when he devised his test back in 1950,
162
484874
3305
08:08
he was doing it as a philosophical provocation.
163
488203
2802
他當時引發了一個哲學上的爭議。
08:13
So my second insight is that, when we take the Turing test for poetry,
164
493124
5541
我的第二個領悟是, 當我們在為詩做圖靈測試時,
08:18
we're not really testing the capacity of the computers
165
498689
3460
我們並不是真的在測試電腦的能力,
08:22
because poetry-generating algorithms,
166
502173
2893
因為用演算法作詩相當簡單,
08:25
they're pretty simple and have existed, more or less, since the 1950s.
167
505090
4563
而且它們大約在1950年代 早就已經存在了。
我們現在為詩做的圖靈測試,
08:31
What we are doing with the Turing test for poetry, rather,
168
511055
3118
反而,比較像是在收集 甚麼是構成人性的條件。
08:34
is collecting opinions about what constitutes humanness.
169
514197
4615
08:40
So, what I've figured out,
170
520313
2729
所以,我發現,
08:43
we've seen this when earlier today,
171
523066
2972
稍早我們今天看到的,
08:46
we say that William Blake is more of a human
172
526062
2478
我們說William Blake
08:48
than Gertrude Stein.
173
528564
1565
比Gertrude Stein更像個人,
08:50
Of course, this doesn't mean that William Blake
174
530153
2462
當然,這不代表
08:52
was actually more human
175
532639
1828
William Blake比較有人性
08:54
or that Gertrude Stein was more of a computer.
176
534491
2327
或者Gertrude Stein比較像電腦。
08:57
It simply means that the category of the human is unstable.
177
537533
4714
這只能單純的說明, 對人類的界定是不穩定的。
09:03
This has led me to understand
178
543450
2074
這讓我明白了一件事,
09:05
that the human is not a cold, hard fact.
179
545548
2763
就是人性不是冷的、死板的事實,
09:08
Rather, it is something that's constructed with our opinions
180
548832
3132
反倒是一種由我們 的意見所構成的東西,
09:11
and something that changes over time.
181
551988
2855
而這個東西會隨著時間而改變。
09:16
So my final insight is that the computer, more or less,
182
556671
4479
所以我最後的領悟是,
電腦,或多或少只是
09:21
works like a mirror that reflects any idea of a human
183
561174
4006
一面反映我們輸入進去的人類思想的鏡子。
09:25
that we show it.
184
565204
1375
09:26
We show it Emily Dickinson,
185
566958
1884
我們向它展示Emily Dickinson,
09:28
it gives Emily Dickinson back to us.
186
568866
2321
它僅是模仿Emily Dickinson給我們,
09:31
We show it William Blake,
187
571768
1834
我們向它展示William Blake,
09:33
that's what it reflects back to us.
188
573626
2285
它就回應William Blake給我們的,
09:35
We show it Gertrude Stein,
189
575935
1839
我們向它展示Gertrude Stein,
09:37
what we get back is Gertrude Stein.
190
577798
2470
我們得到的回應僅是Gertrude Stein。
還有其他更多的科技也是,
09:41
More than any other bit of technology,
191
581083
2368
09:43
the computer is a mirror that reflects any idea of the human we teach it.
192
583475
5165
電腦只是我們教它甚麼 它就反應甚麼的一面鏡子。
所以,我確定你們大部分人都曾聽過
09:50
So I'm sure a lot of you have been hearing
193
590061
2287
09:52
a lot about artificial intelligence recently.
194
592372
2862
很多有關人工智慧的事情。
09:56
And much of the conversation is,
195
596694
2830
而大部分的對話就類似:
「我們該建造它嗎?」
10:00
can we build it?
196
600292
1189
10:02
Can we build an intelligent computer?
197
602383
3135
「我們可以建立一個智慧型電腦嗎?」
10:05
Can we build a creative computer?
198
605542
2763
「我們可以建立一個創造型電腦嗎?」
10:08
What we seem to be asking over and over
199
608329
2113
我們一次又一次的被問到,
10:10
is can we build a human-like computer?
200
610466
2724
我們可以建立一個 類似人類的電腦嗎?
10:13
But what we've seen just now
201
613961
1556
但就我們剛剛看到的,
10:15
is that the human is not a scientific fact,
202
615541
3088
人類不是一個科學事實,
10:18
that it's an ever-shifting, concatenating idea
203
618653
3530
人類是一個會不斷地變化、串聯想法、
10:22
and one that changes over time.
204
622207
2531
隨時間改變的物種。
10:24
So that when we begin to grapple with the ideas
205
624762
3152
所以,當我們開始要努力克服
10:27
of artificial intelligence in the future,
206
627938
2386
未來人工智慧的這個想法時,
10:30
we shouldn't only be asking ourselves,
207
630348
1905
我們不應該只問我們自己,
10:32
"Can we build it?"
208
632277
1368
「我們可以建造它嗎?」
10:33
But we should also be asking ourselves,
209
633669
1894
我們還得問我們自己,
10:35
"What idea of the human do we want to have reflected back to us?"
210
635587
3713
「我們希望可以得到甚麼樣的人性回應?」
10:39
This is an essentially philosophical idea,
211
639820
2693
這絕對是個哲學想法,
10:42
and it's one that can't be answered with software alone,
212
642537
2997
而且不是單靠軟體就可以回答出來的,
10:45
but I think requires a moment of species-wide, existential reflection.
213
645558
4977
但我認為,這需要一個各類物種 共存的反應時刻,
謝謝各位。
10:51
Thank you.
214
651040
1153
10:52
(Applause)
215
652217
2695
(掌聲)
關於本網站

本網站將向您介紹對學習英語有用的 YouTube 視頻。 您將看到來自世界各地的一流教師教授的英語課程。 雙擊每個視頻頁面上顯示的英文字幕,從那裡播放視頻。 字幕與視頻播放同步滾動。 如果您有任何意見或要求,請使用此聯繫表與我們聯繫。

https://forms.gle/WvT1wiN1qDtmnspy7