24.7.1 Plan-Inferential Interpretation and Production
Let's first sketch out the ideas of plan-based comprehension and production. How might a plan-based agent act as the human travel agent to understand sentence $ C_{2} $ in the dialogue repeated below?
C $ _{1} $: I need to travel in May.
A1: And, what day in May did you want to travel?
C $ _{2} $: OK uh I need to be there for a meeting that's from the 12th to the 15th.
The Gricean principle of Relevance can be used to infer that the client's meeting is relevant to the flight booking. The system may know that one precondition for having a meeting (at least before web conferencing) is being at the place where the meeting is in. One way of being at a place is flying there, and booking a flight is a precondition for flying there. The system can follow this chain of inference, abducing that user wants to fly on a date before the 12th.
Next, consider how our plan-based agent could act as the human travel agent to produce sentence $ A_1 $ in the dialogue above. The planning agent would reason that in order to help a client book a flight it must know enough information about the flight to book it. It reasons that knowing the month (May) is insufficient information to specify a departure or return date. The simplest way to find out the needed date information is to ask the client.
In the rest of this section, we’ll flesh out the sketchy outlines of planning for understanding and generation using Perrault and Allen’s formal definitions of belief and desire in the predicate calculus. Reasoning about belief is done with a number of axiom schemas inspired by Hintikka (1969). We’ll represent “S believes the proposition $ P $” as the two-place predicate $ B(S, P) $, with axiom schemas such as $ B(A, P) \land B(A, Q) \Rightarrow B(A, P \land Q) $. Knowledge is defined as “true belief”; $ S $ knows that $ P $ will be represented as $ KNOW(S, P) $, defined as $ KNOW(S, P) \equiv P \land B(S, P) $.
The theory of desire relies on the predicate WANT. If an agent S wants P to be true, we say $ WANT(S,P) $, or $ W(S,P) $ for short. P can be a state or the execution of some action. Thus if ACT is the name of an action, $ W(S,ACT(H)) $ means that S wants H to do ACT. The logic of WANT relies on its own set of axiom schemas just like the logic of belief.
The BDI models also require an axiomatization of actions and planning; the simplest of these is based on a set of action schemas based on the simple AI planning model STRIPS (Fikes and Nilsson, 1971). Each action schema has a set of parameters with constraints about the type of each variable, and three parts:
• Preconditions: Conditions that must already be true to perform the action.
• Effects: Conditions that become true as a result of performing the action.
- Body: A set of partially ordered goal states that must be achieved in performing the action.
In the travel domain, for example, the action of agent A booking flight F1 for client C might have the following simplified definition:
| BOOK-FLIGHT(A,C,F): | | | |
| --- | --- | --- | --- |
| Constraints: | Agent(A) $ \land $ Flight(F) $ \land $ Client(C) | | |
| Precondition: | Know(A,depart-date(F)) $ \land $ | Know(A,depart-time(F)) | |
| | $ \land $ | Know(A,origin(F)) $ \land $ | Know(A,flight-type(F)) |
| | $ \land $ | Know(A,destination(F)) $ \land $ | Has-Seats(F) $ \land $ |
| | W(C,(BOOK(A,C,F))) $ \land $ ... | | |
| Effect: | Flight-Booked(A,C,F) | | |
| Body: | Make-Reservation(A,F,C) | | |
This same kind of STRIPS action specification can be used for speech acts. INFORM is the speech act of informing the hearer of some proposition, based on Grice's (1957) idea that a speaker informs the hearer of something merely by causing the hearer to believe that the speaker wants them to know something:
INFORM(S,H,P):
Constraints: Speaker(S) \ Hearer(H) \ Proposition(P)
Precondition: Know(S,P) $ \wedge $ W(S, INFORM(S, H, P))
Effect: Know(H,P)
Body: B(H,W(S,Know(H,P)))
REQUEST is the directive speech act for requesting the hearer to perform some action:
REQUEST(S,H,ACT):
Constraints: Speaker(S) ∧ Hearer(H) ∧ ACT(A) ∧ H is agent of ACT Precondition: W(S, ACT(H))
Effect: W(H, ACT(H))
Body: B(H, W(S, ACT(H)))
Let's now see how a plan-based dialogue system might interpret the sentence:
C $ _{2} $: I need to be there for a meeting that's from the 12th to the 15th.
We'll assume the system has the BOOK-FLIGHT plan mentioned above. In addition, we'll need knowledge about meetings and getting to them, in the form of the MEETING, FLY-TO, and TAKE-FLIGHT plans, sketched broadly below:
MEETING(P,L,T1,T2):
Constraints: Person(P) \ Location (L) \ Time (T1) \ Time (T2) \ Time (TA)
Precondition: At (P, L, TA)
Before (TA, T1)
Body: ___
FLY-TO(P, L, T):
Constraints: Person(P) \ In Location(L) \ In Time(T)
Effect: At(P, L, T)
Body: TAKE-FLIGHT(P, L, T)
TAKE-FLIGHT(P, L, T):
Constraints: Person(P) \ In Location (L) \ In Time (T) \ In Flight (F) \ In Agent (A)
Precondition: BOOK-FLIGHT (A, P, F)
Destination-Time(F) = T
Destination-Location(F) = L
Body: ...
Now let's assume that an NLU module returns a semantics for the client's utterance which (among other things) includes the following semantic content:
MEETING (P, ?L, T1, T2)
Our plan-based system now has two plans established, one MEETING plan from this utterance, and one BOOK-FLIGHT plan from the previous utterance. The system implicitly uses the Gricean Relevance intuition to try to connect them. Since BOOK-FLIGHT is a precondition for TAKE-FLIGHT, the system may hypothesize (infer) that the user is planning a TAKE-FLIGHT. Since TAKE-FLIGHT is in the body of FLY-TO, the system further infers a FLY-TO plan. Finally, since the effect of FLY-TO is a precondition of the MEETING, the system can unify each of the people, locations, and times of all of these plans. The result will be that the system knows that the client wants to arrive at the destination before May 12th.
Let's turn to the details of our second example:
C $ _{1} $: I need to travel in May.
A $ _{1} $: And, what day in May did you want to travel?
How does a plan-based agent know to ask question $ A_1 $? This knowledge comes from the BOOK-FLIGHT plan, whose preconditions were that the agent know a variety of flight parameters including the departure date and time, origin and destination cities, and so forth. Utterance $ C_1 $ contains the origin city and partial information about the departure date; the agent has to request the rest. A plan-based agent would use an action schema like REQUEST-INFO to represent a plan for asking information questions (simplified from Cohen and Perrault (1979)):
REQUEST-INFO(A,C,I):
Constraints: Agent(A) $ \land $ Client(C)
Precondition: Know(C,I)
Effect: Know(A,I)
Body: B(C,W(A,Know(A,I)))
Because the effects of REQUEST-INFO match each precondition of BOOK-FLIGHT, the agent can use REQUEST-INFO to achieve the missing information.