blind search methods
TRANSCRIPT
4TH WEEK BLIND SEARCH
METHODS
ARTIFICIAL INTELLIGENCE2011-1 Group 1
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.
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.
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;
Breadth-First Search
1º
2º
4º
3º
6º
5º
8º
7º
9º
EXAMPLE:In this example, we can notice the level-by-level search to find the word “search”
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.
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
Depth-First Search
1º
12º
16º
2º
9º
13º
4º
3º
7º
EXAMPLE:In this example, we can notice the level-by-level search to find the word “search”
10º
11º
14º
15º
17º
5º
6º
8º
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
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;
Bibliography
http://www.cs.nott.ac.uk/~gxk/courses/g5aiai/003blindsearches/blind_searches.htm
http://www.cse.unl.edu/~choueiry/S03-476-876/searchapplet/index.html
www.cse.unr.edu/~sushil/class/ps/notes/wk2.2.ppt
www.cs.kuleuven.ac.be/~dannyd/AI_Chap3_Blind.ppt