This fascinating book explores machines as authors of fiction, past, present, and future. For centuries, writers have dreamed of mechanical storytellers. We can now build these devices. What will be the impact on society of AI programs that generate original stories to entertain and persuade? What can we learn about human creativity from probing how they work?
In Story Machines, two pioneers of creative artificial intelligence explore the design and impact of AI story generators. The book covers three themes: language generators that compose coherent text, storyworlds with believable characters, and AI models of human storytellers. Providing examples of story machines through the ages, it covers the history, recent developments, and future implications of automated story generation.
Anyone with an interest in story writing will gain a new perspective on what it means to be a creative writer, what parts of creativity can be mechanized, and what is essentially human. Story Machines is for those who have ever wondered what makes a good story, why stories are important to us, and what the future holds for storytelling.
Frequently asked questions
Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Perlego offers two plans: Essential and Complete
Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go. Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Story Machines: How Computers Have Become Creative Writers by Mike Sharples,Rafael Pérez y Pérez in PDF and/or ePUB format, as well as other popular books in Education & Education General. We have over one million books available in our catalogue for you to explore.
Yes, it’s easy. You just type a short story into a word processor, press the print button, and out it comes. The French publisher Short Édition has installed story vending machines in cities and universities around the world to promote the reading of literature.1 At the touch of a button, the machine prints a short story for free on eco-friendly paper the width of a toilet roll. There’s no cost to use the machine and readers can choose from stories that take one minute, three minutes, or five minutes to read. The vending machines have dispensed more than 35 million short stories written by 10,000 independent authors.
It’s a great idea, but these stories are written by humans, not computers. Could a computer create new, original stories?
Well, you could chop already-written stories into smaller pieces – single events, dialogues, descriptions – then code a computer program to select some at random and string them together, slotting in consistent characters throughout. Here’s an example we prepared by hand:
I had called upon my friend, Mr Quentin Hall, one day in the autumn of last year and found him deep in conversation with a very stout florid-faced elderly gentleman, with fiery red hair. My friend rose lazily from his arm-chair and stood with his hands in the pockets of his dressing gown. I was surprised. I looked at the clock. Both Hall and I had a weakness for the Turkish Bath. As Hall turned up the lamp a light fell upon a card on the table. In his right hand he had a slip of litmus paper. Then he stood before the fire, and looked me over in his singular introspective fashion.
“You have a case, Hall?”, I remarked.
“Very sorry to knock you up, Wilberforce,” said he, “but it’s the common lot this morning.”
“My dear fellow, I wouldn’t miss it for anything.”
We constructed this opening for a short story by choosing, at random, one opening sentence from the collection of Sherlock Holmes short stories, followed by random sentences from the first paragraphs of other stories in the collection, then some random pieces of opening dialogue, with the names of characters altered. Although the names of the characters have been changed and the passage makes little overall sense, the style is still clearly that of Sir Arthur Conan Doyle.
The sense of harmony that comes from writing in an identifiable style was one of the ploys used in Sheldon Klein’s Automatic Novel Writer program created in the 1970s.2 Klein claimed that his program could produce 2,100-word murder mystery stories in less than 20 seconds. Here are the first 80 or so words from one of its offerings.3
Wonderful smart Lady Buxley was rich. Ugly oversexed Lady Buxley was single. John was Lady Buxley’s nephew. Impoverished irritable John was evil. Handsome oversexed John Buxley was single. John hated Edward. John Buxley hated Dr. Bartholomew Hume. Brilliant Hume was evil. Hume was oversexed. Handsome Dr. Bartholomew was single. Kind easygoing Edward was rich. Oversexed Lord Edward was ugly. Lord Edward was married to Lady Jane. Edward liked Lady Jane. Edward was not jealous. Lord Edward disliked John. Pretty jealous Jane liked Lord Edward.
The program followed the flow of a stereotypical mystery story, introducing some characters at an English country manor, then progressing though a flirtation between two characters, love making, threats, and a murder. For each scene it chose from a stock of pre-prepared sentences, giving consistent names for the characters. The Automatic Novel Writer undoubtedly produced prose in the style of murder mysteries, but the stories it told were rambling and tedious. The extract certainly doesn’t entice you to read the remaining 2,000 words of the story.
That’s not surprising. Authors don’t just pluck out phrases at random. They form them into a logical order to make an interesting and coherent plot
Klein’s program had a notion of plot, in its “murder flow-chart”, but it was very rigid. Its language was stilted and repetitive. What’s needed is a way to describe the structure of a whole set of plots that can then be used as a source for varied story structures.
The diagram on the next page shows a plot generator for science fiction stories. It was first published in 1971 in National Lampoon,4 an American humour magazine and a somewhat unlikely place for an article on automated creativity. By following the arrows from the top to the bottom of the diagram you can produce variations on a sci-fi theme. Here’s one of many:
Earth scientists discover giant reptiles which are friendly but misunderstood and are radioactive and cannot be killed by the Army, Navy, Marine Corps and/or coastguard so scientists invent a weapon which fails but they die from catching chicken pox (The End).
The Science Fiction Horror Movie Pocket Computer, as National Lampoon called it, might be a source of ideas to an aspiring author or movie maker, but a far greater challenge is to devise some small set of rules that could describe or generate the complete works of a classic storyteller such as Aesop or the brothers Grimm. Nearly one hundred years ago the Russian folklorist and scholar Vladimir Propp did just that. He analyzed a hundred Russian folktales and discovered that not only did they have recurring acts, such as “acquisition of a magical object”, but that characters in an act could be replaced by others without damaging the structure of the tale.5 So, for example, the act of “a witch steals the King’s favourite horse” could be changed to “a dragon (or ogre, or rival King) steals the King’s ring (or princess, or healing potion)” and the tale would still have a solid structure.
Propp produced a masterly analysis of folk tales and founded the study of literary structures, but he didn’t have the means to turn his analyses around and create new story structures. It took a further forty years to bring together the essential ingredients: a way to describe the structure of stories by means of formal rules (called a story grammar), plus a method to automatically follow those rules to generate new story outlines.6 Code that in a computer program and it can output thousands of different outline stories.
Here’s the first rule of a grammar to generate the outline of a typical story:
STORY – > INTRODUCTION + ACTION* + CONCLUSION
The rule says: “A story consists of an Introduction, followed by one or more Actions, followed by a Conclusion”. The asterisk after ACTION means it can be repeated multiple times. This makes intuitive sense. Most stories start with an introduction to set the scene, then have many pieces of action, and then round off with a conclusion. Each of these elements is broken down into further elements such as ACTION_SEQUENCE and COMPLICATION. By following the rules in a systematic way you or a computer can generate endless story outlines.
If you pay a large sum of money for a course on How to Write a Great Novel, you’ll probably get, along with much good advice from professional writers, some variant of a story grammar as a way to come up with outlines for your novel. We’ll return to story grammars later in the book.
But not all stories fit into the same structure, and what about the characters?
We can produce a story grammar that covers a wide range of story types, from medieval French epics to detective stories. It is based on the insight that such stories have similar structures that move from a lack of or a need for something (in a detective story it is usually the lack of a suspect) to a situation where the lack is either resolved or repeated.
Story grammars only cover the outline of a story. We need a further method to flesh this out with interesting and believable characters. TAILOR is a computer program that generates stories in the style of Aesop’s fables.7 It is based on the principle that stories arise from a character’s lack or need, but instead of following a story grammar it sets up a need for one of the characters, places the character in a location, and gives it a plan to satisfy that need. For example, the need to find warmth would cause the character to travel in search of a fire. To complicate matters and provide some interest in the story, the program introduces other characters who try to impede the plan by concealing objects or offering misleading advice. In effect, the program winds up the clockwork of a needy character, puts the character into a fictitious world, and records what happens. Here’s an example from TAILOR of a story about an arctic tern named Truman who sets off on a quest to build a home but is thwarted by Horace, the devious polar bear:
Once upon a time there was an arctictern named Truman. Truman was homeless. Truman needed a nest. He flew to the shore. Truman looked for some twigs. Truman found no twigs. He flew to the tundra. He met a polarbear named Horace. Truman asked Horace where there were some twigs. Horace concealed the twigs. Horace told Truman there were some twigs on the iceberg. Truman flew to the iceberg. He found no twigs. Horace walked to the shore. He swam to the iceberg. Horace looked for some meat. He found some meat. He ate Truman. Truman died.
This is a story that makes some sense. There’s a main character, Truman the tern, with a believable goal, building a nest. Truman carries out actions that match his character and the setting. But the task is complicated by an adversary, Horace, who hides the twigs. Horace also has a need, for meat. He tells Truman there are twigs on the iceberg and, in a final showdown, confronts the hapless bird and eats him. It’s a good basis for a somewhat gruesome tale.
Impressive! How many lousy stories did TAILOR have to generate before it came up with that good one?
TAILOR had no means to distinguish an interesting story from a tedious one. That had to be done by the program’s creators, so naturally they only presented the best ones. They didn’t say how many bad stories they rejected to find one good one. This raises the issue of tellability.
A tellable story should not merely be interesting, but it should give the reader some reward for having finished it: an insight into the human condition, a moral, or just a final twist to the plot. The story about Truman and Horace is, arguably, tellable. It has a neat twist at the end where Horace satisfies his need for food by eating the main character.
But the program doesn’t know that. The TAILOR program has no way of evaluating its own tales. It just generates story after story, some interesting, some pointless, with no insight into how they will be received by the reader. TALE-SPIN is an earlier program based on similar principles to TAILOR, and here is an example of a pointless story it generated:8
Once upon a time there was a dishonest fox and a vain crow. One day the crow was sitting in his tree holding a piece of cheese. He became hungry and swallowed the cheese. The fox walked over to the crow. The end.
The story may have some curiosity value, but it’s not tellable. It doesn’t capture the reader’s imagination. It starts well by introducing two characters and their traits, then sets the scene by describing the crow holding a piece of cheese in his tree. Then, instead introducing the second character to build tension (perhaps to steal the cheese or to offer better food), the story generator just resolves the crow’s need by having him eat the cheese. The cunning fox arrives too late!
It may be possible to add an extra module to a story generating program to evaluate each finished story and reject those that do not pass its quality threshold. Many word processors such as Microsoft Word have modules to check a document’s readability, but these can only assess the surface properties of the text, such as the length of its sentences and the average number of syllables per word.9 A score for “interestingness” or “tellability” requires a program that delves deep into the meaning of a story.
However, the difficulty of getting a program to interpret its own output could be avoided if the system has built-in “tellability”, so that it produces only tellable stories. Scott Turner’s MINSTREL program generates short stories of what he called “King Arthur and his knights” type.10 The program stores a set of templates, each with a well-known moral such as “pride goes before a fall”. It then fills in the details from a stock of interesting story fragments. If it ...