Lecture-03-04-Uninformed_Search

E 5 f 5 s a c 1 5 b 1 1 state depth cost parent 1 s 2

Info icon This preview shows pages 66–84. Sign up to view the full content.

View Full Document Right Arrow Icon
E 5 F 5 S A C 1 5 B 1 1 # State Depth Cost Parent 1 S 0 0 - 2 A 1 1 1 4 B 2 2 2 5 C 3 3 4 7 D 4 8 5 8 E 5 13 7 9 F 6 18 8 10 G 7 23 9 6 G 3 102 4 The node with state G and cost 102 has been removed from the open queue and placed into the closed queue, as a cheaper node with state G and code 23 was pushed into the open queue. CS561 - Lectures 3-4 - Macskassy - Fall 2010
Image of page 66

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

View Full Document Right Arrow Icon
Example G 100 5 D 5 E 5 F 5 S A C 1 5 B 1 1 # State Depth Cost Parent 1 S 0 0 - 2 A 1 1 1 4 B 2 2 2 5 C 3 3 4 7 D 4 8 5 8 E 5 13 7 9 F 6 18 8 10 G 7 23 9 6 G 3 102 4 Goal reached CS561 - Lectures 3-4 - Macskassy - Fall 2010
Image of page 67
Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front CS561 - Lectures 3-4 - Macskassy - Fall 2010
Image of page 68

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

View Full Document Right Arrow Icon
Romania with step costs in km CS561 - Lectures 3-4 - Macskassy - Fall 2010
Image of page 69
Depth-first search CS561 - Lectures 3-4 - Macskassy - Fall 2010
Image of page 70

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

View Full Document Right Arrow Icon
Depth-first search CS561 - Lectures 3-4 - Macskassy - Fall 2010
Image of page 71
Depth-first search CS561 - Lectures 3-4 - Macskassy - Fall 2010
Image of page 72

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

View Full Document Right Arrow Icon
Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front CS561 - Lectures 3-4 - Macskassy - Fall 2010
Image of page 73
Time complexity of depth-first In the worst case: the (only) goal node may be on the right-most branch, G m b Time complexity = b m + b m-1 + … + 1 = b m+1 - 1 Thus: O(b m ) b - 1 CS561 - Lectures 3-4 - Macskassy - Fall 2010
Image of page 74

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

View Full Document Right Arrow Icon
Space complexity of depth-first Largest number of nodes in QUEUE is reached in bottom left- most node. Example: m = 3, b = 3 : ... QUEUE contains all nodes = 7. In General: ((b-1) * m) + b Order: O(m*b) G CS561 - Lectures 3-4 - Macskassy - Fall 2010
Image of page 75
Avoiding repeated states In increasing order of effectiveness and computational overhead: do not return to state we come from , i.e., expand function will skip possible successors that are in same state as node’s parent. do not create paths with cycles , i.e., expand function will skip possible successors that are in same state as any of node’s ancestors. do not generate any state that was ever generated before , by keeping track (in memory) of every state generated, unless the cost of reaching that state is lower than last time we reached it. CS561 - Lectures 3-4 - Macskassy - Fall 2010
Image of page 76

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

View Full Document Right Arrow Icon
Depth-limited search Is a depth-first search with depth limit l CS561 - Lectures 3-4 - Macskassy - Fall 2010
Image of page 77
Iterative deepening search Combines the best of breadth-first and depth-first search strategies. CS561 - Lectures 3-4 - Macskassy - Fall 2010
Image of page 78

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

View Full Document Right Arrow Icon
Iterative deepening search l = 0 CS561 - Lectures 3-4 - Macskassy - Fall 2010
Image of page 79
Iterative deepening search l = 1 CS561 - Lectures 3-4 - Macskassy - Fall 2010
Image of page 80

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

View Full Document Right Arrow Icon
Iterative deepening search l = 2 CS561 - Lectures 3-4 - Macskassy - Fall 2010
Image of page 81
Iterative deepening search l = 3 CS561 - Lectures 3-4 - Macskassy - Fall 2010
Image of page 82

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

View Full Document Right Arrow Icon
Iterative deepening complexity Iterative deepening search may seem wasteful because so many states are expanded multiple times. In practice, however, the overhead of these multiple expansions is small, because most of the nodes are towards leaves (bottom) of the search tree: thus, the nodes that are evaluated several times (towards top of tree) are in relatively small number.
Image of page 83
Image of page 84
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

0/0 PREVIEWS LEFT
Sign up to access 24/7 study resources for your classes

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern