Inform 7, Authorship and the Second Person

The pervasiveness of optimism among programmers deserves more than a flip analysis. Dorothy Sayers, in her excellent book, The Mind of the Maker, divides creative activity into three stages: the idea, the implementation, and the interaction. A book, then, or a computer, or a program comes into existence first as an ideal construct, built outside time and space, but complete in the mind of the author. It is realized in time and space, by pen, ink, and paper, or by wire, silicon, and ferrite. The creation is complete when someone reads the book, uses the computer, or runs the program, thereby interacting with the mind of the maker.

This description, which Miss Sayers uses to illuminate not only human creative activity but also the Christian doctrine of the Trinity, will help us in our present task. For the human makers of things, the incompletenesses and inconsistencies of our ideas become clear only during implementation. Thus it is that writing, experimentation, “working out” are essential disciplines for the theoretician.

Frederick Brooks – The Mythical Man-Month

I’ve recently spent quite a bit of time playing with a piece of software called Inform 7, which is a wonderfully designed programming language and IDE written specifically for the creation of text adventure games (or ‘interactive fiction’ as the fans of that type of game prefer to call it).

Many people will have only a vague recollection of those games, which were popular in the 1980s – probably the best-known example is now the Hitch-Hiker’s Guide To The Galaxy, which has retained a following thanks to being based on the popular radio show (and books, TV show, towel…). Essentially, these games involve the computer printing out a description of the events in a story, and the player, taking the part of the protagonist, typing in commands. They’re something like the Choose Your Own Adventure and Fighting Fantasy gamebooks that were popular at the same time, except theoretically more open-ended – you weren’t given a choice of what to type, you could enter what you like, and the computer would respond. Of course, the response would usually be “I don’t understand” or “I don’t see that here” or “You can’t do that”, but the *feeling* of open-endedness was the important thing.

After the collapse of the text-adventure game market in the late 80s/early 90s, some people still kept on writing these things, intrigued more by the possibilities inherent in the form than the quality of the works themselves. Some people ( for example Andrew Plotkin and Emily Short) created genuine art in this form, but it’s still a hobbyists’ area – playing them feels like reading pre-Eisner comics or watching pre-Welles film.

And there are significant barriers to entry into these games. Deliberately or not (I suspect a little of both), the ‘IF community’ is, seen from the outside, very insular and communicates almost entirely through Usenet. Most games are also never compiled to executable code – and nor are they compiled to Java bytecode, which most people can run without problems. Rather they are compiled to z-code, a virtual machine that was used by Infocom, one of the old games companies, and that had to be re-created for this purpose – even though z-code has some *huge* technical limitations (like being unable to cope with a game bigger than 512k), and even though this means that anyone wanting to play one of these games must first download an entirely separate program to run them.

However, some of the people in that ‘community’ have done some very interesting work, but nothing as interesting as Inform 7, a programming language created to be used by writers, not programmers, and which is the closest thing I’ve seen to a true natural language parser (albeit one with a very clearly defined scope).

my belief that the natural language for writing IF is natural language is based ultimately on the special nature of interactive fiction. IF is based on a dialogue of text between reader (or “player”) and computer, with both directions of communication prompted by textual possibilities supplied by the author. That means we have three agents describing the same situations — author, computer, player — and in an orthodox programming language such as Inform 6, the same idea accordingly has three different expressions. To specify a typical object, the author must specify all three of these: the source code constant willow _ pattern _ vase, the description text “willow pattern vase” and the parsing data ‘willow’ ‘pattern’ ‘vase’ used to recognise the object in the player’s typed commands. But words are just words, and it is repetitious and artificial to have to write them differently all three ways. A natural language description simply refers to “a willow pattern vase”. It collapses the separation between author and player.

The facing pages are the forum for interplay between the writer and the computer. Inevitably this dialogue is led by the human, typing the source text on the left, and the computer’s part is reactive, producing replies. In most languages programming has a code-compile-test cycle, where the compiler often rejects the code and forces the author to make corrections. This is not unlike the experience of playing through IF: think of something, try it out, make progress.

Graham Nelson Natural Language, Semantic Analysis and Interactive Fiction

Inform 7 is a remarkable language, totally unlike anything I’ve seen before (for computer people the closest I can come to a description is a combination of Python and SHRDLU, but relational rather than object-oriented or procedural). Its aim, essentially, is to let the programmer write in the same subset of natural language in which the player will communicate with the player. It makes for remarkably simple communication – as an example, here’s a ‘game’ which took me approximately two minutes to write:

“Example” by “andrew hickey”

The Fortress Of Solitude is a room. The description of the fortress of solitude is “An empty, cold, lonely place – the kind of place a God would enter when he needed to cast off his humanity for a short time.” The South Pole is a room. The South Pole is outside from the fortress of solitude.

Superman is a man. Superman is in the Fortress Of Solitude.
A lead box is in the fortress. Kryptonite is a thing. Kyptonite is in the box. The box is closed. The box is not transparent. The box is openable.

After opening the box:
Say “‘How could you bring Kryptonite here?’ shouts Superman, and he flees”;
try Superman going outside.

That is perfectly legitimate Inform 7 code, and runs. When run you get output something like the following:

Fortress Of Solitude
An empty, cold, lonely place – the kind of place a God would enter when he needed to cast off his humanity for a short time.
You can see Superman and a lead box (closed) here.
>get box
>open box
“How could you bring Kryptonite here?” shouts Superman, and he flees
Superman goes outside.

Possibly not the most exciting game ever, but I hope you get the point – the language used by the player and the writer of the game or story is the same.

This makes it a conversation, but the interesting question to my mind is who it’s a conversation *between*. Because as you can see even from that tiny example, most of the text that’s output is generated automatically, not written by the author. It’s at minimum a three-way conversation between the writer of the game, the writer of the parser (primarily Graham Nelson) and the player. Which is interesting in itself.

But change the paragraph starting “After opening the box” to read

Instead of opening the box:
Say “You’d never do that – it has Kryptonite in it! That’s more the kind of thing I would do, but then I am a supervillain.”

And we can see the real potentials here. We’ve defined a player character who wouldn’t do certain things, and a narratorial voice that would. And those are two new conversationalists. Because the narrator’s personality is only partly defined by the writer – anything not specifically coded by the writer will be automatically generated by the parser in response to the player’s input. And the player character’s personality is defined by the actions s/he won’t take, the actions the player will take, and the intersection between them. (It’s also possible to create non-player characters who have their own personalities and drives, surprisingly easily, using this system).

Even more interestingly, the player character is almost always referred to as ‘you’. There’s an elision of player and character there that is sometimes played with by writers of IF (as it’s known for short) but has never been used to the full.

There’s a tremendous potential here, so far almost entirely untapped, for truly great art, playing with notions of self and authorial intent and levels of reality and the nature of intelligence and a lot of the other things that I just eat up. Imagine an interactive fiction playing with these things the way the last few issues of Promethea do. Or even better, imagine an IF equivalent of the “I can see you!” moment in Animal Man – playing a game, ordering a character around until suddenly it turns round and argues with you. Done properly, it could be quite amazing.

I keep playing with Inform, but I simply don’t have the writing skills to create anything worthwhile with it. But I guarantee that if this tool gets into the hands of enough people with imagination, the next Alan Moore or Grant Morrison may well be working in a medium that most people wrote off twenty years ago. I’d *LOVE* to see what someone with real talent could do with this…

[ETA – That’s not to say that Plotkin, Short, Nelson et al don’t have ‘real talent’ – but the stuff they’re writing doesn’t do the kind of thing I’m imagining…]

This entry was posted in computing and tagged , , , , , , , , . Bookmark the permalink.

2 Responses to Inform 7, Authorship and the Second Person

  1. Pingback: Inform Update « Sci-Ence! Justice Leak!

  2. Pingback: Ada Lovelace Day: Emily Short « Sci-Ence! Justice Leak!

Comments are closed.