Archive for October 2007

Generating Narrative Variation in Interactive Fiction (part 3)   Leave a comment

I am moving ahead to the third section of the dissertation (Review of Related Work), and specifically section 3.2 (Story Generation). Story generators have a strong influence on nn, so it’s worth the time to look at two of them: Tale-Spin (from 1976) and Brutus (from 2001).

(p. 29) A significant story generator is Tale-Spin, which used a conceptual dependency representation to generate and narrate the actions of characters in a simulated world. The idea was to generate events which were themselves interesting; once these were generated, they were narrated in an unvarying, direct way.

Tale-Spin is essentially a reactive agent planner. Here’s a sample run:

Once upon a time, there was a dishonest fox named Henry who lived in a cave, and a vain and trusting crow named Joe who lived in an elm tree. Joe had gotten a piece of cheese and was holding it in his mouth. One day, Henry walked from his cave, across the meadow to the elm tree. He saw Joe Crow and the cheese and became hungry. He decided that he might get the cheese if Joe Crow spoke, so he told Joe that he liked his singing very much and wanted to hear him sing. Joe was very pleased with Henry and began to sing. The cheese fell out of his mouth, down on the ground. Henry picked up the cheese and told Joe Crow that he was stupid. Joe was angry, and didn’t trust Henry anymore. Henry returned to his cave.

I am guessing based on this interview with the author of Tale-Spin that this story was considered an exemplar; it was used as part of a NOVA special on the mind. Two characters are given goals, and they conflict in such a way that an interesting narrative is developed. Of course, not every run was so lucky:

Once upon a time George Ant lived near a patch of ground. There was a nest in an ash tree. Wilma Bird lived in the nest. There was some water in a river. Wilma knew that the water was in the river. George knew that the water was in the river. One day Wilma was very thirsty. Wilma wanted to get near some water. Wilma flew from her nest across a meadow through a valley to the river. Wilma drank the water. Wilma wasn’t very thirsty any more.

Here the goals were set up, but the characters never met up to have a conflict. This can happen in IF, where actors wander about completing their goals but due to sheer bad luck nothing develops. With a story generator the sample texts can be cherry picked (I get the impression from reading commentary Tale-Spin could run even farther awry) but in an IF format we can’t generate a set of narratives and manually pick the “good” ones. Therefore the hurdle for IF is somewhat higher than story generators.

(While the original source for Tale-Spin no longer exists, there is a miniature version in LISP.)

(p. 18) A recent automatic storyteller is Brutus, a system that uses a formal model of betrayal and has sophisticated abilities as a narrator.

Here’s an excerpt:

Dave wanted desperately to be a doctor. But he needed the signatures of three people on the first page of his dissertation, the priceless inscriptions which, together, would certify that he had passed his defense. One of the signatures had to come from Professor Irons, and Irons had often said — to others and to himself — that he was honored to help Dave secure his well-earned dream.

The full story (very much worth reading) is here.

It’s much harder to find evidence of a reactive agent planner here (according to the dissertation it uses a “lexically-oriented approach of building stories from grammars that govern the text on different scales”) and from what I gather there is a great deal of pre-loading; the arc of a complete betrayal plot is expressed as a (quite literal) formula. However, the natural flow of the text is dazzling, and I imagine the ideal of nn would be to allow the mundane events of IF to be narrated in a manner similar to Brutus.

Posted October 11, 2007 by Jason Dyer in Interactive Fiction, Narrative Variation

Generating Narrative Variation in Interactive Fiction (part 2)   2 comments

(p. 10) The content/expression distinction, and anything like it, is notably absent in the architecture and knowledge representations of computer systems that generate narrative, as is discussed in the next chapter.

When studying non-interactive story, the separation of content and expression is relatively uncomplicated; there is a full “world” going on, and the expression of it are those parts the author chooses to portray. Interactive story adds the complexity of code: there is something genuine and tangible in the content layer, besides it merely being in the author’s head.

(p. 13) Interactive fiction produces texts that describe characters and objects even when these characters and objects are not simulated, that is, when they do not have a representation in the world model.

In terms of a general theory, there’s something more like three layers:

* the expression layer
* the content layer of things with code behind them; e.g. characters with an object in the world model the player can interact with
* the content layer of things without code; e.g. characters mentioned in passing but only included in text, and with no chance of interaction. This can have sort of a halfway status when referring to groups of things. In a crowd scene, for example, there may be text messages referring to individual people doing things (“a lady near the front checks her cell phone”) while the code may only allow reference to “the crowd”.

There’s also what one might refer to as “second-order content” — when examining an object, there tend to be details, and if one can examine those details that’s a second level. Those details may themselves have details that can be examined. At some level this recursion has to stop, either through a description which suggests no further object (“it is blue”), subsuming the detail as part of the object description (so the ornate wheel on a bicycle is considered in the world model identical to the bicycle) or leaving the detail as expression-but-not-content.

(I believe Andrew Plotkin coined the second-order terminology, but I haven’t been able to find where. Anyone with a link?)

(EDIT: Thanks to Dan Shiovitz for tracking down who coined the second-order terminology: Paul O’Brian in a review of Out of the Study.)

(EDIT EDIT: Emily Short has found the reference even earlier in another Paul O’Brian review of Hunter in Darkness. Is there one even earlier? I had previously thought it came up in regards to The Light: Shelby’s Addendum.)

(p. 14) But when attempting to automatically produce narrative variation, it makes sense to consider only those existents and entities that are explicitly represented in software . . .

The nn system goes by the precept “every piece of expression has a piece of content in the world model behind it”. This allows the system to have complete control over the text and to modify any part. (To give an example of system control, the classic Inform library hard-coded “you” in its responses, whereas Hugo allowed for changing between first/second/third perspective with a single variable.)

(p. 14) The IF system developed will be, when released, the first system to allow authors to easily manipulate the telling of their worlds, allowing a number of literary techniques to be integrated into IF.

To be more specific here, the system allows a number of literary techniques to be integrated within the system automatically, as a system of coded rules just like the world model.

This will allow, for example, the actions of multiple NPCs to be printed in different ways or out of order. Perhaps the player is “following” one character, whose actions are provided in detail, while any other characters passed by are described with much terser prose.

This is of course achievable with current systems, but the goal here is to elaborate automatic narrative variation beyond what an author would normally attempt manually.

Posted October 9, 2007 by Jason Dyer in Interactive Fiction, Narrative Variation

Cobra’s Arc, Poizoned Mind, and Fedora Spade   1 comment

In the category of “interactive fiction in obscure places you aren’t likely to have looked”, I bring you:

* A remake in the CEZ RetroCompo 2007 of Cobra’s Arc (it won 3rd place).

* An entry in the B-Game Competition called Poizoned Mind: A Texty B-Game. (forum thread and download link).

* (Somehwhat less recent) A menu-based game styled after old Nintendo adventures called Fedora Spade.

Posted October 6, 2007 by Jason Dyer in Interactive Fiction

Lone Wolf 1 & 2 back in print   Leave a comment

For gamebook enthusiasts:

The Collector’s Editions are available for Flight From the Dark and Fire on the Water. Paperback version are reportedly forthcoming. Book 1 is expanded with extra entires; I am unsure about Book 2.

Posted October 2, 2007 by Jason Dyer in Interactive Fiction

Generating Narrative Variation in Interactive Fiction (part 1)   1 comment

So, I promised last month to Nick Montfort I would be posting on his dissertation. Then I got stalled for various reasons, due in part to the large chunks of prose causing writer’s block. But then — this is a blog! I can break things down into micro-chunks. So while this was meant to be more of a 3 part post, now it’s going to be more like 15. Since I figure everyone is distracted by the competition, I reserve the right to revise posts later.

(I’m skipping section 1, which defines terms and I’ll get back to when necessary, and starting at section 2.)

(p. 7) Despite all of this, IF has had hardly any support or recognition from institutions that have traditionally promoted literature.

Now, while Jeremy Douglass is currently working on his own IF dissertation, from what I gather this is the first one on the subject since Mary Buckles in the 80s. So quite naturally, the introduction spends a good amount of time defending the topic as one for study. This sort of thing happens in musicology — for a while Mahler papers were all about defending Mahler as a worthy composer, before finally scholars could get down to the business at hand without fuss. It’ll be a good day when an IF paper can be written without an extended preface for new initiates.

(p. 8) Among its other virtues, interactive fiction can serve as a useful context for computational linguistics research . . . These researchers go on to suggest the uses of interactive fiction systems in the lab as testbeds.

The Implementers at Infocom supposedly did linguistic research to make their parser for the late era games (Zork Zero, Arthur, etc.) I have no idea if there was anything to it that is not in modern parsers.

I’m was previously unaware of the research from computational linguistics circles, and I do wonder: has anything original come out of them that can be applied to IF? (As opposed to them noting what has already been implemented in modern parsers.)

(p. 10) The content plane can be seen to have . . . events, which are things that happen, and existents, which are entities in the story . . . An event may be caused by some actor within the story, or it may be a happening with no agent, such as “there was an earthquake.”

The careful definition of terms ends up paying off later. What’s interesting here is the large practical difference between an existent being implemented in code as an object, and being simply referenced in the narrative flow. (For instance, having a “cutscene” where an intruder comes in, shoots somebody, and leaves without existing as a character vs. allowing several turns for the player to attempt to disarm the intruder.) Nick’s IF system essentially prohibits such conditions. In fact, much of his design seems based on this principle: having no prose generated without a world model behind it. (The example above could be considered an agentless event, even though there was a character involved [who might show up later as a genuine object!] but it was my understanding that agentless [how Nick uses it] refers to actions without potential objects behind them. Although I suppose “earthquake faults” could theoretically be a character.)

Posted October 2, 2007 by Jason Dyer in Interactive Fiction, Narrative Variation