uninformed search strategies

26
Presented by – SHRUTI KAUSHIK 08MECS118 UNINFORMED SEARCH

Upload: skaushik2410

Post on 27-Apr-2015

2.260 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Uninformed Search Strategies

Presented by –SHRUTI KAUSHIK

08MECS118

UNINFORMED SEARCH

Page 2: Uninformed Search Strategies

DEFINITION

• Uninformed search uses no information about the likely “direction” of the goal node(s).• It uses only the information available in the

problem definition.• Initial state• Search operators• Goal Test• Path Cost

Page 3: Uninformed Search Strategies

MEASURING PERFORMANCE

• Completeness• Optimality• Time Complexity• Space Complexity• Branching Factor(b)• Depth (d)

Page 4: Uninformed Search Strategies

UNINFORMED SEARCH METHODS

• Breadth First Search (BFS)• Depth First Search (DFS)• Depth Limited Search• Iterative deepening Search(IDS)• Bidirectional

Page 5: Uninformed Search Strategies

BREADTH FIRST SEARCH

• Breadth-first search goes through the tree level by level, visiting all of the nodes on the top level first, then all the nodes on the second level, and so on. • The fringe is a FIFO QUEUE i.e. new successors go

at end.

Level 1

Level 2

Level 3

Root node

Page 6: Uninformed Search Strategies

BREADTH-FIRST SEARCH

1

12

111098765

432

SG

SI

Page 7: Uninformed Search Strategies

S

CBA

D GE

31

8

37

1520

5

Expanded nodes: S A B C D E GSolution found: S A G , cost 18Number of nodes expanded (including goal node) = 7

Page 8: Uninformed Search Strategies

BREADTH FIRST SEARCH

• Completeness: Yes• Optimality: Yes, for the shortest path• Time complexity:

1 + b + b2 +…..+ b d = O(b d )• Space complexity: O(bd)

Page 9: Uninformed Search Strategies

DEPTH FIRST SEARCH

• Depth-first search goes through the tree branch by branch, going all the way down to the leaf nodes at the bottom of the tree before trying the next branch.• The fringe is a LIFO queue i.e. new successors go

at the beginning.Root node

Level 1

Level 2

Level 3

Page 10: Uninformed Search Strategies

DEPTH FIRST SEARCH

1

7

8

6

5

2

3

4… SG

SI

Page 11: Uninformed Search Strategies

S

CBA

D GE

31

8

37

1520

5

Expanded node: S A D E GSolution found: S A G , cost 18Number of nodes expanded (including goal node) = 5

Page 12: Uninformed Search Strategies

DEPTH FIRST SEARCH

• Completeness: No, halts on infinite path• Optimality: No• Time complexity:

1 + b + b2 +…..+ b d = O(b m )• Space complexity:

O(bm)

Page 13: Uninformed Search Strategies

DEPTH LIMITED SEARCH

• It works exactly like depth-first search• Solves the infinite-path problem• Imposes a maximum limit on the depth of

the search.• The choice of the depth parameter is an

important factor

Page 14: Uninformed Search Strategies

DEPTH LIMITED SEARCH

Not explored

l

Limit l = 2l = 0

l = 2

l = 1

Page 15: Uninformed Search Strategies

S

CBA

D GE

31

8

37

1520

5

Expanded node: S A D E GSolution found: S A G , cost 18Number of nodes expanded (including goal node) = 5

Limit l = 2l = 0

l = 1

l = 2

Page 16: Uninformed Search Strategies

DEPTH LIMITED SEARCH

• Completeness: Yes, if depth < or = to the limit(l) • Optimality: No• Time complexity:

1 + b + b2 +…..+ bl = O(bl )• Space complexity:

O(bl)

Page 17: Uninformed Search Strategies

ITERATIVE DEEPENING SEARCH

• Combines the benefit of DFS and BFS with only moderate computational overhead.• Depth-Limited Search is run repeatedly,

increasing the depth limit with each iteration until it reaches d, the depth of the shallowest goal state. • On each iteration it visits the nodes in the same

order as depth-first search.

Page 18: Uninformed Search Strategies

ITERATIVE DEEPENING SEARCH

Limit 0

Limit 1

Limit 2

Page 19: Uninformed Search Strategies

S

CBA

D GE

31

8

37

1520

5

Expanded node: S S A B C S A D E GSolution found: S A G , cost 18Number of nodes expanded (including goal node) = 10

l = 0

l = 1

l = 2

Page 20: Uninformed Search Strategies

ITERATIVE DEEPENING SEARCH

• Completeness: Yes, • Optimality: Yes, for the shortest path• Time complexity:

1 + b + b2 +…..+ bd = O(bd )• Space complexity:

O(bd)

Page 21: Uninformed Search Strategies

BI-DIRECTIONAL SEARCH

• Simultaneously search forward from initial state and backwards from Goal State • Stop when both “meet in the middle”• Cuts the depth of the search tree by half

Initial State Goal State

d/2 d/2

d

Page 22: Uninformed Search Strategies

BI-DIRECTIONAL SEARCH

• Merge the solution, if the same state is reached from the other side

Equal?

Initial State Goal State

Page 23: Uninformed Search Strategies

BI-DIRECTIONAL SEARCH

1

3 4

8 9 10 11 12

2

13

75 6

SG

SI

Page 24: Uninformed Search Strategies

BI-DIRECTIONAL SEARCH

• Completeness: Yes• Optimality: Yes, for the shortest path• Time complexity:

O(bd/2 )• Space complexity:

O(bd/2)

Page 25: Uninformed Search Strategies

COMPARISON

Criterion BFS Bi-directional

DFS DLS IDS

Complete Yes Yes No Yes,if l d

Yes

Time O(bd) O(bd/2) O(bm ) O(bl ) O(bd)

Space O(bd) O(bd/2) O(bm) O(bl) O(bd)

Optimal Yes Yes No No Yes

Page 26: Uninformed Search Strategies

THANK YOU