Roland Barthes was speaking metaphorically when he suggested in 1967 that “the birth of the reader must be ransomed by the death of the author”. But as artificial intelligence takes its first steps in fiction writing, it seems technology may one day start to make Barthes’ metaphor all too real.

AI is still some way off writing a coherent novel, as surreal experiments with Harry Potter show, but the future isn’t so far away in Hollywood. According to Nadira Azermai, whose company ScriptBook is developing a screenwriting AI: “Within five years we’ll have scripts written by AI that you would think are better than human writing.”

Will robots make doctors obsolete? Nothing could be further from the truth | Ranjana Srivastava Read more

Self-promotion aside, if there is the possibility of a decent screenplay from ScriptBook’s AI within five years, then a novel composed by machines can’t be far behind. But it’s hard to shake the impression that, even if such novels eventually turn out to be “better than human writing”, something would be lost.

Perhaps the feeling comes from an idea that would be anathema to Barthes: the idea of literature as communication.

If a book is “a heart that only beats in the chest of another”, as Rebecca Solnit suggests, then it seems two parties are required: someone to write and someone to read. So when AI writes fiction there seems to be a missing piece, a void at the heart of the text where meaning should reside.

Barthes would have none of this, of course, insisting that “it is language which speaks, not the author”. In terms which strikingly anticipate the workings of software currently at the cutting edge of artificial writing, such as OpenAI’s GPT-2, he argues that a text is not a “line of words … releasing a single … meaning (the ‘message’ of the Author-God)”, but instead a “tissue of citations, resulting from the thousand sources of culture”. “The writer can only imitate a gesture forever anterior, never original,” Barthes continues. “If he wants to express himself … the internal ‘thing’ he claims to ‘translate’ is itself only a readymade dictionary whose words can be explained (defined) only by other words, and so on ad infinitum.”

And he must be on to something. Imagine yourself, some years in the future, pulling a novel by an unknown author off the shelves and finding that it is really good. Would you be any less moved by the story if you were then told it had been produced using groundbreaking AI? If all you had were the words in front of you on the page, how would you even know? Those who scoff at the idea that AI could ever pass this literary Turing test haven’t been paying attention for the past 50 years. Computers can now drive cars, recognise faces, translate between languages, fill in as your personal assistant, even beat the world champion at Go – achievements that are often dismissed as “just computation” even though an expert of the 1970s would have classed any one of them as a signature ability of human intelligence.

Should publishers decide the future of literature is written in code, there may still be some hope for authors. A shift to AI-generated novels could only ever be a short-term strategy. As Barthes intuited and OpenAI’s latest algorithm demonstrates, it’s certainly possible to assemble writing from other writing. But even if this patchwork prose becomes “better than human writing”, it would be only drawing on a finite well of inspiration. Train your AI on the sum total of human literature thus far and all you’ll get is a mass of references: “a gesture forever anterior, never original”. No one who witnessed the phenomenon that was the Fifty Shades of Grey series could doubt that imitation can be lucrative for a while. But when even an imitator as skilful or as lucky as EL James finds her sales on a downward curve it’s clear that no matter how feisty your stallion at first appears, flogging it will only get you so far.

Barthes’ belief in the primacy of the word, his dogged insistence that “life can only imitate the book”, leaves his recipe for literature missing a vital ingredient: the individual experience that any human writer facing the blank page cannot avoid. Without the raw input of the complicated business that is life, even the most talented AI can only rearrange the books it ingested in its training – enough for a few good years in publishing, perhaps, but hardly a sustainable model for literary culture.

Maybe I’m thinking too small. Maybe any publisher looking forward to the death of the author would only need to expand the training programme for their writing machines. Perhaps they could hook their AIs up to the daily news, wire them into Spotify, encourage them to make new friends on Twitter – and feed it all back into the work. The resulting algorithms would be very different to human beings, of course. But perhaps they would be enough like thinking, feeling beings that their fiction would be communicating something rather marvellous after all.

• Richard Lea writes for Guardian books