foundations of computational agents
The third edition of Artificial Intelligence: foundations of computational agents, Cambridge University Press, 2023 is now available (including full text).
So far we have assumed that actions are atomic and that an agent can only do one action at any time. For the CSP representation, it can be useful to describe the actions in terms of features – to have a factored representation of actions as well as a factored representation of states. The features representing actions are called action features and the features representing states are called state features. The action features can be considered as actions in themselves that are carried out in the same time step.
In this case, there can be an extra set of constraints called action constraints to specify which action features cannot co-occur. These are sometimes called mutual exclusion or mutex constraints.
Another way to model the actions of Example 6.1 is that, at each step, Rob gets to choose
whether it will pick up coffee. Let be a Boolean variable that is true when Rob picks up coffee.
whether it will deliver coffee. Let be a Boolean variable that is true when Rob delivers coffee.
whether it will pick up mail. Let be a Boolean variable that is true when Rob picks up mail.
whether it will deliver mail. Let be a Boolean variable that is true when Rob delivers mail.
whether it moves. Let be a variable with domain that specifies whether Rob moves clockwise, moves counterclockwise, or does not move ( means “not move”).
Thus the agent can be seen as doing more than one action in a single stage. For some of the actions at the same stage, the robot can do them in any order, such as delivering coffee and delivering mail. Some of the actions at the same stage need to be carried out in a particular order, for example, the agent must move after the other actions.
– Rob’s location – Rob has coffee – Sam wants coffee – Mail is waiting – Rob has mail – Rob’s move action – Rob picks up coffee – Rob delivers coffee – Rob picks up mail – Rob delivers mail |
Consider finding a plan to get Sam coffee, where initially, Sam wants coffee but the robot does not have coffee. The initial state can be represented as two domain constraints: and on . The goal is that Sam no longer wants coffee, .
With a planning horizon of 2, the CSP is shown in Figure 6.5. The goal is represented as the domain constraint , there is a solution (the robot has to start in the coffee shop), (the robot has to pick up coffee initially), (the robot has to move to the office), and (the robot has to deliver coffee at time 1).
Note that in the representation without factored actions, the problem cannot be solved with a horizon of 2; it requires a horizon of 3, as there are no concurrent actions.