An uncertain effect in Cassandra is a context-dependent effect with an unknown precondition, i.e., a precondition the planner can neither knowingly perceive nor deliberately affect. For example, a malfunctioning soft-drink machine may operate intermittently; if the planner is aware of the intermittent functioning, but unaware of the conditions that govern this behavior, then the correct functioning of the device depends upon an unknown precondition. From the point of view of the planner, the uncertain effect is nondeterministic; the planner cannot tell in advance whether it will occur. Clearly, this definition is fundamentally subjective: another planner with better information might be able to specify precisely the conditions under which the device functions properly, for example if it knew how the internal mechanism of the machine worked. As another example, consider what happens when a coin is tossed: in principle, given perfect knowledge of all the forces and distances involved, it would be possible to predict the outcome. In practice, such knowledge is unavailable and the effect of the action is uncertain. In principle, it would be possible to specify the conditions that would lead to the coin landing tails up; in practice, these conditions are unknown.
It is interesting to note here that in some circumstances it might be possible for a planner to learn to predict outcomes that it had hitherto regarded as uncertain: for example, if it learned how the soda machine worked. ``Unknown'' refers only to the current situation. Our representation would facilitate such learning, which would simply involve learning new secondary preconditions rather than a whole new action representation.
Unknown preconditions play the same syntactic role as normal
preconditions within the operator schema; they are represented by
expressions formed using the pseudo-predicate :unknown
. An
effect that has a secondary precondition of this type will occur only
in certain contexts which cannot be distinguished by the planner from
the contexts in which it will not occur.
Figure 2 depicts a simplified example of an operator with an uncertain effect---it represents the action of operating a soft-drink machine that intermittently fails to dispense a soda despite being operated correctly. This operator has two uncertain effects, one in which the soda is dispensed, the other in which the soda is not dispensed.
Action: (enter-selection ?machine) Preconditions: (:and (money-entered ?machine) (plugged-in ?machine)) Effects: (:when (:and (available ?machine ?selection) (:unknown ?ok T)) :effect (dispensed ?selection)) ; uncertain effect (:when (:and (available ?machine ?selection) (:unknown ?ok F)) :effect (:not (dispensed ?selection))) ; uncertain effect (:when (available ?machine ?selection) :effect (:not (money-entered ?machine))) (:when (:not (available ?machine ?selection)) :effect (another-selection-indicator-on ?machine))
Clearly, the uncertainty with respect to both these effects stems from
a single underlying source, namely uncertainty about whether or not
the machine will malfunction. In effect, the two unknown
preconditions in the operator represent alternative results of this
underlying source of uncertainty. This relationship is reflected in
the two arguments to the :unknown
pseudo-predicate, the first
of which designates the source of uncertainty with which it is
associated, and the second of which designates the particular outcome
of the uncertainty that it represents. The possible contexts are
effectively partitioned into a set of equivalence classes, with each
context in the same class producing the same outcome of the
uncertainty. The outcome is then used to label the equivalence class.
A condition of the form (:unknown ?class outcome)
will be true
if the actual context is in the class designated by outcome
.
Notice that each instantiation of the operator will introduce a new source of uncertainty, which means that the first argument to the unknown precondition must be represented as a variable in the operator schema. Cassandra binds this variable to a unique identifier (i.e., a skolem constant) when the operator is instantiated.
In Cassandra's representation it is assumed that different sources of uncertainty are independent of each other. No source of uncertainty can be linked to uncertain outcomes in more than one operator, but a single operator may introduce any number of sources of uncertainty, each of which may have any number of outcomes. Each source of uncertainty has an exhaustive set of mutually exclusive outcomes, each with a unique name.