A Solution to Interactive Storytelling
Part One: History

August 29th, 2024

It is embarrassing to admit that I solved the problem of interactive storytelling nearly 40 years ago, but didn’t realize it at the time. For my game “Siboot” (publised as “Trust & Betrayal”), I invented a system that I called “Anecdotes”, which were little stories that presented the player with some sort of dramatic challenge. Here is an example:

You are still several hundred meters from your destination when you perceive Wiki approaching from another direction.  Even from this great distance you instantly see that he is upset.  He hesitates, stops, then retreats to some nearby barrels and disappears among them.  Curious, you approach carefully.  Then you see him, sitting on the ground between two barrels, his head buried in his hands.  “Wiki?", you ask.  "What is wrong?"

     Wiki looks up, obviously embarassed at being caught in a moment of weakness.  He hesitates for a moment, gauging your sympathy, then explains.  "I have to tell you, this entire process of selecting the Shepherd is starting to get to me.  It's not the effort, or the mental combat; after all these years of preparation, I'm ready for that.  What bothers me is the way it is affecting my attitude toward the other acolytes.  I've lived and worked with these people all my life.  I was brought up to try to believe that I could love people from other species.  But now I find myself engaged in fierce competition with these same people whom I'm supposed to love.  I betray them, and they betray me.  It seems like the worst possible way to find out who is pure and virtuous enough to be the next Shepherd.  I'm not sure I want to go through with it, but it's not even my own decision; all those people back on Lamina are counting on me to fight hard for them.  I don't know what to do."

     What do you tell him?

"I don't know what to tell you.”
"I have the same feelings sometimes, but we have to carry on.”
"Why don't you drop out and give me your auras?"
"We'll all be good friends again when this is over.  Don't worry about it!"

This short and simple anecdote gives the player a menu of four choices. The player selects one, triggering a response as well as a change in the internal global values that will determine the outcome of the story. That’s all there is to it.

You’d be surprised at how simple this was to implement. Here’s the data structure that made all this happen:

You are still several hundred meters from your destination when you perceive % approaching from another direction.  Even from this great distance you instantly see that @ is upset.  @ hesitates, stops, then retreats to some nearby barrels and disappears among them.  Curious, you approach carefully.  Then you see $, sitting on the ground between two barrels, ^ head buried in ^ hands.  "%?", you ask.  "What is wrong?"

     % looks up, obviously embarassed at being caught in a moment of weakness.  @ hesitates for a moment, gauging your sympathy, then explains.  "I have to tell you, this entire process of selecting the Shepherd is starting to get to me.  It's not the effort, or the mental combat; after all these years of preparation, I'm ready for that.  What bothers me is the way it is affecting my attitude toward the other acolytes.  I've lived and worked with these people all my life.  I was brought up to try to believe that I could love people from other species.  But now I find myself engaged in fierce competition with these same people whom I'm supposed to love.  I betray them, and they betray me.  It seems like the worst possible way to find out who is pure and virtuous enough to be the next Shepherd.  I'm not sure I want to go through with it, but it's not even my own decision; all those people back on Lamina are counting on me to fight hard for them.  I don't know what to do."

     What do you tell $? \
\
"I don't know what to tell you."
  A2+aP% thanks you and walks off.
\
"I have the same feelings sometimes, but we have to carry on."
  A3+aT4+tP% thanks you and walks off.
\
"Why don't you drop out and give me your auras?"
  T40-tA40-aP% becomes furious, screams at you, and runs away.
\
"We'll all be good friends again when this is over.  Don't worry about it!"
  A8+aP% says @ feels better and heads off.
\


These codes are simple in their interpretation; they operated on a Macintosh back in 1987, running at perhaps 20 MHz and equipped with a megabyte of RAM. Most of these anecdotes were designed to operate with any character other than the protagonist. This required the use of substitutions for gendered pronouns.

%: the name of the other character. 
@: nominative pronoun for the character (‘he’ or ’she’)
^: possessive pronoun for the character (‘his’ or ‘her’)
$: objective case pronoun for the character (‘him’ or ‘her’)

There’s another special oddity in the code: the sequences of characters preceding each of the four responses. The first of these is:

A2+a

This is a short calculation using a virtual calculator using reverse Polish notation (see https://en.wikipedia.org/wiki/Reverse_Polish_notation). Each character represents a button on the calculator. Here’s the translation:

A: load the variable called “A”.
2: push the number ‘2’ onto the stack
+: add the two numbers in the stack (yielding A+2)
a: store the bottom value into the variable called “A”. 
P: end calculation

As you can see, the calculations are all simple additions and subtractions to a variable. 

This is as far as I went with this technology. The final product had only 44 anecdotes — not enough to play a dominant part in the player’s experience. Part of the problem was my desire to make them applicable to any character. Too late I realized that it would have been better to customize each anecdote to a particular character. 

But this was the foundation for the system that worked.

Part Two: Encounters in Le Morte D'Arthur