Once upon a time, there was a robot… BSIP/Getty

“It has been two weeks, and the last of my kind has gone.” As opening lines to a story about alien abduction go, it isn’t bad. It is even more impressive when you realise the writer isn’t human, but a newly developed artificial intelligence.

Getting machines to create stories is hard. At a minimum, a good yarn must have a plausible sequence of events that lead you from the beginning to the end. Yet maintaining coherence over multiple sentences is something that existing text-generation systems struggle with. …