Informed Search
Informed Search
8
0 S arc cost
1 5 8
1 A 8 5 B
4
8 C 3
3 9 h value
7 4 5 g value
4 D 8 E
9 G 0
goal state
Example
n g(n) h(n) f(n) h*(n)
S 0 8 8 9
A 1 8 9 9
B 5 4 9 4
C 8 3 11 5
D 4 inf inf inf
E 8 inf inf inf
G 9 0 9 0
f(n) = h(n)
Solution space of P
h1(start) = 7
h2(start) = 18
h3(start) = 7
• Example: TSP. A legal tour is a (Hamiltonian) circuit
– It is a connected second degree graph (each node has
exactly two adjacent edges)
Removing the connectivity constraint leads to h1:
find the cheapest second degree graph from the
given graph
(with o(n^3) complexity)
Height Defined by
Evaluation
Function
Hill Climbing Search
• If there exists a successor n’ for the current state n
such that
• h(n’) < h(n)
• h(n’) <= h(t) for all the successors t of n,
• then move from n to n’. Otherwise, halt at n.
• Looks one step ahead to determine if any
successor is better than the current state; if there
is, move to the best successor.
• Similar to Greedy search in that it uses h, but does
not allow backtracking or jumping to an alternative
path since it doesn’t “remember” where it has
been.
• OPEN = {current-node}
Hill climbing example
2 8 3 1 2 3
start 1 6 4 h=4 goal 8 4 h=0
7 5 7 6 5
5 5 2
2 8 3 1 2 3
1 4 h=3 8 4 h=1
7 6 5 7 6 5
3 4
2 3 2 3
1 8 4 1 8 4 h=2
7 6 5 7 6 5
h=3 4