




























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























Chapter 4, Sections 1–
Chapter 4, Sections 1–
1
Best-first search
∗
search
Heuristics
Chapter 4, Sections 1–
2
Idea
: use an
evaluation function
for each node
Expand most desirable unexpanded node
Implementation
fringe
is a queue sorted in decreasing order of desirability
Special cases:
A greedy search
∗
search
Chapter 4, Sections 1–
4
Zerind Vaslui Urziceni Timisoara Sibiu Rimnicu Vilcea Pitesti Oradea Neamt Mehadia Lugoj Iasi Hirsova Giurgiu Fagaras Eforie Dobreta Craiova Bucharest Arad to Bucharest Straight−line distance
0
161242160 77
329253193 241 151 178 366 80
374199 380234 244226 98
Giurgiu
Urziceni
Hirsova Eforie
Neamt
Oradea
Zerind
Arad
Timisoara
Mehadia^ Lugoj
Dobreta
Craiova
Sibiu
Fagaras
Pitesti
Vaslui
Iasi
Rimnicu Vilcea
Bucharest
71
75
118
111
75 70
120
151
140
99
80
97
101
211
138
146
85
90
98 142 92
87
86
Chapter 4, Sections 1–
5
366 Arad
Chapter 4, Sections 1–
7
Zerind
Arad
Sibiu
Timisoara
253
329
374
Chapter 4, Sections 1–
8
Rimnicu Vilcea
Zerind
Arad
Sibiu
Arad
Fagaras
Oradea
Timisoara
Sibiu
Bucharest
329
374
366
380
193
253
0
Chapter 4, Sections 1–
10
Complete
Chapter 4, Sections 1–
11
Complete
No–can get stuck in loops, e.g.,
Iasi
Neamt
Iasi
Neamt
Time Complete in finite space with repeated-state checking
b m
) , but a good heuristic can give dramatic improvement
Space
Chapter 4, Sections 1–
13
Complete
No–can get stuck in loops, e.g.,
Iasi
Neamt
Iasi
Neamt
Time Complete in finite space with repeated-state checking
b m
) , but a good heuristic can give dramatic improvement
Space
b m
) —keeps all nodes in memory
Optimal
Chapter 4, Sections 1–
14
∗
Idea
: avoid expanding paths that are already expensive
Evaluation function
f (^) ( n
) =
g
( n
) +
h
( n
)
g
( n
)
= cost so far to reach
n
h
( n
)
= estimated cost to goal from
n
f (^) ( n
)
= estimated total cost of path through
n
to goal
∗
search uses an
admissible
heuristic
i.e.,
h ( n ) ≤ h ∗ ( n )
where
h
∗ ( n
)
is the
true
cost from
n
.
(Also require
h ( n ) ≥ 0
, so
h
( G
for any goal
E.g.,
h
SLD
n
)
never overestimates the actual road distance
Theorem
∗
search is optimal
Chapter 4, Sections 1–
16
∗
Arad
366=0+
Chapter 4, Sections 1–
17
∗
Zerind
Arad
Sibiu
Arad
Timisoara
Rimnicu Vilcea
Fagaras
Oradea
447=118+
449=75+
646=280+
413=220+
415=239+
671=291+
Chapter 4, Sections 1–
19
∗
Zerind
Arad
Sibiu
Arad
Timisoara
Fagaras
Oradea
447=118+
449=75+
646=280+
415=239+
Rimnicu Vilcea
Craiova
Pitesti
Sibiu
526=366+
553=300+
417=317+
671=291+
Chapter 4, Sections 1–
20