Informed Search and Exploration
Informed Search and Exploration
Ch. 03 – p.1/51
Outline
Best-first search
A∗ search
Heuristics, pattern databases
IDA∗ search
(Recursive Best-First Search (RBFS), MA∗ and
SMA∗ search)
Ch. 03 – p.2/51
Best-first search
Ch. 03 – p.3/51
Romania with step costs in km
Oradea
71
Neamt
Zerind 87
75 151
Iasi
Arad
140
92
Sibiu Fagaras
99
118
Vaslui
80
Rimnicu Vilcea
Timisoara
142
111 Pitesti 211
Lugoj 97
70 98
85 Hirsova
Mehadia 146 101 Urziceni
75 138 86
Bucharest
Dobreta 120
90
Craiova Eforie
Giurgiu
Ch. 03 – p.4/51
Greedy best-first search
Ch. 03 – p.5/51
Greedy best-first search example
Arad
Ch. 03 – p.6/51
After expanding Arad
Arad
140 75
118
Ch. 03 – p.7/51
After expanding Sibiu
Arad
140 75
118
80 329 374
140
99 151
Ch. 03 – p.8/51
After expanding Fagaras
Arad
140 75
118
80 329 374
140
99 151
Sibiu Bucharest
253 0
The goal Bucharest is found with a cost of 450. However, there is a
better solution through Pitesti (h = 417).
Ch. 03 – p.9/51
Properties of greedy best-first search
Ch. 03 – p.10/51
A∗ search
Ch. 03 – p.11/51
A∗ search example
Arad
366=0+366
Ch. 03 – p.12/51
After expanding Arad
Arad
Ch. 03 – p.13/51
After expanding Sibiu
Arad
447=118+329 449=75+374
Ch. 03 – p.14/51
After expanding Rimnicu Vilcea
Arad
447=118+329 449=75+374
Ch. 03 – p.15/51
After expanding Fagaras
Arad
447=118+329 449=75+374
646=280+366 671=291+380
Remember that the goal test is performed when a node is selected for
expansion, not when it is generated.
Ch. 03 – p.16/51
After expanding Pitesti
Arad
447=118+329 449=75+374
646=280+366 671=291+380
Ch. 03 – p.17/51
Optimality of A∗ for trees
Ch. 03 – p.18/51
Optimality of A∗ for trees (cont’d)
start
G1
G2
Ch. 03 – p.19/51
Progress of A∗ with an inconsistent heuristic
I
g=0, h=6, f=6
2 2
1 2
g=3, h=1, f=4 g=4, h=1, f=5
Ch. 03 – p.20/51
Progress of A∗ with an inconsistent heuristic
I
g=0, h=6, f=6
2 2
1 2
g=3, h=1, f=4 g=4, h=1, f=5
Ch. 03 – p.21/51
Progress of A∗ with an inconsistent heuristic
I
g=0, h=6, f=6
2 2
1 2
g=3, h=1, f=4 g=4, h=1, f=5
Ch. 03 – p.22/51
Progress of A∗ with an inconsistent heuristic
I
g=0, h=6, f=6
2 2
1 2
g=3, h=1, f=4 g=4, h=1, f=5
Ch. 03 – p.23/51
Progress of A∗ with an inconsistent heuristic
I
g=0, h=6, f=6
2 2
1 2
g=3, h=1, f=4 g=4, h=1, f=5
Ch. 03 – p.24/51
Progress of A∗ with an inconsistent heuristic
I
g=0, h=6, f=6
2 2
1 2
g=3, h=1, f=4 g=4, h=1, f=5
Ch. 03 – p.25/51
Consistency
A heuristic is consistent if n
h(n) ≤ c(n, a, n′ ) + h(n′ )
If h is consistent, we have c(n, a, n’) h(n)
Ch. 03 – p.26/51
Optimality of A∗ for graphs
Ch. 03 – p.27/51
F-contours
Z N
A I
380 S
F
V
400
T R
L P
H
M U
420 B
D
C E
G
Ch. 03 – p.28/51
Performance of A∗
Ch. 03 – p.29/51
Properties of A∗
Ch. 03 – p.30/51
Admissible heuristics
5 6 3 4 5
8 3 1 6 7 8
Ch. 03 – p.31/51
Dominance
Ch. 03 – p.32/51
Effect of Heuristic on Performance
Ch. 03 – p.33/51
Using relaxed problems to find heuristics
Ch. 03 – p.34/51
Relaxed problems (cont’d)
Ch. 03 – p.35/51
Pattern databases
Ch. 03 – p.36/51
Iterative Deepening A* (IDA*)
Ch. 03 – p.37/51
Iterative Deepening A* (IDA*)
Ch. 03 – p.38/51
Iterative Deepening A* (IDA*)
Ch. 03 – p.39/51
How would IDA* proceed?
Arad h=366
140 75
118
Ch. 03 – p.40/51
Properties of IDA*
Ch. 03 – p.43/51
RBFS Algorithm (cont’d)
Ch. 03 – p.44/51
Progress of RBFS
447
Sibiu Timisoara Zerind
393
447 449
415
Arad Fagaras Oradea Rimnicu Vilcea
413
646 415 526
447
Sibiu Timisoara Zerind
393 447 449
417
Arad Fagaras Oradea Rimnicu Vilcea
646 415 526 413 417
Sibiu Bucharest
591 450
447
Sibiu Timisoara Zerind
393 447 449
447
Arad Fagaras Oradea Rimnicu Vilcea
646 526 417
415 450
447
Craiova Pitesti Sibiu
526 417 553
Ch. 03 – p.45/51
Progress of RBFS (cont’d)
Ch. 03 – p.47/51
Properties of RBFS (cont’d)
Ch. 03 – p.48/51
MA* and SMA*
Ch. 03 – p.49/51
Summary
Ch. 03 – p.50/51
Summary (cont’d)
Ch. 03 – p.51/51