In this series, Gordon Collins explores whether computers can write fiction, beginning with James Meehan’s TALESPIN. Part 2 looks at recurrent neural networks.
TALESPIN – James Meehan 1976
Can a computer plot a story? Can it write a metaphor? Can it develop a character? Can it move you to tears?
One of the first attempts was James Meehan’s TALESPIN which he wrote for his 1976 dissertation, “The Metanovel: Writing Stories by Computer”. TALESPIN was written in LISP – a long-neglected language used for AI and only recently making a comeback. TALESPIN is a story generating system based on the AI concept of “planning”. You give the character a goal and she must use her knowledge and “reasoning” to find a way to achieve it. You can also have many characters with conflicting goals and set their relationships here. And the characters are given “SIMS”-like personality values for kindness, vanity etc.
Meehan’s original version was lost but there is a version, Micro-Talespin, which was by Warren Sack in 1992. The user can set up the scenario with the command setf *init-facts* which could use a line like:
world (loc (actor joe) (val cave))
which says that Joe is in the cave or:
put 'joe'is-a 'bear
which tells the system that Joe is a bear. You can tell the system that relieving thirst is a goal and that drinking relieves thirst and that Joe can drink from the river and that Joe knows he can drink from the river and where the river is. Then, to write a rather minimal but elegant story you just use the command:
And you generate the story:
One day, Joe was thirsty. Joe wanted not to be thirsty. Joe wanted to be near the water. Joe went to the river. Joe was near the river. Joe drank the water. Joe was not thirsty. The end.
You might say that TALESPIN has not made the most out of this dramatic situation. Thirst is a powerful motivator and yet the resolution comes too quickly. Nevertheless, the story moves along swiftly and the ending is justified. Perhaps TALESPIN views human writing as too florid.
More drama can be achieved with Irving:
put 'irving 'is-a 'bird
and the thing you need to know about Irving is that Irving does not know where the river is and he thinks Joe does and that Joe is deceiving him. Therefore:
One day, Irving was thirsty. Irving wanted not to be thirsty. Irving wanted to be near the water. Irving wanted to know where the water was. Irving wanted Joe to tell Irving where the water was. Irving wanted Joe to think that if Joe would not tell Irving where the water was then Irving would strike Joe. Irving wanted to be near Joe. Irving went to the cave. Irving was near the cave. Irving told Joe that if Joe would not tell Irving where the water was then Irving would strike Joe. Irving struck joe. Joe was not alive. Irving thought that Joe would not tell Irving where the water was. Irving thought that Irving did not know where the water was. Irving thought that Irving was not near the water. Irving knew that Irving would be thirsty. The end.
(I put in the paragraphs to get the full effect. I don’t think it would be too hard to instruct the system that a death is dramatic and drama deserves at least a new paragraph.)
In the last paragraph, a seemingly self-aware Irving struggles with his thirst, failure and even guilt?
TALESPIN’s stories require a lot of user input. It doesn’t give a lot more back than what you give it. Even basic relations must be encoded. There are comments in the code such as
“The success of threatening depends upon whether you dominate the other person,”
and this is the code that does that:
(defun threat-plan (actor agent action) `(and (not (relate ',actor ',agent ',actor 'dominate)) (tell ',actor ',agent (cause (negate ',action) (future (propel ',actor 'hand ',agent)))) (or (is-true ',action) (and (doit (propel ',actor 'hand ',agent)) (is-true ',action)))))
Would every goal, every human interaction, every function of every object have to be coded in this way for a machine to freely write? Would it need a vast library of social functions like there are for mathematical algorithms? Over time, the already huge code for TALESPIN could be amended or overwritten like a palimpsest.
Or perhaps TALESPIN’s limitations are what generate the drama. Emotions like guilt are not programmed into Irving but his story is surprising and he reaches a realisation unhindered by a human’s knowledge of the complex world.
An account of the creation of TALESPIN can be found here:
About the author
Gordon Collins has been a market risk analyst, a maths lecturer, an English teacher in Japan and a computer graphics researcher specialising in virtual humans. He has degrees in mathematics as well as an MA in Creative Writing from the University of East Anglia. He has been longlisted for the Fish short story prize, and twice for the Galley Beggar Press short story prize. He has had short stories published in Riptide Vol 3, UEA Creative Writing Anthology 2010, Infinity’s Kitchen, Liars’ League, Unthology 3, 6 and 9 and Unthank Books’ The End. See www.zipple.co.uk more.