




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of various search algorithms, including best-first, greedy, a*, hill climbing, simulated annealing, genetic algorithm, and constraint satisfaction. It covers both uninformed and informed strategies, as well as local search algorithms. Examples and exercises.
Typology: Slides
1 / 160
This page cannot be seen from the preview
Don't miss anything!





























































































Lecture 4 c
The following figure shows a portion of a partially expanded search tree. Each arc between nodes is labeled with the cost of the corresponding operator, and the leaves are labeled with the value of the heuristic function,h. Which node (use the node’s letter) will be expanded next by each of the following search algorithms? (a) Depth-first search (b) Breadth-first search (c) Uniform-cost search (d) Greedy search (e) A* search^5 D 5
A
C 4 5
19
6
3
h=
B
E F G h=10 h=12 h=8 h=
h= H
h=
h=
Node queue: initialization
Node queue: add successors to queue front; empty queue from top
5 E 2 7 2 6 F 2 8 2 7 G 2 8 2 8 H 2 9 2 2 B 1 3 1 3 C 1 19 1 4 D 1 5 1 1 A 0 0 --
Node queue: add successors to queue front; empty queue from top
5 E 2 7 2 6 F 2 8 2 7 G 2 8 2 8 H 2 9 2 2 B 1 3 1 3 C 1 19 1 4 D 1 5 1 1 A 0 0 --
Node queue: initialization
1 A 0 0 --
Node queue: add successors to queue end; empty queue from top
1 A 0 0 -- 2 B 1 3 1 3 C 1 19 1 4 D 1 5 1
Node queue: add successors to queue end; empty queue from top
1 A 0 0 -- 2 B 1 3 1 3 C 1 19 1 4 D 1 5 1 5 E 2 7 2 6 F 2 8 2 7 G 2 8 2 8 H 2 9 2
The following figure shows a portion of a partially expanded search tree. Each arc between nodes is labeled with the cost of the corresponding operator, and the leaves are labeled with the value of the heuristic function,h. Which node (use the node’s letter) will be expanded next by each of the following search algorithms? (a) Depth-first search (b) Breadth-first search (c) Uniform-cost search (d) Greedy search (e) A* search^5 D 5
A
C 4 5
19
6
3
h=
B
E F G h=10 h=12 h=8 h=
h= H
h=
h=
Node queue: add successors to queue so that entire queue is sorted by path cost so far; empty queue from top
1 A 0 0 -- 2 B 1 3 1 3 D 1 5 1 4 C 1 19 1
Node queue: add successors to queue so that entire queue is sorted by path cost so far; empty queue from top
1 A 0 0 -- 2 B 1 3 1 3 D 1 5 1 5 E 2 7 2 6 F 2 8 2 7 G 2 8 2 8 H 2 9 2 4 C 1 19 1
Open list: C
Open list: B(2) T(1) O(3) E(2) P(5)