Lecture-03-04-Uninformed_Search

# In iterative deepening nodes at bottom level are

This preview shows pages 83–92. Sign up to view the full content.

In iterative deepening, nodes at bottom level are expanded once, level above twice, etc. up to root (expanded d+1 times) so total number of expansions is: (d+1) b 0 + (d) b 1 + (d-1) b 2 + … + 3 b (d-2) + 2 b (d-1) + 1 b d = O( b d ) In general, iterative deepening is preferred to depth-first or breadth- first when search space large and depth of solution not known. CS561 - Lectures 3-4 - Macskassy - Fall 2010

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Properties of iterative deepening search CS561 - Lectures 3-4 - Macskassy - Fall 2010
Bidirectional search Both search forward from initial state, and backwards from goal . Stop when the two searches meet in the middle. Problem: how do we search backwards from goal?? predecessor of node n = all nodes that have n as successor this may not always be easy to compute! if several goal states, apply predecessor function to them just as we applied successor (only works well if goals are explicitly known; may be difficult if goals only characterized implicitly). Goal Start CS561 - Lectures 3-4 - Macskassy - Fall 2010

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Bidirectional search Problem: how do we search backwards from goal?? (cont.) for bidirectional search to work well, there must be an efficient way to check whether a given node belongs to the other search tree. select a given search algorithm for each half. Goal Start CS561 - Lectures 3-4 - Macskassy - Fall 2010
Bidirectional search 1.QUEUE1 path only containing the root; QUEUE2 path only containing the goal; 2. WHILE both QUEUEs are not empty AND QUEUE1 and QUEUE2 do NOT share a state DO remove their first paths; create their new paths (to all children); reject their new paths with loops; add their new paths to back; 3. IF QUEUE1 and QUEUE2 share a state THEN success; ELSE failure; CS561 - Lectures 3-4 - Macskassy - Fall 2010

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Bidirectional search Completeness: Yes, Time complexity: 2* O(b d/2 ) = O(b d/2 ) Space complexity: O(b d/2 ) Optimality: Yes To avoid one by one comparison, we need a hash table of size O(b d/2 ) If hash table is used, the cost of comparison is O(1) CS561 - Lectures 3-4 - Macskassy - Fall 2010
Bidirectional Search d d / 2 Initial State Final State CS561 - Lectures 3-4 - Macskassy - Fall 2010

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Bidirectional search Bidirectional search merits: Big difference for problems with branching factor b in both directions A solution of length d will be found in O(2 b d /2 ) = O( b d /2 ) For b = 10 and d = 6, only 2,222 nodes are needed instead of 1,111,111 for breadth-first search CS561 - Lectures 3-4 - Macskassy - Fall 2010
Bidirectional search Bidirectional search issues Predecessors of a node need to be generated Difficult when operators are not reversible What to do if there is no explicit list of goal states? For each node: check if it appeared in the other search Needs a hash table of O( b d /2 ) What is the best search strategy for the two searches?

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern