foundations of computational agents
The third edition of Artificial Intelligence: foundations of computational agents, Cambridge University Press, 2023 is now available (including full text).
Dimensions: flat, features, indefinite horizon, fully observable, deterministic, goal directed, non-learning, single agent, offline, perfect rationality
It is often more efficient to search in a different search space – one where the nodes are not states but rather are subgoals to be achieved. A subgoal is an assignment to some of the features.
Regression planning is searching in the graph defined by the following:
The nodes are subgoals.
The arcs correspond to actions. In particular, an arc from node to , labeled with action , means
is the last action that is carried out before subgoal is achieved, and
node is a subgoal that must be true immediately before so that is true immediately after .
The start node is the planning goal to be achieved.
The goal condition for the search, , is true if is true of the initial state.
Given a node that represents subgoal , a neighbor of exists for every action such that
is possible, it is possible for to be carried out and for to be true immediately after and
is useful, achieves part of .
Consider the subgoal . In terms of the STRIPS representation, is useful for solving if, for some , is an effect of action . Immediately before , the preconditions of , as well as any not achieved by , must hold. Thus the neighbor of subgoal on the arc labeled with is the subgoal , as long as is possible. Action is possible if:
for each in , there is no effect of where and
does not include two different assignments to any feature.
Suppose the goal is to achieve . Therefore, the start node is . If this is true in the initial state, the planner stops. If not, it chooses an action that achieves . In this case, there is only one such action: . The precondition of is . Thus, there is one arc:
Consider the node . There are two actions that can achieve , namely from and from . There is one action that can achieve , namely . However, has as precondition , but and are inconsistent (because they involve different assignments to the variable ). Therefore, is not a possible last action; it is not possible that, immediately after , the condition holds.
Figure 6.3 shows the first three levels of the search space (without cycle pruning or multiple-path pruning). Note that the search space is the same no matter what the initial state is. The starting state has two roles: to serve as a stopping criterion and as a source of heuristics.
If a subgoal contains a number of assignments, regression can often determine which of the assignments to achieve last, as in the following example.
Suppose the goal is for Sam to not want coffee and for the robot to have coffee: . The last action cannot be to achieve , because this achieves . The only last action must be to achieve . Thus, the resulting subgoal is . Again, the last action before this subgoal cannot be to achieve because this has as a precondition , which is inconsistent with . Therefore, the second-to-last action must be a move action to achieve .
In terms of the feature-based representation of actions, an action is useful if there is a causal rule that achieves for some , using action . The neighbor of this node along the arc labeled with action is the proposition
where is the set of assignments of variables in the body of a rule that specifies when is true immediately after . There is no such neighbor if there is no corresponding rule for some , or if the proposition is inconsistent (i.e., assigns different values to a variable). Note that, if multiple rules are applicable for the same action, there will be multiple neighbors.
Search algorithms such as and branch-and-bound can make use of heuristic knowledge. For a regression planner, the heuristic value of a node is an estimate of the cost to achieve the subgoal represented by the node from the initial state. This form of heuristic as an estimate of the cost of achieving a subgoal from a state is the same as used in a forward planner. So, for example, the heuristic of Example 6.10 could also be used for a regression planner. However, an effective heuristic for a regression planner may not be very useful for a forward planner, and vice versa (see Exercise 4).
One problem that arises in regression planning is that a subgoal may not be achievable. Deciding whether a subgoal is achievable is often difficult to infer from the definitions of the actions. For example, consider the restriction that an object cannot be at two different places at the same time; sometimes this is not explicitly represented and is only implicit in the effects of an action, and the fact that the object is only in one position initially. It is possible to have domain knowledge to prune nodes that can be shown to be inconsistent.
Cycle pruning and multiple-path pruning may be incorporated into a regression planner. The regression planner does not have to visit exactly the same node to prune the search. If the subgoal represented by a node is a superset of a subgoal on the path to , node can be pruned. Similarly, for multiple-path pruning, see Exercise 10.
A regression planner commits to a total ordering of actions, even if no particular reason exists for one ordering over another. This commitment to a total ordering tends to increase the complexity of the search space if the actions do not interact much or at all. For example, a regression planner would test each permutation of a sequence of actions when it may be possible to show that no ordering can succeed.