Next: Fetching Another Package Up: Cassandra's Plans Previous: Disarming a Bomb

## Fetching a Package

The plan in Figure 8, discussed in Section 4.1.3, involves just one source of uncertainty and hence contains just one decision-step. There are two possible ways of achieving the goal, one for each outcome of the uncertainty.

```Initial:       (AVAILABLE CAR-1)
When [LOC0S: B] (PACKAGE-AT LOCATION-2)
When [LOC0S: A] (PACKAGE-AT LOCATION-1)
(AND (IS-CAR CAR-1) (IS-CAR CAR-2) (LOCATION LOCATION-1)
(LOCATION LOCATION-2))

(KNOW-IF (PACKAGE-AT LOCATION-2))
0 -> (LOCATION LOCATION-2)
(KNOW-IF (PACKAGE-AT LOCATION-1))
0 -> (LOCATION LOCATION-1)

Step  2 (1): (DECIDE LOC0S)
(and (PACKAGE-AT LOCATION-2)
T                ) => [LOC0S: B]
(and (PACKAGE-AT LOCATION-1)
T                ) => [LOC0S: A]
1 -> (KNOW-IF (PACKAGE-AT LOCATION-2))
1 -> (KNOW-IF (PACKAGE-AT LOCATION-1))

Step  3 (4): (DRIVE CAR-1 LOCATION-1)             YES: [LOC0S: A]
(AT LOCATION-1)
0 -> (AVAILABLE CAR-1)

Step  4 (3): (DRIVE CAR-1 LOCATION-2)             YES: [LOC0S: B]
(AT LOCATION-2)
0 -> (AVAILABLE CAR-1)

Goal:        (AND (AT ?LOC) (PACKAGE-AT ?LOC))

GOAL                                 YES: [LOC0S: B]
4 -> (AT LOCATION-2)
0 -> (PACKAGE-AT LOCATION-2)    NO : [LOC0S: A]

GOAL                                 YES: [LOC0S: A]
3 -> (AT LOCATION-1)
0 -> (PACKAGE-AT LOCATION-1)    NO : [LOC0S: B]

Complete!
```

Next: Fetching Another Package Up: Cassandra's Plans Previous: Disarming a Bomb

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