[Guardian News & Media Ltd] - After its attempts to digest romance novels, one of Google’s artificial intelligence projects is now accidentally writing poetry, some of which would make the fictional Vogons proud.

there is no one else in the world.
there is no one else in sight.
they were the only ones who mattered.
they were the only ones left.
he had to be with me. she had to be with him.
i had to do this. i wanted to kill him.
i started to cry.
i turned to him.

Google is working with Stanford University and University of Massachusetts in the US to enhance the natural language skills of an AI technique called recurrent neural network language model (RNNLM), which is used within machine translation and image captioning among other tasks. It essentially builds sentences a single word at a time by analysing the previous words in that sentence.

Currently, RNNLM is not capable of implementing global themes or features, such as a set topic, within its sentence generation. Each sentence produced by the algorithms doesn’t necessarily flow smoothly into the next. The work, published as a paper through Cornell University’s open scientific paper archive, arXiv, details the researcher’s efforts to add the ability to apply a global theme to sentence generation using a system called a variational autoencoder and the results, including what could easily be mistaken for poetry.

Some of it would arguably give Douglas Adams a run for his money, as the creator of the Vogons, the Hitchhiker’s Guide to the Galaxy and its Ode to a Small Lump of Green Putty I Found in My Armpit One Midsummer Morning, during a recital of which “four of the audience members died of internal haemorrhaging and the president of the Mid-Galactic Arts Nobbling Council survived only by gnawing one of his own legs off”, according to the book.

The researchers fed the system starting and ending sentences and then asked it to fill in the gap. Below, the bolded text is what the researchers gave the algorithm and the text in between is what it produced. The results are generated by the machine based on what it learnt from thousands of romance novels, which made some of the topics “rather dramatic”, according to the authors of the paper.

he was silent for a long moment.
he was silent for a moment.
it was quiet for a moment.
it was dark and cold.
there was a pause.
it was my turn.

The generated sentences make grammatical sense, maintain a sort of theme and for the most part fit with the start and end sentence. Others weren’t quite as poetic, but still maintain the theme set by the start and ending sentences.

no. he said.
“no,” he said.
“no,” i said.
i know,” she said.
“thank you,” she said.
“come with me,” she said.
“talk to me,” she said.
“don’t worry about it,” she said.

The results show interesting improvements in the ability of the machine to generate sentences that make sense together, which could led to much more human-like interactions with AI chatbots, perhaps even Google’s Now.