Conferencing on Code and Games

First, as of this writing: I’m at the GAMBIT Summer Summit here at MIT, which runs today and is being streamed live. Do check it out if video game research interests you.

A few days ago, I was at the Foundations of Digital Games conference in Bordeaux. On July 1 I presented the first conference paper on Curveship since the system has been released as free software. The paper is “Curveship’s Automatic Narrative Style,” which sums up or at least mentions many of the research results while documenting the practicalities of the system and using the current terminology of the release version.

four FDG attendees

Noah Wardrip-Fruin, Malcolm Ryan, Michael Young (next year’s FDG local organizer) and Michael Mateas in between sessions at FDG 2011.

At FDG, there was a very intriguing interest in focalization, seen in Jichen Zhu’s presentation of the paper by Jichen Zhu, Santiago Ontañón and Brad Lewter, “Representing Game Characters’ Inner Worlds through Narrative Perspectives” and in the poster “Toward a Computational Model of Focalization” by Byung-Chull Bae, Yun-Gyung Cheong, and R. Michael Young. (Zhu’s work continues aspects of her dissertation project, of which I was a supervisor, so I was particularly interested to see how her work has been progressing.) Curveship has the ability to change focalization and to narrate (textually) from the perspective of different characters, based on their knowledge and perceptions; this is one of several ways in which it can vary the narrating. I’ll be interested to see how others continue to explore this aspect of narrative.

Before FDG was Digital Humanities 2011 at Stanford, where I was very pleased, on June 22, to join a panel assembled by Rita Raley. I briefly discussed data-driven poetic practices of different sorts (N+7, diastic writing, and many other forms) and presented ppg256 and Concrete Perl, which are not data-driven. I argued that as humanists we should be “digging into code” as well as data, understanding process in the new ways that we can. It was great to join Sandy Baldwin, Noah Wardrip-Fruin, and John Cayley on this panel, to discuss code and poetry with them, and to hear their presentations.

XO and GUI Found in Curveship’s Alphabet Soup

Saturday 18 June 2011, 2:15 pm   ////  

I went by to OLPC (One Laptop Per Child, the nonprofit that has created and deployed worldwide the green laptop for kids) yesterday for some discussion of narrative interfaces. I explained the basics of Curveship and what was interesting about it from my perspective, mentioning that one could hook the narrating engine up to something other than an interactive fiction world. I also found out that others had some of their own, very interesting, ideas.

Chris Ball, for instance, showed a proof-of-concept where he hooked up the simulated world of Curveship’s Cloak of Darkness, the classic simulated example world, to a graphical display and a graphical system for inputting commands:

Screen from the Curveship GUI Cloak of Darkness

Source is available on github. While it doesn’t generalize to every Curveship game, what it presents on the screen here is done without any additional game data: Chris’s system determine that the south room is dark and obscures it, determines where the exits are, places objects in rooms, and generates rooms of random size since there is no way to determine how big or small a room is. The only thing the systems knows about the underlying simulated world is what’s in fiction/cloak.py, the file I put together to demonstrate Cloak of Darkness in the usual textual interface.

On the one hand, it more or less discards all of the work that fascinates me the most, the text generation and narrative variation part of the system (*). But on the other, it’s the most radical narrative variation yet – replacing the textual interface with a graphical one. A pretty neat twist on the system, and one which is very interesting from a research standpoint if one’s interested in comparing image and text in narratives.

I hope work on this will continue and that we’ll find other mutually beneficial ways to connect Curveship with the OLPC project.

(*) It doesn’t really discard these or truly “replace” the text channel. You also get to read the textual description of rooms and the textual representation of actions in windows as you play the game. But it makes the main interface a GUI rather than a textual exchange.

Take This Narrative Diction

Sunday 15 May 2011, 9:17 pm   ///////  

I believe that Curveship and the example game Lost One may have just recieved their first roasting, thanks to the firepower of the S.S. Turgidity and the intrepid, enterprising player character Stiffy Makane. The “erotic adventures” that unfold in The Cavity of Time, released as part of the Indigo New Language Speed IF, allow you to jump everything within reach. And, just to be clear, to fuck all of those things. If you were offended just now, let me suggest that you don’t fire up this Choose-Your-Own-Adventure-style garden of fucking paths. Otherwise, this offering, written in the slick Undum system, may please you. Not like that. I mean it may amuse you.

Here’s a snippet from the beginning of the “Hip Curves” section:

The professor notices something about the device-shaped object.
That was immediately before a glass was refreshed.
The professor will be making a comment about focus.
A dial is being turned.
“Sorry about that,” he says. “What I was trying to say is that the tense shifts you are experiencing are the results of a local fluctuation in the field exerted by Hip Curves, my most diabolical erotic creation. Can I interest you in a mojito, by the way? There you go.”

I feel that in addition to commenting upon this reference, I must also invite you – if you are one of the non-offended – to plunge into the work in the question, if it doesn’t offend your morals. Please, drill Sam Kabo Ashwell’s Cavity.

My Curveship Talk at PAX-East 2011

Monday 28 March 2011, 9:34 am   /////////  

I gave a talk about Curveship in the “IF Suite” (actually an ordinary hotel room with a few upturned beds, not a suite) at PAX-East 2011 earlier this month. It was great to present to fellow IF author/programmers from around the world at this event, which was effectively the second annual Festival of Interactive Fiction. The IF Summit was organized by Andrew Plotkin, a.k.a. Zarf, once again this year. Thanks to Jason McIntosh, there’s pretty good-quality video (very good, considering the ramshackle setup) of the first 22.5 minutes of my talk:

Nick Montfort on Curveship at PAX-East 2011: Watch on Vimeo

The parts where I actually demo the system and discuss how games are written are missing, unfortunately, but my comments do introduce Curveship and its motivation.

Also check out the video documentation of the “Setting as Character” panel with Andrew Plotkin, Rob Wheeler, Stephen Granade, and Dean Tate. (This one took place in the more capacious Alcott Room, which we had on Saturday, March 12 thanks to Dave Cornelson.) Also, there’s video of the panel on “Non-Gamers Gaming,” with Caleb Garner, Tim Crosby, Heather Albano, Sarah Morayati, and Andrew Plotkin.

Pocket Curveship

Thursday 3 February 2011, 11:42 pm   //////  

Curveship running on a tiny computer, the Ben NanoNote.

Curveship runs on the Ben NanoNote, by the way. It could be faster, certainly – I and others will be working on that. But it does run, which is a good start and bodes well for the ability of Curveship games to run on many different platforms.

Happy Chinese New Year.

Curveship 0.5 Released

Happy Groundhog Day. Today, I’m releasing Curveship, my interactive fiction system that models not only the fictional world, but also the narrative discourse. A development version (0.5) of this Python framework is now available for download. You can find the links, along with some description and documentation of the system, at curveship.com.

(Original photos by April King and Postdlf, Wikimedia Commons; they & these modified versions are CC by-sa 3.0.)

Today’s Curveship Koan

Wednesday 5 January 2011, 3:11 pm   ///  
You put yourself on something unseen.
  Then, you are unable to take a look at something because you are not in the world.

Actions in Curveship

Tuesday 7 December 2010, 9:59 pm   ////  

I’ve been working the past few days to change the way actions are represented in Curveship. The previous model for actions is described well in sections 5.1.3 and 5.1.4 of my dissertation. I won’t go into it in any detail here, but it involved two sorts of abstractions (one higher-level and associated with intention and narrating, the other lower-level and used directly in the simulation) and was considerably more complex than what I have in the current system.

I will mention something about why actions are represented in the system at all – that is, with first-order representations, objects. This is a departure from the way IF systems have worked up to now. In other IF systems, when you “get lamp,” you change the state of the world. The lamp object has a different parent when you are done with this action. But there is no object representing the action itself, the adventurer getting the lamp. As you can tell from playing IF, this works fine if you want to stick to one character and narrate what is happening exactly once, as it happens.

Having a representation of action, on the other hand, allows for much more flexibility in narrating. One can narrate an action in flashback (because it’s still there, represented as an object) and can easily maintain lists of actions for each character, to represent what each specific character is aware of. In Curveship, these are kept in “concepts” which are theories about the world that are almost always incomplete and can even be wrong. Since all actions are reversible, the representation of actions also provides an infinite “undo” capability.

So, the action representation now simply provides actions of four types:

  • Behave – Any action that doesn’t change the world, from speaking to jumping up and down.
  • Configure – An action that causes an item to be moved to a new place, or to be in a new relation, in the item tree. (“get lamp” is an example.)
  • Modify – An action that causes an item to change state, to have one of its features take on a new value. (“light lamp” is an example.)
  • Sense – A perception of the world which does not change the world but may update a character’s concept.

For instance, this is the code that maps the command “get lamp” (or “get” followed by anything) into a particular “take” action, which is a configure action:

def take(agent, tokens, concept):     return Configure('take', agent,                      template='[agent/s] [pick/v] [direct/o] up',                      direct=tokens[1], new=('of', agent))

“take” is the verb and agent the agent; all Actions must have these two. The template is optional. It specifies the string-with-slots that is to be used in representing this action. All configure actions have a direct object, the item being configured, and need at least a “new” keyword specifying the link and parent that item will be in. Here, it’s “of” (indicating possession) and the agent (the one who is doing the taking.)

Curveship Analysis at Tufts

Monday 6 December 2010, 7:20 pm   ////  

I just wanted to thank Norman Ramsey, Eddie Aftandilian, and Brad Larsen for the very productive day-long discussion of Curveship that we undertook on Friday. I’ve spent most of the weekend and much of today implementing just one of the ideas for changes that came out of this. The discussion certainly gives me more to do, but it also does a great amount to focus my efforts as I work toward a release of system.

Festive Coders Make Curveship Codefest a Success

Sunday 7 November 2010, 7:57 pm   /////  

The Curveship Codefest today was all I hoped it would be – a source of ideas, a way to discuss how to progress toward release, and even a time for the development of several fiction files (games) and spin files (specifications for narrating), some profound, some amusing, some both. I have received some very useful patches, representing the first contributions to the core Curveship code from others since I started this project in 2006. It looks like – with some serious work on my part, and with further consultation from the Curveship cognoscenti – Curveship can finally be ready for release in a few months.

I want to thank everyone who participated in the codefest today, from Amaranth to Zarf. So I will: Thank you, Amaranth, Angela, Brad, Doug, Jake, Jason, Kevin, Luis, Flourish, Fox, Ralph, and Zarf! Communities represented at the fest included the Boston area IF community, MIT’s Programs in Writing and Humanistic Studies and Comparative Media Studies, and the MIT Media Lab. In particular, thanks to Flourish for breakfast and lunch food for everyone; thanks to Zarf for the cookies; thanks to Amaranth and Brad for the donuts; and thanks to Fox for suggesting the event in the first place.

Curveship Codefest Coming Up

Anyone who is in the Boston area and interested in spending a day (or a good chunk thereof) helping me push Curveship toward release should shoot me an email. Thanks to a great suggestion from Prof. Fox Harrell, I’ll be hosting a one-day Curveship Codefest soon in MIT’s building 14. People are welcome to write games, to write spin (ways of narrating), and to hack on the core Curveship system with me. We’ll be working toward a release of Curveship under a free software license in December or January.

Creating Adventure in Style and The Marble Index in Curveship

The blog edition of my presentation at the Electronic Literature Organization’s ELO_AI Conference, Brown University, 5 June 2010

The process of writing and programming the first two full-scale interactive fiction pieces in the new system I have been developing, Curveship, has been a part of my poetic practice that I have found interesting and has also been a useful activity from several perspectives. Here I focus on the project Adventure in Style. I will also mention The Marble Index, a project that contrasts with Adventure in Style in an important way. These two pieces, still in progress, are initial explorations of the potential of Curveship and of the automation of narrative variation. My hope has been that these two games will serve as provocative interactive experiences, whether or not those who interact with them are interested in Curveship as a research project or as a development system. Of course, it will be very useful if they also serve as demonstrations of how Curveship works. I have, additionally, used these two projects to help me determine what additional development is critical before I release Curveship.

While Curveship has functioned as a research system for several years and has been previously discussed from the standpoints of computer science, artificial intelligence, and narrative theory, this is my first attempt to discuss the specific pieces of interactive fiction that were conceived as aesthetic projects, rather than primarily for research or demonstration purposes.

Curveship

The system used to implement these pieces, Curveship, is an interactive fiction development system that provides a computational model of a physical world, as do existing state-of-the-art systems such as Inform and TADS. Curveship does something significant that other systems do not: It allows author/programmers to write programs that manipulate the telling of the story (the way actions are represented and items are described) as easily as the state of this simulated world can now be changed. It has been straightforward to simulate a character and to have that character move around and change the state of the world. In addition to this, Curveship provides for control over the narrator, who can speak as if present at the events or as if looking back on them; who can tell events out of order, creating flashbacks or narrating what happens by category; and who can focalize any character to relate the story from the perspective of that character’s knowledge and perceptions.

Curveship is a Python framework which will run on any computer that runs Python; I intend to release it under a free software license when it the core aspects of it are complete, well-tested, and well-documented. Rather than repeat what is already online about the system, I’ll just mention here that information about Curveship is available in several papers and in my 2007 dissertation. The best place to begin reading about the system is my blog, Post Position, where papers and my dissertation are linked. My blog posts use the same (simplified) terminology as does the code; these terms (such as “spin” to refer to the specification for narrating) are the current, official ones. Some of my earlier publications, although they represent many aspects of Curveship well, use out-of-date terms.

The Marble Index

The Marble Index simulates the experiences of a woman who, strangely disjointed in time and reality, finds herself visiting ordinary moments in the late twentieth century; the narration accentuates this character’s disorientation and contributes to the literary effect of incidents. So far, only a few sketches of parts of The Marble Index have been done. In The Marble Index, the narrative style is controlled by the interactive fiction program. I am not very far along on this project, but I mention it because I anticipate that, just as the interactive fiction programs takes care of simulating the world in current IF, the program will usually take care of modifying the narrative style in a less direct way. The Marble Index will probably be more representative of how the narrating will be controlled in a “typical” Curveship piece.

Adventure in Style

Adventure in Style is in part a port of the first interactive fiction, the 1976 Adventure by Will Crowther and Don Woods – one which adds parametric variations in style that are inspired by Raymond Queneau’s Exercises in Style (Exercises de style, 1947). For several years, I have been beginning my presentations about Curveship by showing that the goal of the project is to combine Adventure and Exercises in Style, because the two pieces show what is essential and compelling about interactive fiction (simulating a storyworld with a text interface) and about narrative variation. Now, in working on a creative project which is supposed to be effective as a stand-alone piece, not only as a demo, I am trying to combine these two much more literally.

In Adventure in Style, the player can rather directly control the narrative style by commanding the player character to manipulate an in-game object. The critical object here is the lamp, which the adventurer almost always needs to be holding in the cave. A special case, in which the player chooses to use the standard style throughout an entire traversal, gives the player an experience much like that of running the original Adventure program. The fictional work of Adventure in Style is almost complete, with the cave laid out as in Adventure and many of the treasures and other objects implemented. Although the fiction file has not been fully tested, the map of and most of the puzzles in Adventure are in place. Several of the possible variations in style, but not all the ones that are planned, have been implemented as well.

Several of my interests flow together, and then underground, in Adventure in Style. It is a port, and during my investigation of the Atari VCS (Atari 2600) with Ian Bogost as we worked on Racing the Beam, I found that ports are fascinating because they involve thinking about the essential aspects of a game and how they can be expressed in different ways across different platforms. When played in the standard narrative mode, one can see that Adventure in Style, in reimplementing a previous game, aspires to the unoriginality of Kenneth Goldsmith’s practice of uncreative writing, in which a writer simply transcribes or retypes text, such as a year’s worth of radio weather reports or a particular issue of The New York Times. Since narrative variation, the only aspect of the project that doesn’t come from Adventure, comes from Exercises in Style, Adventure in Style is thoroughly uncreative: neither the original game nor the concept of variation sprang from my fictive forehead. Nevertheless, or perhaps because I have avoided trying to make any real contribution of my own, I find that these two great tastes taste great together. They serve as a way to understand the computer’s power to control the telling of a story and to model an underlying story world.

Grue Street

I took Adventure in Style to the first meeting of Grue Street, an interactive fiction writers’ group that I started in Cambridge, Massachusetts as an offshoot of the local IF organization, The People’s Republic of Interactive Fiction. (In the tradition of Infocom’s The New Zork Times, we named the group to riff on a local writing center, “Grub Street.” Hopefully this organization won’t follow the lead of the Grey Lady and threaten us with a lawsuit.) Grue Street got off to a good start with six games and seven authors – one game was a collaboration. We required each attendee to bring something playable to the meeting, a “situation” of some sort:

“Situation” can mean something like a puzzle, task, or conversation, which may take place in one room (or scene) or in several. The term is meant to be pretty open; it’s mainly to encourage authors to have more than just an empty setting (with nothing to do in it) or a lone character or collection of objects (with no reason to interact). You don’t need to have your whole game completed or even sketched out to participate.

The writers interacted with each piece as a group. On the one hand, this left each of us with only one transcript of play to study, but, on the other, it gave authors the opportunity to hear players thinking out loud and talking with each other.

I didn’t come away from the meeting with any ideas for major revisions to Adventure in Style, but the group’s reaction did help me think about frame the game, creating a useful welcome message, and choosing a good variation to introduce initially. It also made me realize that it will be hard for some people to see the project as anything more than a demo of Curveship.

Three Goals

My work on Curveship has been directed toward three major goals:

  1. To advance and support research in natural language generation, narratology, computational creativity, and related fields.
  2. To create a functional IF development system that allows authors to create games for players.
  3. To enable new, compelling literary and aesthetic experiences.

“Shimmer,” advertised during the first season of Saturday Night Live, was a substance designed to be both a floor wax and a dessert topping. To update this for the 21st century, we might image a substance that is a floor wax, a dessert topping, and a hand sanitizer. While the three goals of Curveship do work together in certain ways, in other ways they make the research, development, and creative project seem a bit like “Shimmer Plus.”

An IF development system needs a reliable way for players to download games and probably for them to play games online, and, among other things, it needs a start-of-the-art parser. These are useful for goal 3 but unnecessary for goal 1. Generally, goal 1 and goal 3 involve pushing the envelope in some ways that are similar and some ways that are different, while goal 2 requires stability, documentation, and ease of use.

There are projects that have taken on two major and distinct goals at once. Façade by Michael Mateas and Andrew Stern was an attempt to create a highly distributable, playable, and enjoyable experience that also advanced the state of the art of interactive drama. It was not itself a platform or development system, however. Graham Nelson’s co-development of Inform and Curses involved creating a literary work and the now-dominant IF development system, but Inform (which has since been developed in very intriguing new directions) was not initially focused on expanding the possibilities of IF. Daniel Howe’s RiTa and Ben Fry and Casey Reas’s Processing have been developed first and foremost as general platforms, but have contributed along other lines. Nevertheless, projects that strive toward all three of these goals are rare.

I will be re-opening activity on Curveship this summer and would be glad to hear from people interested in using the system, as this will help me focus my efforts and create a release that works for the community interested in the system’s capabilities.

Curveship in AI Magazine

Tuesday 13 October 2009, 7:06 pm   /////  

Delightfully, the current issue of AI Magazine (Volume 30, number 3, Fall 2009) is on computational creativity. The number offers articles on the field overall; the history of workshops on the topic; computer models of creativity; and creative systems to generate music, stories and their tellings, moves of chess, and humor. The last article is computer-generated in high Hofstadter style.

Pablo Gervás’s contribution, “Computational Approaches to Storytelling and Creativity,” provides a clear introduction to the concept of creativity and the history of the term, analyzes the relevant features that storytelling systems can work upon, gives an outline of work in computational creativity so far, and continues with a capsule summary of several important storytelling systems. The last one of these is my system nn, which I renamed “Curveship” as I started focusing on a public release of the software.

In the nn system for interactive fiction (Montfort 2007) the user controls the main character of a story by introducing simple descriptions of what it should do, and the system responds with descriptions of the outcomes of the character’s actions. Within nn, the Narrator module [now called the Teller] provides storytelling functionality, so that the user can be “told” the story of the interaction so far. The Narrator module of nn addresses important issues in storytelling that had not been addressed by previous systems: order of presentation in narrative and focalization. Instead of telling events always in chronological order, the nn Narrator allows various alternative possibilities: flashbacks, flash-forwards, interleaving of events from two different time periods, telling events back to front. It also captures appropriate treatment of tense depending on the relative ordering of speech time, reference time, and event time. Focalization is handled by the use of different focalizer worlds [now called concepts] within the system. Aside from the actual world of the interactive fiction system, nn maintains additional separate worlds representing the individual perspectives and beliefs of different characters. These can be used to achieve correct treatment of focalization (telling the story from the point of view of specific characters). [pp. 57-58]

In discussing the systems, Gervás notes (and I agree) that the other systems he discussed, ranging from Klein’s Novel Writer and Meehan’s Talespin to The Virtual Storyteller and Riedl’s Fabulist, are system for inventing stories, while nn’s Narrator (Curveship’s Teller) is the only system for telling stories. He writes:

If the processes for inventing stories in the reviewed systems rate low in terms of creativity, the rating obtained by processes for telling stories is even sadder. The challenge of how to tell a story has received very little attention in general, and it is mostly tagged on as a final stage to systems that concentrate on inventing stories. The nn system is a notable exception in that it involves a significant effort to model computationally some of the basic elements contained in Genette’s work on narrative discourse (Genette 1980): relative order of presentation and focalization. However, all the systems that tell the stories they invent do in fact include default solutions to many of the technical challenges involved in telling a story. [p. 60]

Although Gervás has provided a good take on the system, I’ll just note one way in which Curveship (née nn) does a bit more than the article might suggest to reader and one way in which it does less.

Genette described five categories of narrative discourse: order, frequency, speed, mood (which includes focalization), and voice (which includes distance). Curveship can vary not only order and focalization; it also allows for significant variation in the other three categories. I hope this will be of practical interest to interactive fiction authors and to those seeking to teach narrative theory using Curveship. However, the main research advances that have been made so far are in the two areas that Gervás indicates: order and mood (specifically, focalization).

While Curveship can automatically creative narrative variation based on parameters, I have to note that I am not putting it forth as a creative system. This makes it unlike many of the programs discussed in Gervás’s article and in this issue of AI Magazine. Given a specification for telling (which is called a spin), the system can make the appropriate changes and generate suitable text. However, the system does not, by itself, determine how a story should be told. The code that individual IF authors and AI researchers write is needed to accomplish that task.

Of course, formalizing the elements of narrative variation is necessary for any principled system that is supposed to vary the telling of a story. I hope that Curveship’s Teller will be deeply relevant to work in the creative invention and telling of stories, and that it will be used not only to enable new sorts of learning systems and interactive fiction pieces but also, in modified or unmodified form, as a component of creative systems.

From nn to Curveship

Wednesday 12 August 2009, 1:08 am   //////  

This is the fourth in a series of posts about my interactive fiction system, Curveship.

I was recently asked to elaborate on the difference between nn (the research system I developed during my dissertation work at the University of Pennsylvania) and Curveship.

The most important difference is that nn is a research system that I used for making some advances related to computer science, computational linguistics, and narratology. The system was developed to prove certain points; it was used only by yours truly to implement narrative and text generation ideas and to run demos.

It worked pretty well for this. Using nn, I developed a new representation for the order of actions, one that can be used flexibly in text generation. I put together a string-with-slots representation used in templates, one that is much less cumbersome to use than a general abstract syntax representation. And I worked out how a focalizer world (now called a “concept”) can model an actor’s theory about the “real” or “actual” world that is central to an interactive fiction.

That’s not to say that you’d want to pick up this system, though, and start writing games in it. While nn in 2007 had all the basic components of an IF system (a parser, the ability to save an restore games, the ability to model a world), they were not all ready for prime time, because my development work was focused on trying to answer particular research questions.

So, I took the nn code and began working on a new project, Curveship. I wanted to release a system that was developed with other IF authors, other AI researchers, and other teachers of narrative theory and electronic literature in mind. Curveship is getting close to being this system – within a few months, I hope, I will get it to that point, with the help of a group of people, the Curveship crew, who are testing and commenting on pre-release versions.

Concretely, there are three main sorts of differences. First, bugs in nn that my limited use of the system didn’t expose have been fixed – and more will be. Second, there are improved capabilities that didn’t relate to my research goals, but which are important to IF authors. These range from better parsing and clarification (disambiguation) to better ways of formatting text to better capabilities for simulating physical aspects of the world. Finally, I have impeoved the interface, which includes changing the names of some components of the system. What used to be a “plan for narrating” is now “spin.” What I called “existents” (a perfectly nice but abstruse term from narratology) are now, more simply, called “items.” To avoid confusion, I even changed the name of the “Narrator” module, because “narrator” is a narrative function and a parameter that can be set within the system. This module is now called the “Teller.” There have been other name changes and a great deal of refactoring, some writing of docstrings, and other improvements to make the Curveship code more understandable and manipulable to those who want to get into it. The way string-with-slots templates are written has changed, too, as has the way items and actions are created.

The discussion of reply structures, focalizer worlds, and similar aspects of the system in previous publications (such as my dissertation) remains largely applicable to Curveship. But because Curveship is being developed with an eye toward a new group of author/programmers, researchers, and teachers, there have been many changes beyond the parts of nn that implement those core research contributions. Even some of publications and talks about Curveship from recent months have names for components that are now different and mention the old style string-with-slots formalism. That’s one of the reasons I’ve started in on this series of posts.

Worlds, Spin, and the Revolution of Curveship

Saturday 8 August 2009, 1:33 am   //////  

This is the third in a series of posts about my interactive fiction system, Curveship.

Before I start descending into detail, I’ll explain why I think Curveship is a big deal.

Curveship does the usual work of an interactive fiction system when it comes to simulating a world: There are discrete rooms that make up the fiction’s locations, actors can inhabit and wander around these rooms, and things can sit in them, be taken and carried off or otherwise moved around. Items can change state, so that a lamp, for instance, can be turned on and off. Items can go into or onto other items, if they allow it. None of this is surprising; plenty of interactive fiction development systems already do all of it very well.

Hypertexts don’t do that. Hypertexts, including Web hypertexts but also pieces in HyperCard, Storyspace, Twine, and similar systems, present a structured document in which some phrases are hooked up to other pages. They might have guard fields or other pieces of code, but at their most essential, they are really strange surfaces of text, with phrases connected in an unusual topology.

Nothing’s wrong with hypertext. If you want to create an unusual language surface, to link pages together into a curious structure, it’s clearly the form to use. The play and connection of language can be intriguing and relevant. You can make a compelling literary work in this form, as several people have done.

But interactive fiction systems allow something else. You can put a simulated world underneath the text that people see. This lets you create different types of literary systems, which can be nice: Several people have created interactive fiction systems that are compelling literary pieces and that couldn’t have been realized as hypertexts.

In an important way, Curveship is to interactive fiction what interactive fiction is to hypertext. Just as interactive fiction added a new and significant model – a model of a simulated world – Curveship adds a model of the telling, of the narrating, of the way that the simulated world is represented in language. Curveship adds spin, as in the spinning of a tale and as in Spin Alley.

Curveship can leave actions out of the narrative, can reorder actions in the narrative to create flashbacks and flashforwards and retrograde narration and narration by category, can narrate at greater or lesser length, and can represent several actions in one statement or repeat the narration of a single action several times. The system can tell about what is happening in the simulated world from the perspective of any specified actor, based on that actor’s knowledge and perceptions, or it can narrate from a global perspective. It can tell about what has happened in the past just as easily as it can represent a current action.

The system is able to do this because it models every action that happens in the world, just as existing IF systems model every item. First-order representations of actions differentiate Curveship from other IF systems. And on that of that, a complete text generation system has been built, allowing for grammatical changes that follow from high-level narrative parameters – the spin.

Consider The Odyssey. Why is it interesting? Why has it shaped world culture and remained memorable for thousands of years? Yes, lots of interesting stuff happens in it. But the way it is told is also tremendously compelling – Odysseus listening to the song of his own exploits, shielding his eyes and weeping, being identified as the great hero, and then going on to tell the next part of the story in his own voice. That’s as fascinating a part of The Odyssey as is the encounter with the Cyclops or the slaying of the suitors. And the telling surely becomes more important in contemporary literature. Is Lolita really more interesting because of what happens or because of how it is told? What about Ulysses? To the Lighthouse?

Curveship’s modeling of the telling adds to the significant power that IF already provides by way of a model of a simulated world. Just as IF adds a simulated world to hypertext, Curveship adds control over the telling (that is, it adds spin) to the simulated world.

Those who want to create strange surfaces of text will want to work in hypertext. Those who want to have a simulated world will probably use an existing IF system. For those who are interested in varying the telling, as many great authors have done in oral, written, typed, and word-processed literature, it will be best to use a simulated world and spin: Curveship.

A Lexicon of the Curveship World

Tuesday 4 August 2009, 1:03 pm   //////  

This is the second in a series of posts about my interactive fiction system, Curveship.

In writing about Curveship in any detail, I’ll have to use terms such as action, event, and order, which sound ordinary but are used in a special way in the system. Furthermore, I’ll have to use terms such as focalization and narratee, which do not sound ordinary, but have a meaning within narratology (a.k.a. narrative theory) and are important to the way Curveship works. I’m going to define a few of these terms – some I’ll save for later. Rather than sort them alphabetically, I’ll group them by how they figure in the system.

Worlds of Curveship

Actual World. Following Marie-Laure Ryan’s terminology, I consider the main, simulated interactive fiction world to be the “IF actual world,” that is, what is “actual” from the standpoint of the player characters and other actors. I’ve bothered to give this a special name (rather than just calling it the world) because it isn’t the only ball in play in Curveship.

Concept. A concept, formerly called a “focalizer world,” is a particular actor’s theory of the actual world, based on knowledge (put into a fiction file to begin with) and perceptions (gained as the actor moves around and looks at things). Concepts are almost never complete, and they may be wrong. They allow the telling of actions and the description of items to be focalized, that is, based on what a particular actor knows and sees.

What Exists in the World

Item. Basically, any object that has a representation. I could have called them “objects,” but that term means something different in object-oriented programming, even though items do end up being represented as objects. I could have called them “existents,” the term Seymour Chatman and other narratologists use, but that caused gnashing of teeth among some of the people I consulted, including one researcher whose first language wasn’t English. Items must be in one of three categories.

Actor. An item that can take action on its own, due to either code that an IF author has written or a script the author has dropped in. Any item can react, but only an actor can initiate action. Actors are also the only category of item that have concepts.

Cosmos. The special actor that is the root of the item tree. Responsible for earthquakes, power outages, and any occurrence where the author doesn’t want to model the cause as its own actor. The cosmos can also change the plan for narrating, which allows for a connection between the simulated world and the way the telling of this world is done.

Room. A discrete location which has exits leading to other rooms. Rooms are all on the first level of the item tree, directly below cosmos.

Thing. Generally, an inert item. Any item that isn’t a room and doesn’t need to act or have a concept is a thing. Things can react when something is done to them or done in the same room, so that pressing a switch on a lamp can cause the lamp to react by increasing its glow.

Item Tree. A structure representing all of the items in the actual world (or in a concept) and the relationship between them. It is a graph with a designated node (cosmos), directed links from parent to child, and no loops – that is, no item is its own descendant. Hence, a tree.

Parent-Child Relationship. The relationship between an item and an item a level under it, and connected by a link, in the tree. When an actor walks into a room, he or she becomes the child of the room. If the room moves (perhaps it’s an elevator) the actor will move with it. If the lights in the room become brighter, the actor and everything else in the room will be better illuminated. An apple placed in a sack similarly becomes the child of the sack and, for instance, is stolen if the sack is stolen.

Link. The edges (as they are called in graph theory) of the item tree, each one connecting an item to another item and indicating a parent-child relationship. Links are labeled, with the label indicating more about the relationship. If a person is holding a sack with an apple inside and wearing a cloak, the sack and cloak are the children of the person and the apple is the child of the sack. Furthermore, the link between the sack and the person is labeled “of” (indicating a possession) and the link between the cloak and the person is “on” (indicating something being worn). The link between the apple and the sack is “in” (indicating containment). If you have ever tried to use Inform 6 to model a desk that you can put things on (on top of) and in (in a drawer), something which is not very straightforward to do, you will see an advantage to the way Curveship works.

What Happens in the World

Action. A specific but fairly high-level action taken by an actor. An intended command (such as “get lamp”) usually corresponds to a single action. It also usually doesn’t make sense for an action to partly succeed; it either works or doesn’t, although the first components of it may succeed and later ones may fail. The set of actions is open. Authors can easily make up new ones. Actions are what the system narrates, because they are meaningful and high-level.

Event. A lower-level component of action. There are only five, representing different things to be done in the world. Any action is made of one or more of these with appropriate arguments. The five primitive events are sense, impel, misc, modify, and configure. Only the last two change the state of the actual world, modify by changing a feature of an item and configure by changing the item tree. Events are good for simulating the world – unlocking and opening doors, moving actors from room to room, and so on. But because they are so low-level, they are not very good as a basis for narration. We usually do not want to hear that an actor exerted force on a switch, then turned the lamp on, and then increased the glow of the lamp. But it’s nice to be modeling this under the hood, because if the lamp’s battery is dead, an actor might be able to do the first two things but not the third. If the battery is then replaced, the lamp should glow brightly right away, since the switch is in the on position.

Files of Curveship

Fiction File. What others call the “story file” or “game.” It can be a game, of course. Essentially, though, it defines a fictional (and simulated) world.

Spin File. A very short file with a few parameters and perhaps a bit of code, all of which could be included in a fiction file. These parameters determine how the story is told at a fairly high level. Released games probably won’t use spin files, but sets of these may be used in research and teaching dealing with narrative, because they allow different methods of telling to be applied to the same fiction file (or a set of fiction files).

These are the building blocks of the simulation done in Curveship. I should note that Curveship is designed to mainly simulate the physical world, not emotional states or conversations between actors. And, of course, it models the way actions are represented and items are described based on concepts of that world – it narrates in different ways based on parameters and code provided by IF authors. I’ll discuss how it does that in a future post.

Introducing Curveship

Tuesday 28 July 2009, 1:37 pm   //////  

This is the first of a series of posts about my interactive fiction system, Curveship.

Curveship is an interactive fiction development system that provides a model of a physical world, and its workings, as do existing state-of-the-art IF systems (such as Inform 6, Inform 7, TADS 2, and TADS 3). It will not have as many libraries, and will have no multimedia features, when it is released, but it will provide another significant capability: it will allow IF authors to write programs that manipulate the telling of the story (the way actions are represented and items are described) as easily as the state of the IF world can now be changed. While existing IF systems allow for the simulation of a character who can move around and change the state of the world, Curveship provides for control over the narrator, who can tell as if present at the events or as if looking back on them, who can tell events out of order, creating flashbacks or narrating what happens by category, and who can focalize any character, not just a fixed PC or a hard-coded series of them, to tell the story from the perspective of that character’s knowledge and perceptions.

Curveship will have a closed round of testing and revision soon, and will be publicly released soon thereafter. This may happen as early as the end of summer, but if that timing makes little sense for the project or the IF community (IF programmers may be too busy finishing their IF Comp games at that point) the release could happen later.

I have had a very short page about the system up for a while at Curveship.com. As it explains in slightly more detail, the system’s starting point was my too-cleverly-named research system nn. I have been working for a while to get a usable programming interface set, to clean up the code, and to add some capabilities that are necessary for a usable IF system but didn’t have much research value to me, at least initially. Finally, the name of the system comes from a poem by Hart Crane. “Curveship is being fashioned to model the essential qualities of variation—the curve of a story through its telling—just as friendship and authorship represent the essence of being a friend and author.”

I’ve recently given a talk about the system to a group of roboticists and computational linguists at a workshop, and more recently (yesterday) got to discuss the practicalities and details of the system a bit with the Boston IF group; those folks provided some good suggestions at the levels I’m most concerned about now. I’m now going to begin writing, as often as I can, about the system, what principles it is based on, and how it works at high and low levels.

Curveship is a Python framework; to write a fiction file you simply write some Python code, instantiating classes for the most part, writing your own subclasses if you want items to do something unusual. There are a few fairly radical differences between Curveship and existing IF systems, but the two that will probably be most visible are the modeling of actions and the string-with-slots representation that is used for text generation. In Curveship, items do not change their own state. Changes of state, and the movement of items from one place or container to another, are accomplished only by actions. And, when actions are narrated or objects described, this is done based on a formalism that is a bit harder to write than a simple string would be. These are two of the the main aspects of Curveship that, although they demand more work from the IF author, allow for powerful, general ways of narrating.

Ideally, as I continue these posts, I’d like to write in response to your particular interests and curiosities. I’ll be glad to answer questions in comments if there’s a reasonably sort answer; if not, I’ll try to answer them in the context of a longer post.

Next Page »
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2014 Post Position | Barecity theme