foundations of computational agents
A policy specifies what the agent should do under all contingencies. A policy consists of a decision function for each decision variable. A decision function for a decision variable is a function that specifies a value for the decision variable for each assignment of values to its parents. Thus, a policy specifies, for each decision variable, what the agent will do for each of the possible observations.
In Example 9.13, some of the policies are:
Always bring the umbrella.
Bring the umbrella only if the forecast is “rainy.”
Bring the umbrella only if the forecast is “sunny.”
There are eight different policies, because there are three possible forecasts and there are two choices for each forecast.
In Example 9.15, a policy specifies a decision function for and a decision function for . Some of the policies are:
Never check for smoke, and call only if there is a report.
Always check for smoke, and call only if it sees smoke.
Check for smoke if there is a report, and call only if there is a report and it sees smoke.
Check for smoke if there is no report, and call when it does not see smoke.
Always check for smoke and never call.
There are four decision functions for . There are decision functions for ; for each of the eight assignments of values to the parents of , the agent can choose to call or not. Thus there are different policies.
Each policy has an expected utility for an agent that follows the policy. A rational agent should adopt the policy that maximizes its expected utility.
A possible world specifies a value for each random variable and each decision variable. A possible world satisfies policy if for every decision variable , has the value specified by the policy given the values of the parents of in the possible world.
A possible world corresponds to a complete history and specifies the values of all random and decision variables, including all observed variables. Possible world satisfies policy if is one possible unfolding of history given that the agent follows policy .
The expected utility of policy is
where , the probability of world , is the product of the probabilities of the values of the chance nodes given their parents’ values in , and is the value of the utility in world .
Consider Example 9.13, let be the policy to take the umbrella if the forecast is cloudy and to leave it at home otherwise. The worlds that satisfy this policy are:
Notice how the value for the decision variable is the one chosen by the policy. It only depends on the forecast.
The expected utility of this policy is obtained by averaging the utility over the worlds that satisfy this policy:
where means , means , and similarly for the other values.
An optimal policy is a policy such that for all policies . That is, an optimal policy is a policy whose expected utility is maximal over all policies.
Suppose a binary decision node has binary parents. There are different assignments of values to the parents and, consequently, there are different possible decision functions for this decision node. The number of policies is the product of the number of decision functions for each of the decision variables. Even small examples can have a huge number of policies. An algorithm that simply enumerates the policies looking for the best one will be very inefficient.