blind search methods

12
4TH WEEK BLIND SEARCH METHODS ARTIFICIAL INTELLIGENCE 2011-1 Group 1

Upload: mauro

Post on 27-Nov-2014

85 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Blind Search Methods

4TH WEEK BLIND SEARCH

METHODS

ARTIFICIAL INTELLIGENCE2011-1 Group 1

Page 2: Blind Search Methods

BLIND SEARCHES

INTRODUCTION A blind search (also called an

uninformed search) is a search that has no information about its domain. The only thing that a blind search can do is distinguish a non-goal state from a goal state.

Page 3: Blind Search Methods

BLIND SEARCHES METHODS

Breadth-First SearchIt 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. This strategy has the benefit of being complete (if there's a solution, it will be found), and optimal as long as the shallowest solution is the best solution.

Page 4: Blind Search Methods

Breadth-First Search Algorythm

1. QUEUE <-- path only containing the root;

2. WHILE QUEUE is not empty AND goal is not reached

DO remove the first path from the QUEUE; create new paths (to all children); reject the new paths with loops; add the new paths to back of QUEUE;

3. IF goal reached THEN success; ELSE failure;

Page 5: Blind Search Methods

Breadth-First Search

EXAMPLE:In this example, we can notice the level-by-level search to find the word “search”

Page 6: Blind Search Methods

BLIND SEARCHES METHODS

Depth-First SearchIt 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 over. This strategy requires much less memory than breadth-first search, since it only needs to store a single path from the root of the tree down to the leaf node.

Page 7: Blind Search Methods

Algorythm

1. QUEUE <-- path only containing the root;

2. WHILE QUEUE is not empty AND goal is not reached

DO remove the first path from the QUEUE; create new paths (to all children); reject the new paths with loops; add the new paths to front of QUEUE;

3. IF goal reached THEN success; ELSE failure;

Depth-First Search

Page 8: Blind Search Methods

Depth-First Search

12º

16º

13º

EXAMPLE:In this example, we can notice the level-by-level search to find the word “search”

10º

11º

14º

15º

17º

Page 9: Blind Search Methods

BLIND SEARCHES METHODS

Non Deterministic SearchForm a one element queue consisting of a

zero-length path that only contains rootUntil the first path in the queue terminates at

the goal node or the queue is empty Remove the first path from the queue; create

new paths by extending the first path to all neighbors of the terminal node

Reject all new paths with loops Add the new paths at RANDOM places in the

queue

If the goal node is foundsuccess; else failure

Page 10: Blind Search Methods

Non Deterministic Search Algorythm:

1. QUEUE <-- path only containing the root;

2. WHILE QUEUE is not empty AND goal is not reached

DO remove the first path from the QUEUE; create new paths (to all children); reject the new paths with loops; add the new paths in random places in QUEUE;

3. IF goal reached THEN success; ELSE failure;

Page 11: Blind Search Methods