Problem-Solving Agent: Goal Formulation Problem Formulation Search
Problem-Solving Agent: Goal Formulation Problem Formulation Search
5
Example: Romania
On holiday in Romania; currently in Arad
Flight leaves tomorrow from Bucharest
Formulate goal
Be in Bucharest
Formulate problem
States: various cities
Actions: drive between cities
Find solution
Sequence of cities; e.g. Arad, Sibiu, Fagaras, Bucharest,
…
6
Problem type
Given how we have defined the problem:
Environment is fully observable
Environment is deterministic
Environment is sequential
Environment is static
Environment is discrete
Environment is single-agent
7
Problem formulation
A problem is defined by:
An initial state, e.g. In(Arad)
A successor function S(X)= set of action-state pairs
e.g. S(In(Arad))={(Go(Sibiu), In(Sibiu)), (Go(Zerind), In(Zerind)),…}
initial state + successor function = state space
Goal test
Explicit, e.g. x=‘In(Bucharest)’
Implicit, e.g. checkmate(x)
Path cost (assume additive)
e.g. sum of distances, number of actions executed, …
c(x,a,y) is the step cost, assumed to be >= 0
States??
Initial state??
Actions??
Goal test??
Path cost??
9
Example: 8-puzzle
Incremental formulation
States: Any arrangement of 0 to 8 queens on the board
Initial state: No queens
Actions: Add queen to any empty square
Goal test: 8 queens on board and none attacked
Path cost: N/A
3 x 1014 possible sequences to investigate 12
Example: 8-queens problem
14