Chapter 7: Other Characters
7.11. Character Knowledge and Reasoning

A character may be endowed with knowledge and even reasoning skills. Relations form quite a good way of keeping track of such problems: for instance, we can allow characters to be acquainted with one another with a relation such as

Lucy knows Lady Cardew.

Or we might keep track of more complicated attitudes between characters, as in Murder on the Orient Express, in which some characters suspect others of the crime.

Alternatively, we might have a list of salient facts that are important in our game. We might declare these as values, and then characters could know, learn, and forget entries as appropriate:

A fact is a kind of value. Some facts are defined by the Table of All Known Facts.

Knowledge relates various people to various facts. The verb to know (he knows, they know, he knew, it is known) implies the knowledge relation.

Table of All Known Facts
fact summary
shoe-size "Lucy wears a size 9 shoe."
sunset-time "Sunset is at 8:22 PM this evening."

Lucy knows shoe-size.
Bob knows sunset-time and shoe-size.

Or again we might keep a whole database of information in a table: the characters in Questionable Revolutions know dates, countries, and a short description for each of several rebellions and popular uprisings, while in Queen of Sheba, Solomon is able to answer who, what, where, when, and why questions about a range of topics. This kind of approach is most useful when the characters need to display a deep knowledge of a particular field. The facts stored in the Table of All Known Facts, above, are comparatively sparse, because there we are designing a game in which not all data about the world is equally valuable: Lucy doesn't know the shoe size of every person in the game, because for some reason it is only her own shoe size that matters. On the other hand, the Table of All Known Facts can store different kinds of information, whereas the revolutions table has no way of storing shoe sizes or sunset times. And Murder on the Orient Express works differently again, because it is storing knowledge that concerns people and things that already exist in the world model, rather than abstract ideas. Our way of modeling character knowledge, in other words, will depend quite a lot on what kind of knowledge it is.

The possibilities of character reasoning are similarly broad, but The Problem of Edith introduces one kind: the character has a concept of how different conversation topics relate to one another, so that when she is asked about a new keyword, she picks a response that makes the question most relevant to the conversation already in progress.

We end with a longer scenario, in which we track what the character knows about the player and the conversational state: in Chronic Hinting Syndrome, the main character guides conversation in the direction he intends it to go, with the player's sometimes-reluctant participation.

* See Obedient Characters for a character who needs to be taught how to perform actions before doing them

* See Characters Following a Script for a programmable robot who can be given whole sequences of actions to perform


242
** 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...

WI

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.

268
*** Example  Questionable Revolutions
An expansion on the previous idea, only this time we store information and let characters answer depending on their expertise in a given area.

WI
267
*** Example  The Queen of Sheba
Allowing the player to use question words, and using that information to modify the response given by the other character.

WI
235
*** Example  The Problem of Edith
A conversation in which the main character tries to build logical connections between what the player is saying now and what went immediately before.

WI
328
**** Example  Chronic Hinting Syndrome
Using name-printing rules to keep track of whether the player knows about objects, and also to highlight things he might want to follow up.

WI


PreviousContentsNext