Experiments in style: Computer-generated version
Does story creation require a human being?
Is a computer-generated story as good as a human-created one? In this post I refer to Italo Calvino and Jonathan Swift, and then generate a couple of versions of my original story using a bespoke computer program.
Greetings!
One of the things I’ve been trying out is reworking a piece of text into a completely different style. A full exposition and explanation are given here:
For today’s experiment I’ve produced two versions of the story using a computer program based on my original.
First, though, here is the original text on which these experiments or transformations are based:
The original (template) text
In the middle of the night, I woke up (if you can call being semi-conscious being awake), walked purposefully towards the door to go to the bathroom — and almost knocked myself out.
The reason was that in the twin states of entire darkness and semi-somnambulance I was facing in a different direction from the one I thought I was facing. As a result, instead of walking through the door, I tried to walk through the wall.
The next few days brought nausea and headaches. After much prevarication I went to Accident and Emergency, where I waited petrified among people for whom “social distancing” means not quite touching you, and who wore their masks as a chin-warmer.
An hour and a half later I emerged into the twilight, secure in the knowledge that I had nothing more serious than mild concussion. I failed to do much writing, but I was pleased to have read a further 17% of my book.
The program code version
The writer Italo Calvino believed that a computer could create stories:
Once you think of a story merely as an assemblage of discreet elements, combined according to logical rules existing outside the author, [Calvino] realised, then literature becomes like mathematics. And this means that, in theory, ‘electronic brain’ – that is, computers – should be able to write literature just as well as human beings. Indeed, given that they can sort through possible combinations much more efficiently than us, they might be even better. So why would there be any need for authors in the future?
From Calvino and the machines1.
Jonathan Swift, much earlier, had a similar idea. Jonathan Swift’s description of a writing machine occurs in Gulliver’s Travels, Book III, Chapter 5, where he details an elaborate device called “The Engine” at the Academy of Projectors in Lagado. This fictional contraption is essentially designed to automate the production of books by mechanically combining words into sentences. Here is a key portion of Swift’s description:
The first professor I saw, was in a very large room, with forty pupils about him. After salutation, observing me to look earnestly upon a frame, which took up the greatest part of both the length and breadth of the room, he said, “Perhaps I might wonder to see him employed in a project for improving speculative knowledge, by practical and mechanical operations…”
He then led me to the frame, about the sides, whereof all his pupils stood in ranks. It was twenty feet square, placed in the middle of the room. The superfices was composed of several bits of wood, about the bigness of a die, but some larger than others. They were all linked together by slender wires….
These bits of wood were covered, on every square, with paper pasted on them; and on these papers were written all the words of their language, in their several moods, tenses, and declensions; but without any order. The professor then desired me “to observe; for he was going to set his engine at work.”
The pupils, at his command, took each of them hold of an iron handle, whereof there were forty fixed round the edges of the frame; and giving them a sudden turn, the whole disposition of the words was entirely changed. He then commanded six-and-thirty of the lads, to read the several lines softly, as they appeared upon the frame; and where they found three or four words together that might make part of a sentence, they dictated to the four remaining boys, who were scribes….
This work was repeated three or four times, and at every turn, the engine was so contrived, that the words shifted into new places, as the square bits of wood moved upside down….
Swift’s invention was designed so that, through random permutations and brute labour, even the “most ignorant person” could produce volumes of philosophy, poetry, politics, and more, “without the least assistance from genius or study.” The satirical intent is to mock the mechanization of learning, but Swift’s description anticipates both combinatorial writing techniques and concepts found in later computational creativity.
For today’s experiment I instructed an AI app to create pseudo code that would result in my original story, or one like it, being generated. (Pseudo code is a computer program written in everyday language to make it easily understandable. It can be transformed into a computer program by using the technical language of the preferred program.)
I then asked the AI to use the program it had created to generate a new version of the story. Here’s what it produced:
Just before dawn, I woke up (if you can call being groggy being awake), walked purposefully towards the kitchen — and almost knocked myself out.
The reason was that in the twin states of entire darkness and grogginess I was facing in a different direction from the one I thought I was facing. As a result, instead of walking through the kitchen doorway, I tried to walk through a cupboard.
The next few days brought dizziness and blurred vision. After much reluctance I went to the local hospital, where I waited petrified among people for whom “social distancing” means standing far too close, and who wore their masks pulled below the nose.
After two hours I emerged into the twilight, relieved that I had nothing more serious than just a bump. I couldn’t manage any drawing, but I was glad to have finished three chapters of my book.
Well, I don’t know about you, but my opinion of that is the same as Dr Johnson’s views on women preaching:
“Sir, a woman’s preaching is like a dog’s walking on his hind legs. It is not done well; but you are surprised to find it done at all.”
So, in desperation, I asked the AI to “write” a new version of the story, using the same elements but making it less boring. Here is the result:
Just before dawn, my semi-conscious brain decided that the kitchen was calling. Shadows danced on the hallway walls as I marched with heroic intent towards what I thought was the fridge. Instead, my forehead met the sharp edge of a cupboard with a thud that echoed in the silence — my personal fanfare for disaster.
Staggering back, my senses swirled in darkness and confusion. I fumbled for a light switch, but reality was laughing in the corner: I’d aimed for the tea but launched a surprise assault on kitchen furniture.
The days that followed were a fever dream of dizziness, blurred vision, and inexplicable cravings for toast. Eventually, after performing the ancient rite of putting off all responsibility, I dragged myself to the local hospital, feeling less like a patient and more like an undercover detective in a room of suspects. Everyone was locked in silent warfare over personal space; a wiry fellow glared at me while cozying his mask just under his chin, as if keeping his cheeks warm were NHS policy.
Two hours of boredom, paranoia, and overheard arguments about biscuits came and went. At last, a nurse waved me over. Good news: only a minor bump and a major lesson in midnight navigation. The aftermath? Drawing was impossible — every pencil seemed to move on its own. But I devoured three chapters of my book, mind alive with images of anti-gravity beds and sentient cupboards.
Good grief! It seems to have gone mad. Part of it sounds like I suddenly became pregnant:
“The days that followed were a fever dream of … inexplicable cravings for toast.
Mind you, I liked this:
“…a wiry fellow glared at me while cozying his mask just under his chin, as if keeping his cheeks warm were NHS policy.”
I think that is quite humorous, especially as it could well be NHS policy given that nobody in the hospital seemed to be enforcing the rules.
I’m not sure at which point I became an artist rather than a writer. And as for dreaming of antigravity beds, all I can say to AI is: don’t give up the day job.
I hope you have enjoyed this version. If you’d like to dig deeper, I often write an ‘Experiments in style extra’ post to explain how a version came about, or how I did it. That’s for paid subscribers. If you would like to read the behind-the-scenes story for this version, here it is:
As this is the first ‘experiment in style’ for several months, and for the benefit of new subscribers since then, I have temporarily extended the time allowed before the paywall kicks in. So you can have a good rummage around the other versions of this story (click on the Index link below) should you wish to. If you like what you read, you will be delighted to learn that I have massively reduced the cost of an annual subscription. The offer finishes on 21st November 2025.Use this link: https://terryfreedman.substack.com/xmas25
If you’re new to the series, you can see the index of my experiments here: Index.
As always, I’d love to hear your comments.
Thanks to David Longman for sending me a link to this article.




AI scares me, not only because I am a writer, but also because it is not so intelligent: it should take a seat with the dumb kids in school. Its day job is probably that of mopping floors, for that is essentially what it does -- mops over our creations. Its output is humorless, dry, boring and frequently inaccurate. Thanks for creating this experiment, Terry. Edifying.
Why?? Computers can write. Duh! But 'rules' for writing aren't what creative writing is all about, is it?
The future may have AI generated everything, but it won't have ME. OR YOU.
It may not need us, but we have our own desires, memories, even if faulty, and purposes.
A purpose to USE AI/
Who knows?