Narrative States

Understanding how player stats map to story outcomes can be a challenge. This article looks at some strategies for simplifying and visualizing complex state spaces, including the use of ternary plots.

Last week I tweeted about the concept of narrative states and how to plot and think about them. This post is a bit of an expansion on that tweet thread. Thanks to everyone who responded there. I’ve answered some of the questions I received, and added some extra resources and images.


Suppose we have a dating sim where outcome is decided by the player’s relationship stats to three characters, and the player has loads of chances to increase relationship with any/all of them. It can be tricky to reason about the design of this.

However, we might choose to make the outcome of our story depend on which suitor we currently like best. Now we can collect a score every time we do something that indicates liking a particular character, and then calculate percentage of interest in each character, thus:

darcy_percentage = darcy_likes / (darcy_likes + wickham_likes + collins_likes)

Needless to say, this value is undefined until the player has expressed an interest in at least one character. Do not divide by zero.

Darcy’s percentage, Wickham’s percentage, and Collins’ percentage have to add up to 100%, which means that we can plot these three variables in two dimensions, with a ternary plot. Three suitors, four story outcomes.

We have four outcomes — one for if the player is more than 50% invested in each suitor, and a fourth outcome if they’ve not given a majority preference to anyone.

Immediately this chart shows us where the player might get confused or frustrated about why they got the outcome they did — because there are some points of really abrupt state transition.

At the corners between states, a single player action could flip the outcome to another suitor or to the solitude action. This can feel abrupt and confusing.

We can tweak this a couple of ways.

Continue reading “Narrative States”

Mailbag: IF and game writers

As you studied IF for a long time, would you think IF writers are videogame professional writers, or those are 2 separated groups of people ? And would you be able to estimate the number of IF writers ? 

[I’ve edited out a number of side points, but the longer letter also made clear that the writer is interesting in building a tool and/or platform, and is curious about the possible market for this tool and the ways people might use it. — Ed.]

Headcount is a very hard question to answer, because there is no longer one single “IF Community” — I mean, really there never was, but lately there has been much more of a diaspora. The Twine space or the Choice of Games space don’t always overlap and aren’t even always that visible to people working with the parser interactive fiction tradition (and vice versa); and then you’ve got huge, huge numbers of people who are doing interactive story of some kind but only within an app like Episode.

As for the skills you might find among IF writers, that’s again a spectrum. If you went back to 1998 and looked at who was writing IF then, you’d have found a community that was somewhat-to-very technically skilled, since writing code was necessary for almost all the projects that called themselves IF; but also pretty much entirely amateur, since almost no one had ever done any IF writing for pay. 

Now by contrast you would find that there are

  • gig-economy creators who have created technically simple projects and sold them on platforms (like Episodes or Kindle ebooks) that are designed for low barriers to entry; or who have built up some following on Patreon
  • technical inventors and academics who have built very complex and ambitious projects but never worked in the game industry at all; 
  • successful authors in linear media like Cassandra Khaw and Max Gladstone who have made a crossover to working with interactivity;
  • grant-funded interactive media artists who are often experimenting with form or subject matter features that wouldn’t necessarily work as for-market projects
  • well-known professional game writers and/or designers like Liz England, Meghna Jayanth, Jon Ingold, Brendan Hennessy, or Leigh Alexander; these may have background experience with interactive fiction or might still create some text-focused projects at times

So some of those people might be drawn to a new platform. Others, though, already have plenty of venues to publish, or on the other hand are engaged in IF precisely because it gives them a space where they can experiment, build weird science projects, or create personally meaningful art.

Then the question becomes: what could a new platform offer that would appeal to the largest possible subset of the above?

  • the ability easily to deliver experiences that people currently want to build but for some reason cannot — but then you have to figure out what there’s the most thirst to do — I haven’t done this in a few years so the answers are no doubt very out of date, but in the past I’ve run some informal interviews and surveys to find out what people found most vexingly absent from current platforms. Those surveys come from 2014, so there’s definitely room for new research here
  • an audience
  • money — but money typically follows from the audience, and if you had a space were new works got thousands or tens of thousands of readers, you’d definitely find at least some IF authors bringing their work there even if no cash were exchanged.

The Unknown (1999) and Polyphonic Hypertext

The Unknown is a multi-author hypertext about the three creators going on a book tour.

A screen of The Unknown, explaining as a dialogue between the authors what the project of The Unknown will be.

The Unknown (1999) begins with a page in which its authors are arguing with each other about how to write their new project.

Next, the authors offer a tutorial for interaction, by stating that they don’t want the kind of reader who would require such a tutorial.

Then we discover that the content of this book is a series of vignettes from an imaginary drug-fueled tour in which they’re terrorizing bookstores around the country by reading from their work, The Unknown. A lot of the specific incidents involve getting drunk, or taking drugs, or having a bit of a Hunter S. Thompson ramble; making sure, also, to instruct the reader that this is what they are up to:

A variant of this work, sort of, is now available in print form, as a bound book, thus bringing to life the thing they claimed to have been hawking all over the country. This fact is also documented inside The Unknown, because the documentary about The Unknown is incorporated into The Unknown as part of its substance.

A clickable map of all the places the protagonists speak on their book tour.

This particular piece is available to play, free, online, and you can link into any page of it, which is a convenience.

It’s also a bit friendlier to play than many of its contemporaries. Aside from the links between lexia, the authors offer several indices to the work: a map, a list of the bookstores around the country at which (fictionally) they presented The Unknown, a list of people who are mentioned somewhere in the work. Then there are also six colored “lines,” thematic organizations of material, which bear names like “Parts of Their Story” and “Metafictional Bullshit”.

Perhaps this makes me precisely the sort of reader too amateur for their work, but I was grateful for the structural help.

So in fact, for me, The Unknown does succeed — albeit perhaps in the most self-conscious way imaginable — at being more accessible than many other literary hypertexts of the 1990s. I feel like I understand where this hypertext comes from and what it was trying to do, and I have several available strategies for reading it and theorizing about it. At the same time, it remains very very very inside baseball.

Continue reading “The Unknown (1999) and Polyphonic Hypertext”

Mailbag: IF for Reinforcement Learning

Hi Emily

I’m a PhD student working with Prof. Mark Riedl at Georgia Tech and Microsoft Research Redmond. I am currently working on making AI agents (specifically using reinforcement learning) that play interactive fiction games (text-adventure games in the vein of Zork) in a non-game specific, generalizable way.

I was advised by Prof. Janet Murray that you would be the right person to help answer a question I had regarding these games, given your expertise in interactive fiction. If you have a list of such games (e.g. those given here https://github.com/microsoft/jericho#supported-games), is it possible to identify a subset of maybe ~10-15 of them that reasonably cover a majority of all interactive fiction games in terms of game structure, i.e. linearity of progression/score accumulation from the perspective of a learning agent? If it is possible, what would this set look like? Any insight at all would be great.

Nice to hear from you — I’ve been keeping an eye on this space as people have been publishing about it recently.

I’m not sure there’s a perfect answer to this, since IF is hugely varied in how it handles world model, score, pacing, etc. Also, your list here skews very much towards early interactive fiction, which means it doesn’t cover some of the formal experiments that came along later.

I also don’t remember how score works in all the games in this list — some of them I’ve not played, or played a long time ago.

However, with that in mind, here are a couple of categories that represent some fairly standard game structures:

Short or medium game in which score is given out rarely — Lost Pig (max 7)

Short or medium game in which score is given more frequently — Meteor etc. (max 30), Balances (max 51)

Long game in which score is distributed fairly frequently throughout — Adventure, Zork; possibly Enchanter and Sorcerer also; Anchorhead, as I recall

And from your list, I recall these being ones that might pose an interesting challenge:

Curses — it’s long, it’s complicated, it does have a scoring system which it doles out gradually, and it also does a trick (if I’m remembering right) where it actually at one point deducts score from the player again. 

Wishbringer — this one’s interesting because there’s a scoring system that reacts to how many times you’ve used the magic stone in the game — so the more you use wishes, the easier the game becomes, but the lower your final score.

Hunter, in Darkness — doesn’t keep score. There’s also a procedurally generated maze in this, which I would expect to make it very challenging indeed.

Thinking about games not on your list, here are some other formal extremes that might be interesting to try to reason about; all of these can be found on https://ifdb.tads.org/ and in most cases they’re available for download.

ASCII and the Argonauts — an intentionally short and simple game that gives a bunch of +1 rewards for doing basic tasks; the relatively small verb set might make it easier than some of the other games.

Aisle — a game that takes one move to play, and for which many different verbs are available; there’s also no score. It’s hard to imagine how one would use reinforcement learning on this, but it represents one extreme that might be valuable for purposes of thought experiment.

Adventurer’s Consumer Guide — as I recall this one gives out a pretty steady stream of +1 point rewards, rather than only a few or only rarer rewards, so it might be a nice counterpoint to some of the others.

Savoir-Faire — a game of mine, and I suggest it just because I happen to know it well enough to know how the rewards work; there are frequent opportunities for scoring and some rewards are bigger than others.

Bronze — a game that I wrote that keeps track of how many rooms you’ve explored and triggers certain narrative events when you’ve found more of the space, so you could use the explored-rooms count as a secondary signal to score and probably get some useful reinforcement out of that aspect as well.

Captain Verdeterre’s Plunder — gives you a score based on how much loot you managed to rescue off a sinking ship before it goes under. Genuinely an interesting optimization problem; human players have competed to try to come up with the highest-score possible traversal.

Journey to Alpha Centauri in Real Time — as the name would suggest, this takes place over a certain amount of elapsing real time and therefore it’s not possible to finish, because it’s representing a very long journey in space.

Rematch — a game in which the challenge is to figure out a single very long command that will solve the game in a single move, and in which there is a cyclical pattern to the initial world set-up. (I think this one is not a z-machine game, so it might not work with Jericho.)

Zero Sum Game — starts with a score and counts down to zero (but this may be less interesting than the others since you could just reverse the sign of the signal and wind up with something equally valid).

Hadean Lands — fiendishly hard puzzle game, in which instead of score you’re gaining access to lots of objects which could arguably be used as a proxy for progress. Also features areas where the player has to do similar things in slightly different ways.

Former Canon

There are quite a few games from the 1990s and early 2000s that are still routinely mentioned in roundups of key interactive fiction. And then there are others that felt equally or almost equally important at the time, that were commonly discussed in theoretical conversations about the state of the art, but that tend not to be remembered now nearly so often.

This list is an attempt to surface some of those games, either for interest value or because some of them really are still a lot of fun to play and worth looking back at.

John’s Fire Witch (John Baker, 1995) — from a modern perspective, this is arguably another one of any number of IF Comp-length text adventures with a pretty standard fantasy puzzle concept. At the time, there weren’t very many short games in this genre, so the concept of something accessibly-sized was notable.

Rematch (Andrew Pontious, 2000) — occasionally still mentioned by people who have been around a while, Rematch was an experiment in player expressivity and puzzle design that presented an extreme edge case of what is possible with parser IF. I tend to think of it as a bookend to Aisle: both are one-move games with a story to tell, both push the range of what we expect from parser interaction. But where Aisle simply recognizes lots and lots and lots of commands, Rematch recognizes very long and complex commands, where you’re requesting other people to do multi-part tasks for you.

Mystery Science Theatre 3000 Presents “Detective” (C. E. Forman, Graeme Cree, and Stuart Moore) — Interesting for the way it framed another work, though also in some ways a bit mean-spirited, this piece reimplements another, older work and then provides a running commentary upon that work’s failings. (It is neither as kind nor as inventive as the much more recent Re: Dragon that reframes a different entire game. At the same time, there was something interesting and daring about this: perhaps because, up to around this point, people tended to regard IF as so much effort to create that vaguely troll-y joke games weren’t that common, and neither were games that existed primarily as commentary.)

Pick Up the Phone Booth and Die (Rob Noyes, 1996) — A very short game about doing the title action and receiving the title result. But this was sufficiently entertaining to people that there were loads of spin-off joke games as well.

Sunset Over Savannah (Ivan Cockrum, 1997) — This game implemented a gorgeous beach full of meticulously interactive objects (sand to play with, underwater sequences…) and was one of the things I aspired to when I was working on simulation elements in my own games.

Worlds Apart (Suzanne Britton, 1999) — Huge and imaginative science fiction/fantasy game with many, many convenience features for the player. If you played Blue Lacuna and now want more, maybe check this out.

In the End (Joe Mason, 1996) — an early example of puzzle-less IF that took on serious subject matter instead, looking at the case of a character who is facing some serious problems and trauma.

She’s Got a Thing for a Spring (Brent VanFossen, 1997) — Prior to about 2000, this game was considered a gold standard for NPC interaction. There’s a non-player character named Bob who has loads of dialogue as well as an entire routine to how he goes about his day. The game has some other notable qualities, like an interest in landscape that sort of prefigured The Fire Tower.

Delusions (CE Forman, 1996) — one of the first hobbyist IF games I played, after Curses. It’s big, and I remember it being difficult and a bit confusing, but also ambitious and interesting. It involves a protagonist who isn’t exactly what you think, and the way your perceptions break down around you hadn’t been done much before. It was also, for the time, very technically sophisticated.

Other resources:

Post-Spirit

Usually I use the first Tuesday of the month for a book review on some book about writing or game design or narrative. This month, I’ve had enough going on that I don’t have such a review ready.

Instead, some news: for a bit over three years, I’ve been at Spirit AI, first leading the Character Engine product and then for the past seven months as Chief Product Officer.

That has been an amazing experience in many ways — educational, inspiring, and requiring a huge amount of growth. I am immensely grateful for the opportunity to do that job, and very fond of the people I worked with. I still believe in the mission of both products.

That process also, however, meant more and more distance from creative, technical, and design work, and I found that I didn’t want to sustain that path indefinitely. So I have left Spirit: yesterday was my last day. (I think I’ve fixed all the places in social media profiles that say otherwise, but if you find something else I should fix, ping me and I’ll fix it.)

In the short term, I’m doing a little contracting. Also getting a bit of a rest, because this has been almost as intense as it has been enjoyable. And maybe playing some IF Comp games.