Next: Decision-rules and Unsafe Up: Decision-steps Previous: Adding a Decision-rule

### How Cassandra Constructs Decision-rules

At the point in the planning process at which Cassandra constructs a decision-rule, only one precondition in the plan is known to depend upon a particular outcome of the uncertainty that gave rise to the decision: namely, the one that led to Cassandra discovering the uncertainty in the first place. The decision-rule set that initially builds thus looks like this:

During the construction of the plan, Cassandra must modify this initial rule set each time an effect depending directly on the source of uncertainty is used to establish an open condition in the plan. In particular, Cassandra must determine the contingency in which that open condition resides, and conjoin the effect with the existing antecedent of the decision-rule for that contingency.

```Action:        (toss-coin ?coin)

Preconditions: (holding ?agent ?coin)

Effects:       (:when (:unknown ?U H)
:effect (:and (flat ?coin)   ; uncertain effect
(:when (:unknown ?U T)
:effect (:and (flat ?coin)   ; uncertain effect
(tails ?coin)))
(:when (:unknown ?U E)
:effect (on-edge ?coin)))    ; uncertain effect
```

Figure 10: Representing the action of tossing a coin

Consider, for example, what happens when a coin is tossed. We might say that in theory there are three possible outcomes of this action: the coin can land flat with heads up; flat with tails up; or on its edge (Figure 10). Suppose Cassandra is given a goal to have the coin be flat. This can be established by using the flat-heads effect of tossing it. Since this is an uncertain effect, Cassandra introduces two new contingencies into the plan, one for the outcome in which the coin lands tails up, and another for the outcome in which it lands on its edge.

The introduction of these contingencies mandates the introduction of a decision-step whose initial rule set looks like this:

At the same time, a new open condition `(know-if (flat coin))` is introduced as a precondition of the decision-step, and new goal conditions are introduced that must be achieved in contingencies `[U1: T]` and `[U1: E]`. Cassandra next establishes the goal condition in contingency `[U1: T]` using the flat-tails effect of the `toss` step. The decision-rules associated with the tails up contingency are thus modified as follows:

Finally, the goal condition is established in contingency `[U1:E]` by introducing a new step, `tip`, into the plan. A precondition of the `tip` step is that the coin be on its edge, which is established by the on-edge effect of the `toss` action. Since this effect depends directly upon the uncertainty `U1`, the decision-rule for the edge contingency is modified to include this condition:

Since the plan is complete, this is the final set of decision-rules (see Section A.5). Notice that these rules do not discriminate the `heads-up` outcome from the `tails-up` outcome. In fact, either outcome will do, so there is no reason to make this discrimination. Which plan is executed in either of these conditions depends solely upon the order in which the agent that is executing the plan chooses to evaluate the decision-rules.

A somewhat more complex problem arises if we give Cassandra the goal of having the coin be `flat` and `heads-up`. In this case both effects can be established using the `toss` action. This will again lead to the introduction of two new contingencies into the plan, one for when the coin lands tails up, and one for when it lands on edge. Although Cassandra could establish `(flat coin)` in the `tails-up` case, it would fail to complete the plan, because the coin would not be `heads-up`. However, the `turn-over` action can be used, leaving the coin `flat` and `heads-up` given that it was `flat` and `tails-up` to begin with. At this point the decision-rules are as follows:

Cassandra must then plan for the goal in the outcome in which the coin lands on its edge. Both these effects can be established as a result of the `tip` action. However, the result `heads-up` is an uncertain effect of the `tip` action, since the coin might just as easily land tails up. Cassandra must therefore add another new contingency for when the coin lands tails up after being tipped. In this instance, the goal can be established by using the `turn-over` action, and the `tails-up` precondition of this action can be established by the uncertain result of the `tip` action. The final decision-rule set for the first decision is as follows:

If the `on-edge` contingency is pursued, another decision, stemming from the uncertain result of `tip`, must be added to the plan. If we name the second source of uncertainty `U2`, the rules for this decision are:

The plan is depicted in Figure 11 and shown in Section A.6.

Figure 11: A plan with two decisions

Next: Decision-rules and Unsafe Up: Decision-steps Previous: Adding a Decision-rule

Louise Pryor <louisep@aisb.ed.ac.uk>;