首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

科罗拉多州科学家用AI编写圣诞颂歌,结果令人笑出了眼泪

科技行者报道

来源:Aiweirdness.com

编译:科技行者

Elon Musk担心人工智能可能最终给人类带来末日。但值得庆幸的是,目前看来情况还远没那么糟糕。

科罗拉多州的研究科学家Janelle Shane已经训练出一套神经网络(一种机器学习算法),希望由其自行编写圣诞颂歌——至于结果,很有意思。

Shane训练的算法模仿了《伦敦时报》所归纳的240首流行圣诞颂歌。AI通过不断尝试写出新的颂歌,同时将其与数据集中的颂歌者准确性比较,如此往复修改循环即完成了其自我训练过程。

由于既不知道什么叫编写,也不清楚任何与英语相关知识,因此,神经网络开始只能通过对一系列随机规则进行猜测的方式进行学习与测试。如预期一样,其刚开始编写出的内容简直就是一团乱麻:

a a a na snn aca naa i s a i aa a a n a uugna nn na i a uaa a a i a a a a a sna aagt o aa

不过神经网络与人类一样,都会在训练当中不断提升自己的智能水平。通过与数据库中的真实歌曲进行比较,它慢慢调整自身规则,最终Shane发现它了解到了一首歌的基本结构:在每一行的开头对首字母进行大写,根据意群进行分行,最后是琢磨合适的选词。

Shane解释称,首先它发现了最常用的词语:

Hart fon the be the he br wong on the stor

Christmas br he, or the wang

Christ, Christ, on bn a me the stord

Hont on thr st bong the wor I he a s de poog the stow tome on be ser snur

谷歌翻译如下:

哈特从来没有这样做过

圣诞节他或者王先生

基督,基督,在我身上

我不知道他是怎么回事

不过在经过反复训练之后,其终于能够生成整行歌词了——但平心而论,结果仍然非常糟糕。

以下是Shane所撰写的原文:

圣诞颂歌,神经网络作词

神经网络是一种计算机程序,能够模仿大脑的运作方式学习如何解决问题。其被广泛应用于人脸识别、自动驾驶车辆、语言翻译、财务决策等领域。不过我个人主要利用其编写笑话。

我的实现过程从数据集开始——因为神经网络必须首先弄清如何进行模仿。不太公平的一点在于,我并没有给出其编写内容的任何具体提示,例如其到底是在编写笑话、设计万圣节服装抑或是撰写小说。其甚至没有内置任何与英语相关的知识。对于圣诞颂歌而言,这样的起点缺少任何线索,但这也正是本周实验内容的有趣之处。

《伦敦时报》与读者/神经网络爱好者Erik Svensson共同收集了大约240首古老与现代的圣诞颂歌曲目。

当神经网络刚开始学习时,其遵循一组随机规则,即学习如何将一个个独立的字母拼凑为圣诞颂歌。由于存在极高的随机性,且规则过于灵活,因此当神经网络试图进行创作时,其成果可谓一团糟:

a a a na snn aca naa i s a i aa a a n a uugna nn na i a uaa a a i a a a a a sna aagt o aa

但其能够检查数据库当中真实歌曲内包含的规则,而后据此对创作内容进行微调,从而略略提升其质量。通过学习,神经网络学会对每行第一个单词进行大写,并不包含应多久进行一次换行……此后,它还很快学会了使用真实存在的单词——尽管起初它只能使用最基础的词汇。

Hart fon the be the he br wong on the stor Christmas br he, or the wang

Christ, Christ, on bn a me the stord

Hont on thr st bong the wor

I he a s de poog the stow tome on be ser snur

在投入更多时间完善其规则之后,神经网络的创作成果终于有了一点节日氛围。

现在,神经网络能够更轻松地选取正确的语气与词汇,但在内容上仍然难以理解。因此,最终的圣诞颂歌作品虽然仍没有什么连续的含义,但神经网络至少能够写出多行内容,而且听起来确实有点欢乐的感觉。

The cattle around the Christmas will be

A very special Christmas with me

Hurry Christmas to you

Cup on the earth!

Still the loudly candlelight

Would praise His name.

The babe, the Son of Mary.

He sumbled their flowers and all.

The lord of the glory dawns

Give us the leave all away

A star is spent and red

Shake a cup a strend from the sky

Christmas is coming, the wind is come to you

Walkin’ him love, Dingle bells, jingle bells, jingle bells with bells are ringing

With a heart reindeer

But no more a stranger.

Santa baby, and Dancer, and Curry down

Happy Holiday

When the snowflakes will call the world wakes to bring

Glory bears and asses the air the angels sang

And Christmas tree

谷歌翻译如下:

圣诞节前后的牛群将会

是一个非常特别的圣诞节与我

赶快圣诞节给你

地球上的杯子

仍然是大声的烛光

会赞美他的名字。

宝贝,玛丽的儿子。

他把他们的花和所有的东西都给了他。

荣耀之主的黎明

给我们所有的离开

一颗星星花了,红色

从天空摇一杯

圣诞节快到了,风来到你身边

走着他的爱,丁格尔的钟声,叮当声的钟声,铃儿响叮当响

用心驯鹿

但不再是一个陌生人。

圣诞宝贝,舞者,咖喱

节日快乐

当雪花叫世界唤醒带来

荣耀熊和驴天使唱歌的空气

和圣诞树

(输入数据当中没有curry与dingle等词汇,这时神经网络倾向于自造与颂歌氛围相符的单词。)

但神经网络也创作出了一些带有忧郁气质的颂歌作品。

The fire is sleeping.

And crying,

Love love

What a King

Let’s take the little children of the grave!

谷歌翻译如下:

火正在睡觉。

和哭泣,

爱啊爱

什么国王

让我们带走坟墓的小孩子吧!

出于某种原因,尽管数据集中仅提到过一次Sandman,但神经网络特别喜欢在圣诞颂歌中对其加以引用。另外,神经网络有时候会坚持使用一些我无法理解的特定词语。也许神经网络特别偏爱Neil Gaiman的作品吧。

The sandman so be joyful now it was born today!

Gloria in excelsis Deo.

The sandman bright before Him.

The holly bears a berry bears

And star in the snow is born today!

The sandman so love to seek the world

The sandman so love so deep and sing and the sun

谷歌翻译如下:

现在这个Sandman是快乐的!

Gloria in excelsis Deo。

在他面前的Sandman光明。

冬青熊浆果熊

雪中的星星今天诞生了!

Sandman如此热爱寻求世界

Sandman如此深爱歌唱和太阳

下面来看我个人比较满意的一首:

The world and joy of the sleigh

Santa baby bore sweet Jesus Christ

The holly bears a berry,

And all the reindeer of the sky

The holly bears a berry and reindeer

He was born today!

And Santa baby bore sweet Jesus Christ,

And the chimney the angels sing.

When the snowman brings the snow

Christmas tree

Let’s take that road before

And Santa Claus comes tonight

He will bring us goodness and light

Santa baby, a blitzen,

And he was the sun and reindeer and earth. The Saviour of the chimney tonight

The story of the chimney see

Santa baby, and blood and joyous so world and joy and good will to see

Santa baby bore sweet Jesus Christ

Fa la la la la la la, la la la la la la la la.

King of toys and hippopotamuses [sic] full of the light of that stood at the dear Son of Santa Claus

He was born in a wonderful christmas tree

Run, run Rudolph, run, run Rudolph, run, run Rudolph, run, run Rudolph, run, run Rudolph, run, run Rudolph, run, run Rudolph, run, run Rudolf the new born King.

谷歌翻译如下:

雪橇的世界和欢乐

圣诞老人宝贝的甜蜜耶稣基督

冬青熊浆果, 还有天空的驯鹿

冬青熊浆果和驯鹿

他今天出生!

而圣诞老人的宝贝,又甜又甜,

天使们唱歌的烟囱。

当雪人带来雪时

圣诞树

我们之前走这条路吧

圣诞老人今晚来了

他会带给我们善良与光明

圣诞宝贝,一个blitzen,

他是太阳和驯鹿和地球。今晚烟囱的救主

烟囱的故事见

圣诞老人宝宝,血与欢乐如此的世界,欢乐与美好的愿望将会见证

圣诞老人宝贝的甜蜜耶稣基督

Fa la la la la la la la,la la la la la la la la。

玩具和河马之王[原文如此]充满了圣诞老人亲爱的儿子的光芒 他出生在一个美妙的圣诞树

奔跑,奔跑鲁道夫,奔跑,奔跑鲁道夫,奔跑,奔跑鲁道夫,奔跑,奔跑鲁道夫,奔跑,奔跑鲁道夫,奔跑,奔跑鲁道夫,奔跑,奔跑鲁道夫,奔跑,奔跑鲁道夫新出生的国王。

笑出了眼泪。

-END-

  • 发表于:
  • 原文链接http://kuaibao.qq.com/s/20171228G0CBWZ00?refer=cp_1026
  • 腾讯「腾讯云开发者社区」是腾讯内容开放平台帐号(企鹅号)传播渠道之一,根据《腾讯内容开放平台服务协议》转载发布内容。
  • 如有侵权,请联系 cloudcommunity@tencent.com 删除。

扫码

添加站长 进交流群

领取专属 10元无门槛券

私享最新 技术干货

扫码加入开发者社群
领券