Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Lecture 11

Uninformed Search
Strategies
Artificial Intelligence
COSC-3112

Ms. Humaira Anwer


humairaanwer13@ce.ceme.edu.pk

Lecture 11 Solving Problems by Searching 1


Today’s Agenda
• Uninformed Search
• Uniform Cost Search (UCS)

Lecture 11 Solving Problems by Searching 2


Uniform Cost Search
• Same idea as the algorithm for breadth-first
search…but…
• Expand the least-cost unexpanded node
• FIFO queue is ordered by cost
• What if all step costs are equal?
• Equivalent to regular breadth-first search if all step costs are
equal

Lecture 11 Solving Problems by Searching 3


Uniform Cost Search
A
5 9
4
2 3
B C D

2 3 4 3
7

E G1 F G2

Lecture 11 Solving Problems by Searching 4


A
5 9
4
Uniform Cost Search B
2 C 3
D

2 3 4 3
7
A
G G
5 9 E 1 F 2
4

B 5 C 4
3 D
7 9
2 3
2
G1
11
D
E G1
7
7 C 8 3
7 4
GOAL
F G2
11 10
Visited List
A C B E D

Lecture 11 Solving Problems by Searching 5


Uniform Cost Search
• Complete
• Yes
• Time
• Let C* be the cost of the optimal solution
• O(b1+(C*/ ε))
• Space
• O(b1+(C*/ ε))
• Optimal
• Yes
• Time and space complexity when all costs are
equal?
O(b1+(C*/ ε)) = bd+1

Lecture 11 Solving Problems by Searching 6

You might also like