Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Graph search:
A* optimal if heuristic is consistent
UCS optimal (h = 0 is consistent)
Environment is static
no changes in environment while problem is being
solved
Environment is observable
Environment and actions are discrete
(typically assumed, but exceptions are always there)
Environment is deterministic
FORMULATE A STATE SPACE (NAVIGATION EXAMPLE)
Set of States
Individual cities
Operators
Freeway routes from one city to another
Start State
Current City
Goal States
Set of cities we would like to be in
Solution
A specific goal city,
A sequence of operators which get us there,
PERFORM ABSTRACTION
Can later worry about details like Refueling Stations, Scene Views, Refreshment Points…
States:
any arrangement of n<=8 queens
or arrangements of n<=8 queens in leftmost n
columns, 1 per column, such that no queen
attacks any other.
initial state:
no queens on the board
Actions:
add queen to any empty square
or add queen to leftmost empty square such that it is not attacked by other queens.
Goal Test:
8 queens on the board, none attacked.
Path Cost? 1 per move
8- PUZZLE EXAMPLE FOR A* = UCS + GREEDY: F(N) = H(N) + G(N)
SEARCHING STRATEGIES