| Chapter 13: Relations |

| 13.14. What are relations for?

It is easy to say what verbs are for: they are to express relations. But what are relations for?

Inform 7's focus on relations between objects is unusual as an approach to interactive fiction; the concept does not exist in most design systems, or rather, it does but is submerged. Traditional design systems do, after all, have the spatial relations of being inside, on top of, and so on. It could well be said that these are the only relationships that inanimate objects ever have. A stone can be on top of a table, and if so then that expresses their entire association.

This is because the stone, and the table, have no opinions, emotions, knowledge or memory. If the stone is taken away and then put back, nothing has changed. People, on the other hand, tend to remember having met each other before; they like being in some places, but not others; their behaviour depends on who, or what, is nearby. Being conscious, they have internal states, unlike the stone. Relations are a simple but powerful way to express and talk about such connections, and although they have numerous uses in physical contexts too, they are at their most powerful when helping to make the characters of interactive fiction come alive.

192
| Example Murder on the Orient Express A number of sleuths (the player among them) find themselves aboard the Orient Express, where a murder has taken place, and one of them is apparently the culprit. Naturally they do not agree on whom, but there is physical evidence which may change their minds...

The following example creates two new relations, and two new verbs, in order to set up a tangled web of intrigue. "Murder on the Orient Express" The Dining Car is a room. Lord Peter is a man in the Dining Car. Sherlock Holmes is a man in the Dining Car. Miss Marple is a woman in the Dining Car. Adam Dalgliesh is a man in the Dining Car. Suspecting relates various people to one person. The verb to suspect (he suspects, they suspect, he suspected, it is suspected) implies the suspecting relation. Dalgliesh suspects Holmes. Holmes suspects Lord Peter. Lord Peter suspects Holmes. Miss Marple suspects the player. Exculpating relates one thing to various people. The verb to exculpate (it exculpates, they exculpate, it exculpated, he is exculpated) implies the exculpating relation. The silver bullet exculpates the player. The pipe ash exculpates Holmes. The poison pen letter exculpates Lord Peter. The poison pen letter exculpates Miss Marple. [Poor Dalgliesh. I guess he did it.] The pipe ash, the letter and the silver bullet are carried. Given this, we can then set up elaborate rules: Instead of showing something to a person who suspects the player: say "'You would say that,' remarks [the second noun] darkly.". Instead of showing something which exculpates the player to someone: say "'How striking!' says [the second noun]. 'Almost I begin to distrust myself.'". Test me with "show the letter to miss marple / show the silver bullet to holmes". And so on: "if Dalgliesh suspects someone who is exculpated by something carried by the player...", for instance, makes a fitting final example for this chapter. The description someone who is exculpated by something carried by the player expresses a complicated idea in very few words, and in such a way that a passer-by looking at the source text would immediately see what was meant. The moral is that relations allow sophisticated patterns of behaviour to be created in a way that reads back naturally as English.

193
| Example Mathematical view of relations Some notes on relations from a mathematical point of view, provided only to clarify some technicalities for those who are interested.

194
| Example Graph-theory view of relations Some notes on relations from the point of view of graph theory.

Previous | Contents | Next