Technology · 14 min read

Robot Pavlovich Chekhov: Arti­ficial Intel­ligence as a Writer

“There is nothing to writing. All you do is sit down at a typewriter and bleed,” said Hemingway. Can we teach artificial intelligence to create gripping literature, and how will the cultural world change if we do? Here are the most exciting projects and the arguments of the two extremes: that the robot writer will become reality, or that algorithms will never reach the human emotion of a text.

Translated from the Bulgarian original →

“There is nothing to writing. All you do is sit down at a typewriter and bleed.” The words are quite popular. They belong to Hemingway, who filled them with meaning throughout his whole life. They are romantic, beautiful, but they hardly exhaust every form of fiction. Who are the writers and poets who succeed in the ever fiercer battle on the literary field? Is it those who were sincere, emotional, who created the finest literature? Or rather the others, who found the right audience at the right moment and caught, by accident or by design, whatever was in demand. The zeitgeist.

Will one of the most successful authors soon turn out to be… some artificial intelligence?

Robot Burns

It does not bleed to write, it cannot, because it is made not of flesh and blood but of bits and bytes. Artificial intelligence is talked about in more and more professions, but at this stage you would hardly picture it in the role of your favorite writer.

And perhaps you should. Because what does your favorite writer do? They create a literary text that can sweep you away and move you.

With topics like these it is very easy to let your imagination off the leash and wander into predictions that cross the border of fantasy. In this case, though, we seem to have good enough reasons to believe that artificial intelligence can handle the hard task of creating a literary text indistinguishable from a human one. And in the quite foreseeable future, too. Beyond that—yes, we really can move into the realm of imagination, because it will drastically change literature and our attitude toward it.

James Hadley Interface

At Digital Stories we often look for different roles for algorithms. We have wondered whether they can create art in general, and we have cast them as journalists, politicians, programmers.

You may have noticed how seriously machine translation has improved in recent years. Especially for some of the more popular languages, the output of Google Translate now conveys the input quite closely, if not precisely. Only a few years ago this was not the case at all; translations were more like mechanically glued-together, clumsy-sounding strings of words rendered in the most literal way.

The progress is owed to a field of artificial intelligence and linguistics that has made particular noise in recent years. Popularly known by the abbreviation NLP (Natural Language Processing), it harnesses algorithms to understand how a given human language “works.” And, based on that analysis, to offer their suggestions depending on the task they have been set. To try to put commas in the right place, to translate. Or to generate text themselves.

A robot writer
Photo: Riccardo Annandale, Unsplash

Machine King

To get fully into the technological side of the subject, we have to mention one more abbreviation: GPT-3. This is the project that abruptly changed things as far as natural language processing goes. It is developed by OpenAI, a nonprofit organization working on artificial intelligence. It was founded in 2015 by Elon Musk and like-minded people who together donated over a billion dollars. It is one of the two big players in the field, alongside Google's DeepMind.

GPT-3 was unveiled in 2020. It is a platform with a convenient interface through which various projects submit their tasks and receive answers. “Under the hood” sits a neural network—software capable of learning and finding patterns by processing huge volumes of information. GPT-3 surpasses even the boldest dreams of a few years ago, working with as many as 175 billion parameters. In the language of neural networks, this means that this is how many units of information the artificial intelligence used to learn “to think.” It “read” 570 gigabytes of carefully selected text to “learn” human language.

GPT-3 became a sensation because it turned out to be really good at its job. An artificial intelligence you can talk to (almost) like a person, to which you can set all kinds of tasks. And it, being a form of NLP, performs its one and only function: it takes input parameters and returns a text result.

Franz Circuitka

So what happens if we ask it to write a story in the name of a favorite writer? In essence, all of the author's works will pass through the neural network, and it will take into account everything else we have set as conditions. It will try to imitate the style and return the text it considers best after comparing it with the original data. Will it succeed? Be a little patient, we will run our own experiment very soon.

In the same way neural networks are making their way into journalism. A large share of the short news items, even at the biggest names in the business, are already generated automatically. There is simply no longer any need for someone to waste their time announcing that the match ended 1–0. Gradually they are being given more and more rights.

But let us get back to literature. Because, after all, that is where the magic of every art lies. That is where creativity lives, the thing that complements the skill of producing a well-structured text that fulfills its basic purpose.

A robot writer
Photo: Aaron Burden, Unsplash

Compuki Murakami

“The Day a Computer Writes a Novel.” That is the title of a story “written” back in 2016, whose main plot revolves around a robot that abandons its duties to humanity after suddenly discovering it has a literary talent. You have already guessed that it was not written by a science fiction author with a weakness for themes that have grown banal, but by an artificial intelligence.

At least in part. The Japanese scientists from Future University Hakodate fed their neural network the broadest strokes of the plot and of the protagonist. Truth be told, they also added a fairly detailed set of words, phrases and even whole sentences for their offspring to assemble the story from. And yet they claim they did not act as editors. They submitted the result returned by the algorithm, one to one, to one of the most hotly contested short story competitions in Japan.

Quite a few teams had tried to do this before, but “The Day…” went down in history as the first algorithm-generated story to make it to the second round of the competition. “The protagonist didn't develop much in the story, but the text was well structured,” said Satoshi Hase, a writer on the jury.

Over the following years there were 11 more attempts to enter a fully artificially generated text into the same competition, and all of them failed. The humans won.

Of course, failed attempts in this direction are not few. In 2017 Ross Goodwin, a journalist and technology enthusiast, built his own neural network and set off with it “On the Road” after Kerouac. He passed through the same places and fed what he saw and heard into the algorithm, which had “read” everything by the famous author it was trying to imitate. Except that, in the words of readers, the result sounded like Alice in Wonderland meeting Google Street View, as narrated by Siri. Not like Kerouac.

A writer
Photo: Yerson Retamal, Pixabay

A.I. Petrov

This is the moment to recall that in every game, at first, algorithms barely put up a fight. Then things quickly began to change. Kasparov lost the first landmark battle in chess, and a few years later we turned out to be weaker in all the other exotic logic contests too. Artificial intelligence now beats us even at games whose rules it does not know but learns on the go. There is no logic competition left in which algorithms still yield to humans.

Yes, but literature is not a logic contest, it is an art. There should always be the human element there, creativity, the spark of inspiration. And still it is worth setting this point of view aside for a moment, if only to put it to doubt, so that we can prove it impartially.

A truly good writer has not only the creative spark but also a very rich culture, vocabulary, a skill for arranging words. For building characters and plot out of experience and talent. Which of all this could not be captured by a sufficiently complex algorithm?

As with logic games, it is only fair to start the contest with the easier part. For now algorithms definitely do better in the world of poetry. In free verse especially, there simply are no rules. You do not need precisely structured sentences or sequence there. Shorter texts, the license poets receive from philologists to ignore the rules, even of spelling… let's just say it plainly, make it easier to disguise the mistakes of artificial intelligence.

If you dig a little into the modern trends of online poetry, you will very quickly see that in their search for originality even talented people of flesh and blood start to sound like robots. We could easily put together a quick online quiz to convince you that there is no way to tell artificially generated poetry from the naturally awkward kind.

A book
Photo: Anastasia Zhenina, Unsplash

Robot Bosilek

“For me Bulgaria is like glimpsing a strange sound!
With thoughts filled by the sea and by the stars of the Sun.”

This poet may not be among the most gifted, but he would stand a chance of triumphing in quite a few poetry contests. Yes, these are lines generated by an algorithm. This was the response to the keyword “Bulgaria” in Poem Portraits, a project backed by Google. Behind it, according to its creators, is a neural network trained on 20 million lines of 19th-century English poetry.

Well, perhaps the shiny facade leads the way here, because even after entering the same word several times, the result did not change. Yes, it is very easy to hide behind the fashionable phrases “neural network” and “artificial intelligence”, and since they really are overhyped, it is hard to separate the wheat from the chaff.

But successful attempts are multiplying. In China a poetry collection called Sunshine Misses Windows was published. The algorithm behind it generated over 10,000 poems, of which 139 were chosen. And indeed—the sonnet is a classical form with clear boundaries, which sounds far easier to create artificially. It is clear what rhymes and rhythm are wanted. The neural network mostly has to try and try again. And in this kind of system there is almost always a second process at work, which here is even more important—analyzing how convincingly each result meets the preset requirements, so that only the best come out at the end of the tunnel.

The Verse by Verse project
The Verse by Verse project

Edgar Allan Bot

And now it is time for a somewhat more telling experiment. Verse by Verse is another Google project, where anyone can test the power of artificial intelligence at generating poetry.

This one, however, is far more polished. Unfortunately, like most such projects, it is aimed only at the English-speaking world. The idea is this: you enter a first line and choose up to three of the poets on the list whose work has been “fed” to the neural network. The names of Edgar Allan Poe, Emily Dickinson and Walt Whitman stand out. Then you specify the verse form you are after, and the results start coming in. Each of the poets “offers” you several options for how the line might continue. You can choose, change, experiment.

With Bulgarian classics, for instance. What happens if we enter the opening lines of some of the best-known poems by Bulgarian authors in their official English translation? We then present them here, with all the caveats of an imperfect translation back into Bulgarian. The translation is not poetic, because what interests us is what the artificial intelligence gives us in terms of meaning—we are not looking for the rhythm and rhymes, which are otherwise carefully chosen. Here are two examples.

“He is alive, alive! There on the Balkan,
his eyes fixed on the sky of the yellow West.
Would he rejoice at the spring,
would he give an hour to infinity…”

“Spring of mine, my white spring,
for every little bird that gave me its trust.
Sometimes in bliss I will not sense
how I might keep my tremors too.”

A robot writer
Photo: Fallon Michael, Unsplash

Cyborg Whitman

Let's say we now know what would have happened if Whitman and Nikola Vaptsarov, the Bulgarian poet executed in 1942, had sat down for coffee in the mountain town of Bansko or on Long Island to write a little together. Again with the caveat that in English both the rhythm and the rhyme are there.

And what if your favorite writer were alive and able to write? What if García Márquez were not only still here, but at the height of his creative powers? Wouldn't today's literature, already hit hard by modern technology, be completely devalued if we had authors who can write wonderful texts at a speed of millions of pages per second?

That is the great change that will come if artificial intelligence succeeds in this venture. If the contest ends in its favor, as happened with chess and all the other games. We will have software that is not constrained by our simple human limits, that needs no sleep, that runs no risk of drinking itself into ruin. There will be no danger of it falling into a creative hole and spending 10 years unable to finish the next book of an important series, as George R. R. Martin does. In a word, it will not bleed…

Such topics are worth thinking about more, especially if we track how quickly our rival in the contest is advancing. What will happen then to human writers? How will we tell their work apart? Who will hold the copyright for the new books: the algorithms, or their creators? Will anyone be left to read at all?

Of course, there is also a hybrid option. Human chess competitions go on, if on a declining curve (does anyone know who the current world champion is?). But why shouldn't our friend, artificial intelligence, replace the so-called ghostwriters? Many of today's most famous writers do not actually write all that much; they simply come up with ideas that are then written out by their lesser-known colleagues, sometimes credited, sometimes left in the shadows. Isn't this an option in which human creativity and computer stamina could complement each other?

Poetry
Photo: Ksenia Makagonova, Unsplash

Elisaveta Programa

We return once more to GPT-3. Once the platform appeared, all kinds of experiments began with it. People even had it write computer code, and it became quite clear that programmers, too, have no reason to feel overly secure about their careers.

Its real success, however, came when it was given the chance to create long texts and to engage in discussion. Naturally, one of the first challenges was literature, and in the harder version of the contest at that: prose.

The Guardian gave the algorithm a chance to write a piece reassuring people about their future alongside advanced artificial intelligence. The result was quite convincing. “My brain is boiling with ideas!” GPT-3 boldly exclaimed in a text that flows logically and coherently.

The artist and programmer Mario Klingemann, who likes to challenge the creativity of algorithms, set GPT-3 the task of writing a text titled “The Importance of Being on Twitter” in the tradition of Jerome K. Jerome. And the result turned out pretty decent; you can find it here.

A typewriter
Photo: 15299, Pixabay

Algorithm Sergeyevich Pushkin

Yes, there are still imperfections, but the progress is quite serious. Skepticism is healthy, but there was skepticism in so many other fields too, where we never imagined we could be replaced by electronic creations.

It is time to think not so much about whether machines will soon be able to create literature, but about when it will happen and whether we will be prepared. What are we willing to delegate to them?

Because generating meaningful text on assignment is the first, biggest and hardest step, but after that it would be no problem at all for algorithms to learn what we like. Here they are already good enough. Online search and social networks both rest on their skill at pleasing us. Then logically comes the moment when artificial intelligence will be able not only to generate text in the style it has been given, but to produce exactly the one that is wanted, the one that satisfies from every angle.

Will we be able to tell the difference then? If the book is gripping and the style exquisite. Will we even care, or will we at least forgive the author for not being able, like Hemingway, to sit and bleed while writing…

This piece was published in InGlobo magazine

Last updated: October 10, 2021

A robot writer
Photo: Andrea De Santis, Unsplash
Almost there…
If you liked the story, support the project. The site has no ads.
Support

Next story

All stories →