Argument Maps for Unscripted Conversation
The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company.
The previous post described how NPCs can automatically answer methodology questions like, "why did you deceive the drawbridge guard?" via leftover data in the AI's planning tree. "Well I tried to befriend him with a funny story but it didn't work." But what if the player follows up with a different flavor of why, pushing the conversation into more abstract territory: "No, what I mean is, isn't it wrong to deceive?" There is another kind of structure which holds this kind of information, and academia calls it an argument map.
Unlike a planning tree whose nodes each have an imperative sentence, an argument map's nodes each have a simple declarative sentence. For an example we will use the old chestnut, "Socrates is a man. All men are mortal. Therefore, Socrates is mortal."
The conclusion, or claim if someone in the room disagrees with it, is the root node while the premises support it. An argument map lays additional rules on such a diagram. First, the noun phrases of the nodes must form a circularly linked list, with no noun phrase left unused. This is because commonsense statements like "humans are mortal" are rarely spoken. If one wanted evidence that Socrates is mortal, simply pointing out that he is human usually suffices. The fact that all humans are mortal is taken for granted. But a primary purpose of an argument map is to expose such assumptions so they may be disputed if need be. Our example obeys this rule.
Once satisfied, the supporting premises collectively form a single reason in favor of the claim. This also means that asking why in an argument map moves away from the root node, while in a planning tree it would move us toward the root. We can label the linkage with "because", and since the structure of an argument map is always a tree, we game programmers might rather call an argument map a because tree or a reasoning tree.
Additional reasons are attached similarly, each reason forming its own circular links with its parent node. An argument map also contains reasons against the claim, called objections. For objections some sort of negation appears such as "not" in a verb phrase or an antonym as a noun phrase. In our diagram we'll color objections red and supporting reasons green.
New reasons, either in favor or not, attach to a pre-existing premise, not to a reason as a whole. To illustrate, the next diagram takes a well-known example from Bioshock stating that it is wrong to treat the Little Sisters as batteries rather than people, and gives a sole supporting reason. Three counter-reasons arise, comprising two different angles of attack.
Note that each reason (either red or green) still obeys the circular links rule with its parent premise. Additionally, the root node is itself a premise, which can situate this tree within an even larger one.
There's more to argument maps than just what this brief introduction shows. For example, rule number two states that if a noun phrase uses a subset, such as "some Little Sisters", then another reason must use "the other Little Sisters" to retain the full domain of the argument. Both planning trees and reasoning trees hold the general rule that broader ideas are nearer the root node. And both kinds of tree can share the same commonsense information, such as locked doors being impassible without a key. But the primary use of a reasoning tree in games is this: if constructed beforehand, a player can ask NPCs questions by constructing them from the game's palette of nouns and verbs, and NPCs can sensibly answer those questions, no conversation menus or heavy scripting required.
[For more information on argument mapping, see Dr. Tim van Gelder's in-depth tutorial at Austhink.]