Well-Defined Problems and Solutions

A problem can be defined formally by five components:

• The initial state that the agent starts in. For example, the initial state for our agent in Romania might be described as In(Arad).



• A description of the possible actions available to the agent. Given a particular state s, ACTIONS(s) returns the set of actions that can be executed in s. We say that each of these actions is applicable in s. For example, from the state In(Arad), the applicable actions are {Go(Sibiu), Go(Timisoara), Go(Zerind)}.

• A description of what each action does; the formal name for this is the transitionmodel, specified by a function RESULT(s, a) that returns the state that results from doing action a in state s. We also use the term successor to refer to any state reachable
from a given state by a single action.2 For example, we have
RESULT(In(Arad), Go(Zerind)) = In(Zerind)

Together, the initial state, actions, and transition model implicitly define the state space of the problem—the set of all states reachable from the initial state by any sequence of actions. The state space forms a directed network or graph in which the nodes
are states and the links between nodes are actions. (The map of Romania shown in Figure 3.2 can be interpreted as a state-space graph if we view each road as standing  for two driving actions, one in each direction.) A path in the state space is a sequence of states connected by a sequence of actions.

• The goal test, which determines whether a given state is a goal state. Sometimes there is an explicit set of possible goal states, and the test simply checks whether the given state is one of them. The agent’s goal in Romania is the singleton set {In(Bucharest)}.


EmoticonEmoticon