![[*]](foot_motif.gif)
Roy M. Turner
Department of Computer Science
University of Maine
Orono, Maine 04469 USA
Electronic mail: rmt@umcs.maine.edu
Humans and other animals are exquisitely attuned to their context. Context affects almost all aspects of behavior, and it does so for the most part automatically, without conscious reasoning effort. This would be a very useful property for an artificial agent to have: upon recognizing its context, the agent's behavior would automatically adjust to fit it. This paper describes context-mediated behavior (CMB), an approach to context-sensitive behavior we have developed over the past few years for intelligent autonomous agents. In CMB, contexts are represented explicitly as contextual schemas (c-schemas). An agent recognizes its context by finding the c-schemas that match it, then it merges these to form a coherent representation of the current context. This includes not only a description of the context, but also information about how to behave in it. From that point until the next context change, knowledge for context-sensitive behavior is available with no additional effort. This is used to influence perception, make predictions about the world, handle unanticipated events, determine the context-dependent meaning of concepts, focus attention, and select actions. CMB is being implemented in the Orca program, an intelligent controller for autonomous underwater vehicles.
You don't ride a bicycle on a train. The idea never crosses your mind, even if you have a bicycle with you, even if you are an avid bicyclist. Why not? Because it is not appropriate in that context. If asked, you could immediately reply that this is not something one does on a train. How do you know? You just do--the knowledge of what is appropriate is automatically available to you when you are in or are thinking about that context.
Humans are exquisitely attuned to their context. There can be no serious objection to the statement that for humans and other animals, behavior is context-dependent. Animals that behave inappropriately for their context will likely not survive to pass on their genes; this is part of evolution. Humans that behave inappropriately for their context can face the same problem; at best, they risk being labeled insane. Indeed, the term ``appropriate'' in relation to behavior is meaningless without recourse to some context. There is no such thing as context-free appropriate behavior.
Artificial agents must also exhibit context-sensitive behavior. This, too, is not a contentious point. All successful artificial intelligence programs are context-sensitive, though it may take a great deal of effort and the range of contexts may be severely limited. An artificial agent that does not behave appropriately for its context is useless.
The interesting question is not, then, whether context-sensitive behavior exists or is useful, but rather: How can an intelligent artificial agent take context into account as effortlessly and automatically as humans and animals do?
Over the past few years, we have developed an approach to context-sensitive behavior for artificial intelligence systems as part of our research in schema-based reasoning [Turner, 1994]. We call this approach context-mediated behavior, because attention to context underlies almost all of the agent's behavior.
We use the term context to mean any identifiable configuration of environmental, mission-related, and agent-related features that has predictive power for an agent's behavior. The term situation is used to refer to the entire set of circumstances surrounding an agent, including the agent's own internal state. Context is thus the elements of the situation that should impact behavior.
Context-mediated behavior (CMB) is based on the idea that an agent should have explicit knowledge about contexts in which it may find itself, then use that knowledge when in those contexts. In our approach, this knowledge is represented as contextual schemas (Turner, 1989b; 1994). Each contextual schema (c-schema) contains both descriptive knowledge about a particular context and prescriptive knowledge about how the agent should behave in that context. C-schemas are organized in a conceptual, content-addressable memory. Features of the current situation are used to find matching c-schemas, which are merged to create a coherent view of the agent's context. Prescriptive contextual information is then used to bring the agent's behavior in line with its context.
This approach to context-sensitive behavior has several desirable properties. First, it is efficient. When the situation changes significantly, a decision is made about what the context is. From then until the next change, the agent does not need to reason about the context; instead, it simply uses the information from the current set of c-schemas. This is in contrast to standard decision-making in planning, rule-based systems, and most other artificial intelligence systems, in which every decision made involves considering what the current context is. Contexts are often long-lived, with many decisions being made while the agent is in the context. Consequently, CMB will be more efficient than reasoning about the context each time decision-making is necessary.
Second, context-sensitive behavior is automatic once a context is recognized. This means that behavior selection can be fast, since the agent's decision-making from that point on uses the contextual knowledge already present. The context can pre-set reflex behavior, for example, so that little or no decision-making is required at the time the reflexive behavior is needed.
Third, CMB aids perception and understanding. Once the context has been identified, information from the corresponding c-schemas can be used as a source of predictions about unseen features and suggestions of how to disambiguate perceptual data. The predictions from c-schemas can also help the agent predict the occurrence of unanticipated events and to recognize them when they occur. In addition, many concepts have context-dependent meaning. For example, the concept of one agent being close to another has a different meaning when two ships are attempting to dock than it does when they are attempting to avoid colliding with one another at sea. By storing such context-dependent meanings in c-schemas, CMB fosters context-sensitive understanding.
Finally, by representing the context explicitly, CMB opens the way for agents to adjust their contextual knowledge over time based on their own experience. It also allows many novel contexts to be handled, since the agent can blend together knowledge about similar contexts it knows about.
This paper describes a computational model of context-mediated behavior. This model was begun in the project (Turner, 1989a; 1994) and is currently being developed in the Orca project (Turner, 1994; 1995). was a medical diagnostic reasoner, and Orca is an intelligent controller for autonomous underwater vehicles (AUVs). CMB is being implemented as Orca's () context management module. Though we are focusing first on AUVs, CMB is meant to be a general approach to context-sensitive behavior for intelligent artificial agents.
We first discuss our application domain and the Orca AUV controller. Next, we examine the question of which aspects of behavior should be affected by an agent's context. We then describe our model, context-mediated behavior. The paper ends with a discussion of related work, then conclusions and plans for future work.
An AUV is an untethered submersible robot. Figure 1 shows an example AUV, EAVE-III (Experimental Autonomous VEhicle). EAVE is a short-range, experimental vehicle built by our collaborators at the Autonomous Undersea Systems Institute [Blidberg et al., 1991]. Over the years, the EAVE series of vehicles have performed many tasks related to ocean science and engineering. There are many other AUVs currently being built or fielded. Some, like EAVE, have been built for AUV development purposes, while others are beginning to perform real tasks for ocean science, industry, and the military (see Blidberg, Turner, and Chappell blidberg91 for a review).
AUVs can perform many tasks important for mariculture, the petroleum industry, mining, communications, and other industries. These tasks include: laying cable, inspecting and repairing oil rigs, doing underwater construction, and prospecting. Humans can do these tasks, but the ocean is a hostile environment for humans. Except for military vessels, long-term human presence is mainly limited to the uppermost layer of the sea. Even here, storms and high wind can limit the surface-based support most undersea activities require. AUVs can overcome these problems. They can operate without human presence or surface support, and can perform hazardous tasks and operate in any sea state without risking human life. They do not have the drawbacks of remotely-operated vehicles (ROVs), since they do not have tethers to become entangled, nor do they require a support vessel on the surface.
AUVs also have great promise for use in oceanography and other marine sciences. Understanding the ocean is important in itself, but it is critical to understanding and predicting global environmental change. Yet it has been said that we know more about the surface of Neptune than about our own planet's oceans [Blidberg et al., 1991]. The ocean is mostly impervious to airborne or spaceborne sensors. Satellites are essentially limited to observing the topmost few meters of the sea's surface, and, even here, ``ground-truthing'' their data requires measurements to be taken on-site. AUVs are ideal for studying the ocean. They can carry sensors to where they are needed, and they can move to characterize phenomena of interest. They do not suffer from the motion limitations of moorings or drifters, nor do they require human presence, as do ROVs.
AUVs have many military applications. In addition to the most obvious ones, AUVs can gather information in hazardous areas, they can be used to clear mines without risking human life, and they have promise for use in rescue missions.
The AUV control domain provides a challenging problem for artificial intelligence (AI). An AUV operates in a world about which we have very little knowledge, hence uncertainty is high. Sensors for underwater use are notoriously noisy and plagued with uncertainty. In addition, the underwater world is not static; indeed, it can change drastically over a small period of time or a small distance. Complicating matters further, many important missions have long duration. For example, it has been proposed [Blidberg et al., 1991] that AUVs function as ``underwater satellites'', remaining on-station to return data over long periods of time. In such missions, the likelihood of equipment failure and errors arising from uncertainty increases dramatically.
Context-sensitive behavior is critical to AUVs, as it is for any other reasoner. An AUV controller will need to behave appropriately in many different contexts. Very often, an AUV will be used for many different missions over its lifetime, and it will carry out those missions in many different kinds of environments: in harbors, in the littoral (near-shore) zone, in the deep ocean, under ice, and so forth. Even a single mission will often involve operation in several different contexts. An AUV controller needs knowledge about the different contexts in which it will be operating so that it can adjust its behavior appropriately.
But just having contextual knowledge is not enough. The AUV must be able to rapidly find and apply the knowledge, preferably automatically, to decide how to behave. Decisions about what to do in a given situation must often be made very quickly, or else the AUV risks its mission or itself. For example, when power fails, the AUV must decide at once what to do. If it is in a harbor, then landing on the bottom and releasing a buoy may be the best response; if it is in the open ocean with kilometers of water beneath it, this is likely not the appropriate thing to do, and instead it should surface and radio for help. There will be virtually no time to decide what to do when the event occurs.
At the present time, widespread use of AUVs is limited as much or more by the lack of sophisticated control software as by any other factor. AUVs have been capable of performing a variety of simple tasks for years. Before they can reach their full potential, however, they need intelligent controllers that can carry out complex missions and handle unanticipated problems that arise.
Orca (Turner, 1994; 1995) is an intelligent mission controller for autonomous agents being developed at the University of Maine. We concentrate mostly on AUVs undertaking oceanographic missions. Orca's role is to free ocean scientists and other users from needing detailed knowledge of AUV control. Users will describe their missions to Orca in terms meaningful to them, then it will plan and carry out the mission, while handling any problems that may arise.
Orca is a schema-based, adaptive reasoner. It consists of several cooperating modules, as shown in Figure 2. Schema Applier (SA) is responsible for finding and applying a p-schema to achieve the goal or goals currently in focus. Agenda Manager (AM) is responsible for maintaining Orca's focus of attention. Event Handler (EH) handles all input from outside the program, and it is responsible for handling any events, unanticipated or anticipated, that it detects. We assume Orca will control the agent's hardware (e.g., sensors and effectors) indirectly, so input will be from lower-level control software. Long-term memory is responsible for retrieving p-schemas and c-schemas in response to ``probes'' from the context manager and SA, and working memory holds information for all the modules.
CMB is implemented by the context manager, . As can be seen from the figure, plays an important role in Orca. It is responsible for maintaining Orca's representation of its current context (the context structure) and for disseminating contextual information to the other modules.
Orca is implemented in Allegro Common Lisp and CLOS on a Sun workstation. is implemented as a CLOS class with its own Lisp process. Orca is currently being developed and tested in our simulation testbed, with the goal of eventual fielding aboard AUVs. Our initial target vehicle is the EAVE-III vehicle, described above. Ultimately, we anticipate Orca controlling long-range AUVs and AUVs involved in multi-AUV systems. The current version of Orca is being used by other projects focusing on such systems.
Given that an agent's context impacts its behavior, the question naturally arises: What is ``context''? Most often, the answer is somewhat vague: context is the current situation, the environment, etc. Recent workshops and conferences [Brézillon & Cavalcanti, 1997, e.g.,] have focused some attention on this question, though unfortunately without much agreement.
Perhaps by restricting our consideration here to the domain of controlling intelligent autonomous agents such as AUVs we can have better luck. We repeat here our definition of context:
context is any identifiable configuration of environmental, mission-related, and agent-related features that has predictive power for behavior.
This means that a configuration of features is only considered to be a context if it predicts something about how the agent should behave when those features are present. Thus the set of contexts is a drastically reduced subset of all possible feature configurations. For an AUV, docking with a support ship is an important context. Features of this context include: presence of the AUV and ship close to one another; the AUV has the goal of docking; both vessels are equipped for docking; and so forth. This context subsumes a very large number of situations that vary from one another along features that have no impact on the agent's behavior: color of the ship, day of the week, position of Mars, etc. The restriction ``identifiable'' further reduces the set of contexts. If the agent cannot identify the context, it makes no sense to store a representation of it.
Let's look at a few examples of contexts in the AUV domain. Consider an AUV operating in the open ocean. Here, if it needs to determine where it is, it can surface and take a GPS (Global Positioning System) fix without much chance of collision. When there is a catastrophic failure, it should attempt to surface and radio for help, since landing on the bottom here would likely mean going below its crush depth.
Other environments have different predictions for how the AUV should behave. Consider ``in a harbor''. Since there is likely to be traffic on the surface and possible clutter on the bottom, the AUV's depth envelope should be tightened automatically when entering the harbor. Similarly, should the AUV need to determine where it is, it should first try means that do not require it to surface, since that would risk a collision; if it does have to surface, it should do so carefully, after trying to locate any approaching vessels. Should a catastrophic event occur, the AUV should land on the bottom and release a buoy rather than surfacing; knowing that it is in a harbor should allow it to make this decision quickly.
Though this context can help an AUV behave appropriately in a wide range of harbors, some harbors have different properties that affect behavior. For example, Portsmouth Harbor (NH) has extremely strong tidal currents; Bar Harbor (ME) has a sandbar that completely blocks part of the harbor at low tide. An AUV operating in these harbors must know about these specializations in order to behave appropriately in the contexts.
Missions can also define contexts. The range of actions available to an AUV while on a mission is one thing that is constrained by such a context. For example, the context ``on a sampling mission'' might restrict the way the AUV moves so as to avoid disturbing the sites from which data is to be collected. A context such as ``on a rescue mission'' affects the behavior in other ways. In that context, for example, the AUV should focus its attention on the main mission task, even at the expense of other goals that might otherwise be quite important, such as ``determine location''. In the context of ``on a cooperative mission'', the way goals are achieved can be different than in other contexts. For example, in that context, the AUV can ask other AUVs to achieve goals for it. In addition, which goals it focuses attention on may be partially determined by the goals other AUVs are working on.
Properties of the AUV itself can also define contexts. An AUV changes over
time. One way this happens is when the AUV is equipped with different sensors
and effectors for different missions. For example, the context ``equipped
with a CTD''
has implications for what
kinds of things the AUV can do. In the context of having a piece of equipment
that is pressure-sensitive, the AUV should know not to exceed that depth. An
AUV also changes when there are electrical or mechanical failures, and these
changes give rise to contexts that affect behavior. The context ``low
power'', for example, impacts behavior by changing the way goals are carried
out (e.g., choose shorter paths, move more slowly, etc.) or even eliminating
some goals from consideration; the context ``power failing'' should
immediately cause the AUV to take the appropriate actions, for example, by
activating a goal to abort the mission.
Requiring contexts to be identifiable and predictive reduces the number of contexts an agent must know about, but even so, the space of possible contexts necessary may be huge. For example, an AUV may find itself in the contexts: in a harbor; in a harbor with low power; in Bar Harbor at low tide; in Bar Harbor at low tide with low power; and so on. It would be unwise to attempt to represent all possible contexts, especially since many of them can be seen to be composed of simpler contexts.
We suggest that the following principle guide the selection, either by humans or the agent itself, of which contexts to represent:
context should be represented as a c-schema only if: (1) it cannot be represented by merging the knowledge contained in existing c-schemas or (2) if such a merger fails to prescribe the correct behavior for the context.Thus the context ``in a harbor during incoming tide'' might be adequately captured by merging two representations, one for ``in a harbor'' and another for ``incoming tide'', for a wide range of harbors. However, the context ``in Portsmouth Harbor during incoming tide'' would likely require its own representation, since the strong currents in that harbor would not be adequately predicted by merging existing representations.
Context impacts almost all facets of behavior. In humans, for example, perception is heavily influenced by top-down predictions, making it more difficult to detect out-of-context objects than familiar ones, and there are numerous studies showing the priming effect of one concept on another [Glass & Holyoak, 1986, see, e.g.,]. Pevtzow and Goldstone pevtzow94 suggest that the categories a person has learned affects what features of an object he or she perceives. Context also impacts decision-making and action. Classic studies by Tversky and Kahneman (e.g., Tversky and Kahneman, 1974) show the effect of context on estimation of probabilities; for example, in the ``gambler's fallacy'', after a string of heads in a coin toss, the subject's estimation of the probability of the next toss being tails deviates from 1/2. Preference measurements also are context-sensitive [Mellers & Cooke, 1996]. Learning is affected by context, as studies as far back as those of Pavlov have demonstrated. Context has been studied extensively in language use, usually with ``context'' meaning the history of prior utterances [Ferstl, 1994, e.g.,], but also including other kinds of context. Holtgraves holtgraves94 has found that the status of the speaker relative to the hearer affects whether the literal meaning of an indirect request is activated. Krahmer and Piwek krahmer97 have found that non-linguistic context is used in filling presuppositional gaps in utterances. Social interaction is also context-dependent, as the work of Holtgraves cited earlier suggests. Mantovani mantovani96 concludes that ``patterns of activity'' are regulated by cultural models, and he suggests a role for context strikingly similar to one of the roles we study in our work: context evaluation gives rise to actions intended to cope with ``foreseeable'' events.
Context should affect an artificial agent's behavior in similar ways. Above, we discussed some of the ways an AUV's behavior is affected by context. Here, we discuss this in more detail. We have identified the following aspects of an agent's behavior that context should affect:
Knowledge about the context should help the agent answer such questions as:
With respect to the last point, context can also help interpret ambiguous data. For example, an AUV may often detect two sonar returns from its down-looking sonar that could be the bottom. Knowing that the context is ``in an estuary'', the AUV should automatically take the topmost return as the actual depth of the bottom and the lower return as the harder surface under the silt. In the open ocean, the lower return is more likely to be the bottom, with the upper one resulting from the ``deep scattering layer'' composed of a high concentration of animals [Levinton, 1982].
Contextual knowledge can help an agent handle unanticipated events. Once the context is recognized, knowledge about event-handling should be ready and available immediately when an event occurs. The knowledge would help the agent:
Ideally, an agent's knowledge of its context should allow the agent effortlessly to know what actions are appropriate in the context. Inappropriate actions should not be brought to mind at all. Returning to the example that opened the paper, one should not think of riding a bicycle on a train because one's contextual knowledge about train riding does not even suggest it.
This is an example of
context-specific strategy selection, where the context here has to do with
properties of the person (level of experience) rather than environmental
features.
Context-mediated behavior (CMB) is a mechanism for ensuring that an agent behaves appropriately for its context. It explicitly represents an agent's contextual knowledge and ensures that the right knowledge is available at the time it is needed. CMB is implemented in , one of Orca's modules.
The overall CMB process is shown in Figure 3. When the system is initialized, and whenever there is a significant change in the situation, searches Orca's long-term memory for contextual schemas that are similar to the new situation. This process is called ``evocation'' (cf. Miller, Pople, and Myers, 1982), since the current situation reminds [Kolodner, 1984, cf.] the reasoner of, or ``evokes'', the c-schemas. Once a pool of candidate c-schemas has been found, determines which of the c-schemas best characterize the current situation by diagnosing the situation as being an instance of one or more contexts. The result is used to create a context structure representing the current context. If more than one c-schema fits the situation--which is likely--then their information is merged. Contextual knowledge is then disseminated to the agent's other reasoning modules.
In the rest of this section, we discuss the pieces of CMB in more detail. For readability, we write as if the implementation is complete, which it is not. At the time of writing, the CMB process has been designed as described in this paper, and implementation is currently under way. We have fleshed out CMB in some areas (e.g., context-dependent meaning of fuzzy knowledge [Turner, 1997]) more than others (e.g., detecting context change). We anticipate completion of an initial implementation at or near the time of publication.
All contextual knowledge in CMB is stored in contextual schemas. Each c-schema is a frame-like knowledge structure. A frame is a slot-filler representation of knowledge, in which the slots (or ``roles'') are features of the thing being represented and the filler is a description of the value of the feature. Each c-schema represents a particular context, that is, a particular class of problem-solving situations.
Figure 4 shows a c-schema from Orca representing ``in a harbor''. C-schemas are implemented in Orca as frames based on CLOS (Common Lisp Object System) objects. The notation name means a frame named ``name''. The lists shown as fillers are themselves frame-like structures called ``frame patterns''. The head of a list is a frame, and the rest is a set of slot/filler pairs providing information about the frame. For example, the first list in the figure essentially means: ``An actor description frame: the variable used in this c-schema to refer to the object represented is `?self', it is an AUV, it is the same as the agent's own representation of itself (`$self'), the certainty associated with this object being present is 1.0, and the penalty for this feature being missing is 1.0.''
Contextual schemas have several parts. The context description is contained
in three slots, actors, objects, and description. As can be
seen in the figure, this information can include an estimate of how much each
feature is expected in the context and what penalty is paid for its absence
during context assessment. This information can also be used to make
predictions about the current situation based on it being an instance of the
context. Context-specific meanings of concepts are contained in the
c-schema's definitions slot. Information about what to do automatically
when entering or exiting the context, called the ``standing
orders''
, is contained in a slot of the same name.
Event-handling information is contained in the events slot. This
information consists of descriptions of unanticipated events that may happen,
information about how to recognize them, and knowledge useful for evaluating
their importance and selecting an appropriate response. Attention-focusing
information is contained in the goals slot. This consists of
descriptions of goals likely to be present whose importance is different than
in other contexts. This information is used to rate the relative priority of
goals in the context. Information about appropriate actions for the context
is contained in the actions slot. These are suggestions of actions to
take to achieve goals that arise in the context. We discuss this information
in more detail below.
Strategic knowledge, both domain-independent and domain-dependent, is also provided in c-schemas. An agent could have, for example, a c-schema representing the ``meta-context'' of being in an unfamiliar context. The c-schema representing this might specify a strategy via goal priorities (e.g., favor goals to gather information), the kinds of event-handling information it provides, standing orders (e.g., be reactive), and actions suggested. The strategy, although implicit, might be thought of as ``be cautious''. In the future, we will examine the question of whether explicit strategies are useful, perhaps represented by contextual schemas similar to 's strategic schemas [Turner, 1994]. We will also consider whether there should be other domain-independent and/or ``meta'' c-schemas, for example, to represent hypothetical or learning contexts.
For the present, c-schemas in Orca will be acquired from domain experts. We believe that organizing knowledge by the context in which it is needed will prove helpful in eliciting that knowledge from experts. Ultimately, c-schemas should be learned from the agent's own experiences. When a context arises in which the behavior prescribed by the corresponding c-schemas is inappropriate, then the knowledge in those c-schemas will need to be changed or a new c-schema created. When a context arises that cannot be adequately represented by merging existing c-schemas, this also should trigger the agent to create a new c-schema.
We should point out that although we believe the kind of information we represent in c-schemas has wide applicability, the CMB approach is not tied to any particular representation of contextual knowledge. Orca uses a frame-based representation, but CMB applied to other reasoners could store other things in c-schemas. For example, CMB could generate context-sensitive behavior in a neural network by storing context-dependent sets of weights in c-schemas. When the context is recognized, then the appropriate weights for the network would be instantly available.
Context assessment is diagnosis. Features of the situation, information about
known kinds of situations, and the linkages between the two provide the
information necessary to diagnose the current situation as an instance of one
or more known contexts. Familiar diagnostic tasks, such as medical diagnosis,
can be seen as examples of context assessment. The features of the situation
are the patient's signs and symptoms, medical and family history, etc. The
contexts the diagnostician knows about are those involving diseases and other
pathological states. A diagnosis is an identification of the current case as
being an instance of one or more disease states.
Diagnosis is an abductive task [Miller et al., 1982]. We make use of this fact and the work done in AI on diagnostic reasoning. Context assessment in CMB is based on the kind of abductive reasoning done in [Miller et al., 1982]. The basic process is as follows (see Figure 3). First, Orca's long-term memory is probed using features of the present situation to ``evoke'' c-schemas that are similar. Each c-schema returned will have an ``evoking strength'', a number (in this case in (0,1]) that represents the memory's estimate of how much the c-schema should be ``brought to mind'' by the current situation. The context manager, , then compares information in the c-schemas about how strongly they predict certain features to the actual presence or absence of those features to determine which c-schema(s) are the best candidates to represent the current context. It then merges these to form the context structure, which represents the context.
Each c-schema is a memory structure containing not only contextual information but also information about how it relates to other c-schemas. This information is primarily contained in the c-schema's indices, which link a c-schema to others that are (usually) specializations of it. The memory is thereby organized into a set of multiple discrimination networks, with the nodes being c-schemas and records of particular instances of contexts (cases) and the links being indices. Figure 5 shows a representative piece of such a memory.
Each index has four parts: a feature description, a description of a value for that feature, a pointer to another c-schema, and an evoking strength indicating the strength of the link. An index's feature is one believed to be predictive [Kolodner, 1984]. Predictive features for a context are those that are expected to be useful in discriminating between various specializations of the c-schema. The value portion is based on the value of the feature in the indexed c-schema.
Contextual schemas are evoked based on the current situation. The retrieval process starts at the top-level c-schema(s) in long-term memory. LTM considers each of the c-schema's predictive features to determine if the current situation contains features that could fit it. If so, then possible values based on that situational feature are generated in a process of index elaboration [Kolodner, 1984], and each predictive feature/value pair is compared to the indices to see if they match. If so, then the c-schema listed in the index is a candidate for representing the situation. If any candidate is found whose evoking strength is over a certain threshold, then the parent c-schema is discarded in favor of the candidate. Each candidate is traversed in the same manner by comparing the working memory to its indices. During the search process, the evoking strength of each candidate is computed. LTM finally gives a list of c-schemas and their evoking strengths.
This task is often called differential diagnosis, since potential diagnoses can be compared to one another for the purposes of information gathering. As in , each c-schema in an LCS receives a score based partly on its evoking strength and partly on its predictions for the situation. The job of differential diagnosis is to gather information to confirm the best diagnosis and/or to deny the others. Miller et al. miller82 describe several strategies for going about this. We are in the process of examining these strategies for inclusion in CMB.
Once an LCS is solved, then the features its c-schema accounts for are removed from consideration and a new set of LCS's is formed. The process continues until all important features are accounted for. At this point, is left with a set of c-schemas, each of which characterizes the situation along a different axis.
The major problem is what to do when information from one c-schema conflicts with that from another. There are several possible approaches to this problem:
It is likely that different kinds of information will call for different strategies. For example, if two different depths are suggested, merging the information by coming up with an intermediate depth may be worse than choosing one or the other. If one was chosen to keep the AUV near the surface to get it out of the way of other submersible traffic, and the other was chosen for the same reason to keep it near the bottom, then selecting an average value would be precisely the wrong thing to do. As our work progresses, we will investigate when the above strategies make sense as well as how to specify which to use for which kind of information.
We have looked in detail at merging one kind of information, the context-dependent meaning of fuzzy subsets [Turner, 1997, see]. We use a simple form of fuzzy set theory [Zadeh, 1965] in our work to support inferences made by Orca's modules.
In the fuzzy knowledge representation we use, the meaning of linguistic values (e.g., ``shallow'') for linguistic variables (e.g., ``depth'') is represented by a membership function mapping the variable's numeric range onto the interval [0,1] [Zadeh, 1994, see, e.g.,]. It represents how much each element of the range belongs to the set. A c-schema can contain links from a linguistic variable/value combination to a membership function giving that value's meaning. In addition, it specifies how that information should be merged with other membership functions for the variable/value pair.
An example is shown in Figure 6. The information on the left means that in this context, the value ``shallow'' of the linguistic variable ``depth'' has the membership function shown on the right, that Orca is 0.8 certain of this in this context (on the scale [-1,1]), and that this value should replace any other membership functions for this value. Actual replacement would depend not only on this directive, but also on the certainties of other potential meanings. Other possibilities for combination directives include: replace this with any other information available; take the fuzzy union of all conflicting membership functions; and take the fuzzy intersection.
The context structure itself looks like a c-schema, except it also contains bookkeeping information about which c-schemas went into its creation. Keeping the structures the same facilitates memory update. If the context meets the criteria for being remembered, the context structure can be directly turned into a c-schema, then indexed in memory relative to its component c-schemas based on its differences from them.
This section discusses how CMB is used to make an agent's behavior fit its context. We will discuss how this happens in Orca and assume that other agents will have equivalent functionality.
Contextual schemas help interpret sensory data by providing top-down predictions about the situation, including predictions of unseen features. For example, when working with other AUVs, an agent's contextual knowledge should allow it to quickly identify moving, AUV-sized objects. Predictions can also affect an agent's plans or allow it to pre-set responses for events that are expected to occur. In addition, this information can allow the agent to determine what has happened in the past, if the predicted event has already occurred. This can help the agent determine where it is in a context extending over time (e.g., ``power failing''). In Orca, sends the context structure's predictions to Event Handler, which posts them in working memory as needed.
A c-schema also provides information about concepts that have a different meaning in the context it represents. As discussed above, c-schemas store context-specific membership functions for linguistic values when those values have a different meaning than usual in the context (see Figure 4). For example, if an AUV is loitering with no mission, ``nominal depth'' in a harbor may be different than in the open ocean--in the latter, staying near the surface is advisable, whereas in a harbor, to remain too near the surface is to risk collisions. This is handled by the c-schemas representing the two different contexts each providing a different membership function for ``nominal depth''.
Context-specific meanings are also posted in working memory. As described elsewhere [Turner, 1997], this becomes part of a table of such meanings. For fuzzy values, the table entries are membership functions, and they are indexed by a description of where the meaning will be needed. For example, an index might be a linguistic variable/value pair, such as ``depth of AUVs''/''shallow''. Information about the context-dependent meaning of concepts can then be used by all parts of the agent, for example to support how predictions are made, events are handled, attention is focused, and actions are selected.
In Orca, when detects a context change, it determines if any of the old context structure's standing orders should be rescinded and if any new orders should be triggered when exiting the context. These are combined with the orders from the new context structure that become effective on entering that context. Standing orders related to goals are sent to the Agenda Manager. Internal parameters are set directly, and settings for parameters of lower-level software and hardware are sent to the appropriate place.
Second, there is event assessment information, which is needed to determine what the event means in the context, that is, how important it is. This can be expressed simply by an importance estimate, or additional information can be given that allows the event's importance to be modulated based on the particulars of the current situation. This allows a single c-schema to adjust behavior to different situations that are all instances of the context it represents. A rule-like representation is used for this in both and Orca.
And third, there is information about how to respond to unanticipated events. In our approach, this takes the form of information linking events to goals to activate when the event occurs. For example, the c-schema representing being in a harbor might suggest activating the goal ``land on bottom and release a buoy'' in response to the event ``leak''. This is an example of c-schemas pre-setting the agent's reflexes in a context-specific way. Should an event occur, the agent automatically knows what to do. The c-schema also suggests how important the goal should usually be. Attention-focusing information from the current context will also affect whether attention is focused on this response or not. In addition, a c-schema may contain a standing order governing the overall reactivity of the agent.
In Orca, event-handling information is used primarily by Event Handler, though any responses to events will be posted to the Agenda Manager. Event assessment information is in the form of fuzzy rules used by one of EH's rule-based systems.
In Orca, attention-focusing information is provided in the form of rules that Agenda Manager can use to determine the priority of goals. This was done in a simple way in and is being implemented in Orca by giving AM these rules for use in its internal fuzzy rule-based system. Standing orders to deactivate a goal will also be handled by AM.
An important problem for CMB is detecting when the context has changed. Our approach to this problem is to allow c-schemas to contain information about events that signal a context change. For example, the c-schema ``in a harbor'' may predict a context change if the AUV passes the harbor's mouth. When these events are noticed, then the context manager can begin the process of determining what the new context is. We assume that such triggering events can be given to the agent for many contexts it knows about. Learning these events on its own, however, may be quite difficult.
It is likely that it will not always be possible to detect or unambiguously identify such events, however. Consequently, the context manager should periodically reexamine the world, probing memory for new c-schemas that are evoked and judging how well existing c-schemas fit the situation.
We have yet to implement this portion of CMB in Orca. This will be an important topic for future research.
Early work in AI related to context included research in planning and top-down
predictions in computer vision. The former typically encoded contextual
information as preconditions of operators or macro operators
[Fikes & Nilsson, 1971, e.g.,]. This has the unfortunate side-effects of redundantly
encoding the knowledge and having no explicit identification of the context.
Most expert systems treat context similarly, by encoding contextual
information in their rules' antecedents.
As we have discussed,
an agent benefits from having explicit representations of contextual
knowledge, since this allows reasoning about the context itself. An early
approach to this problem was the project [Aikins, 1980], though
only one kind of context (the consultation) was represented, and then for very
limited purposes. One can also think of (Chandrasekaran, Gomez,
Mittal, and Smith, 1979) as having diagnostic contexts, since its
``concepts'' served to partition its rules along context-specific lines.
In the past few years, interest in and work on context has been increasing in artificial intelligence and related fields, as evidenced by recent workshops at the major AI conferences and a recent conference, CONTEXT-97 [Brézillon & Cavalcanti, 1997], focused solely on context. One very active area is formal representation of context. This work mostly follows from McCarthy's mccarthy87 work on formalization of context in logic. Another area of strong interest is natural language processing/computational linguistics. This area, for example, accounts for twelve of the 33 papers in the CONTEXT-97 conference. Work has also been done on cognitive models of context. This includes Kokinov's kokinov94 DUAL cognitive architecture, Kolodner's cyrus model of human episodic memory (the basis for CMB's memory and one of the origins of c-schemas), and Öztürk and Aamodt's ozturk97 case-based diagnostic program. Feltovich, Johnson, Moller, and Swanson feltovich84, considering the development of human diagnostic expertise, proposed the concept of ``disease models'' organized hierarchically; this is similar in some ways to our hierarchical arrangement of contextual schemas in long-term memory.
There has also been some work focused on context-sensitive behavior in real-world applications. One of the earliest efforts was the author's work on (Turner, 1989a; 1994), of which Orca is a direct descendent. was a medical diagnostic reasoner developed at the Georgia Institute of Technology. The hypothesis developed in was that diagnostic consultations could be approached by adaptive reasoning, a kind of context-sensitive, reactive planning.
In , contextual schemas were monolithic structures representing entire problem-solving contexts, or consultations. As the consultation progressed, which c-schema was in use changed based on the features of the evolving situation. A particular case might progress from being represented as a ``medical consultation'', then as a ``cardiopulmonary consultation'', and finally as a ``cardiopulmonary consultation in which patient is an alcoholic'' as the program's understanding of the situation evolved during information gathering. C-schemas contained information about goals, events, and actions that guided the program's diagnostic behavior.
CMB was not fully designed nor implemented in . There was no context manager per se, context assessment was rudimentary, and there was no notion of context-dependent concept meanings. In addition, medical diagnosis is not a particularly rich domain for developing a model context-sensitive reasoning, since it has a limited range of contexts and of behavior. To fully develop adaptive reasoning in general and context-mediated behavior in particular, a richer domain was needed, such as AUV control.
Other work on using context in real-world applications includes: Brézillon's and colleagues' (e.g., Brézillon, Gentile, Saker, and Secron, 1997) work on context's impact on problem solving for subway incident handling; Guha's guha90 work on common sense reasoning and Pinto, Stephens, and Bonnell's pinto95 work on geographic reasoning in Cyc; Öztürk and Aamodt's ozturk97 work on medical diagnosis; E. Turner's eturner89 work on conversational control; and Vámos' vamos95 work on modeling domain expert knowledge, which resulted in patterns similar to very simple contextual schemas.
Our work differs from these authors' in several ways. First, the range of behavior affect by context in CMB is broader, since all aspects of the agent's behavior is context-dependent. Second, CMB allows the agent to automatically behave appropriately once a context is recognized. In most of the other approaches, reasoning about the context of decision-making must occur throughout the time spent in the context. Third, CMB explicitly represents contexts as objects in their own right, which facilitates reasoning about the context, acquiring knowledge, and handling novel contexts by merging existing ones. Except for Guha & Lenat's guha90 work on microtheories, most of the other approaches do not represent contexts explicitly.
Context-sensitive behavior is critical for any intelligent agent, natural or artificial. In this paper, we have described context-mediated behavior, an approach to context-sensitive behavior for artificial, intelligent, autonomous agents.
Context-mediated behavior has several important features. First, it makes use of explicitly-represented contextual knowledge, which allows the agent to reason about the context it is in. It can examine alternative contexts it knows about to determine which best characterizes its current situation. It can then use what it knows about the context to make predictions, interpret sensory information, determine what concepts mean in the context, and decide how to behave.
Second, CMB provides automatic context-sensitive behavior. Knowledge about how to behave is automatically brought to mind when the context is recognized. Reasoning effort is expended when the context changes in order to save time when the contextual knowledge is needed. This can be very important for real-world agents, since often they must act and react rapidly.
Third, CMB allows the use of multiple contextual schemas to represent the current context. This both reduces the number of contexts that must be represented and allows the agent to handle many novel contexts by blending information about contexts the situation resembles.
Fourth, CMB is encapsulated within a module, , that is not necessarily tied to one reasoner. is being implemented to allow the agent's other reasoning modules to register their information needs with it. When the context changes, it will use the registry to determine what to send to whom. This frees from needing to be intimately aware of the reasoner it is part of. This, in turn, means that can potentially be used with reasoners other than Orca. For example, we can imagine its use with a neural network controller or a standard rule-based system; in these cases, the c-schemas would contain weights and rules, respectively, that are appropriate for the context.
There is much left to be done in the future in CMB. In the near term, the implementation of a complete version of in Orca will be finished and evaluated in simulation tests and, ultimately, in in-water tests aboard AUVs. We will examine the issue of how can acquire contextual knowledge. We believe using c-schemas will facilitate knowledge acquisition from humans, and we will also begin to look at how can learn its own c-schemas from experience. We will also explore the need for ``meta'' and domain-independent c-schemas, as described earlier, to represent strategies and contexts such as ``in an unfamiliar context'' or ``in a learning context''.
We will also begin to address moving CMB beyond Orca. One area is using with other kinds of reasoners. A second has to do with our research (e.g., R. Turner, E. Turner, and Blidberg, 1996) in cooperative distributed problem solving (CDPS). We envision multiple, cooperating agents, each controlled by a context-sensitive reasoner using CMB. This gives rise to interesting issues, such as how to represent contexts involving cooperative problem solving and how agents can communicate about, and agree upon, their shared context.
The author would like to thank the United States National Science Foundation for its support of this work via grant number BES-9696044. The author would also like to thank Elise Turner and the other members of the University of Maine Cooperative Distributed Problem Solving (CDPS) research group for their comments during the work and the preparation of this paper, and Patrick Brézillon for his very helpful comments on an earlier draft of this paper.
![[*]](foot_motif.gif)
This document was generated using the LaTeX2HTML translator Version 97.1 (release) (July 13th, 1997)
Copyright © 1993, 1994, 1995, 1996, 1997, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
The command line arguments were:
latex2html -t UMaine CDPS Group Papers - 1998 - R.M. Turner - Context-Mediated Behavior for AI Applications -local_icons -split 0 -address rmt@umcs.maine.edu body.tex.
The translation was initiated by Roy Turner on 1/7/1999
rmt@umcs.maine.edu