5_SP10 cs188 lecture 3 -- a-star search (2PP)

5_SP10 cs188 lecture 3 -- a-star search (2PP) - s Unlike a...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
5 Uniform Cost Search S a b d p a c e p h f r q q c G a q e p h f r q q c G a Expand cheapest node first: Fringe is a priority queue S G d b p q c e h a f r 3 9 1 16 4 11 5 7 13 8 10 11 17 11 0 6 3 9 1 1 2 8 8 2 15 1 2 Cost contours 2 Priority Queue Refresher pq.push(key, value) inserts (key, value) into the queue. pq.pop() returns the key with the lowest value, and removes it from the queue. square4 You can decrease a key’s priority by pushing it again
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: s Unlike a regular queue, insertions aren’t constant time, usually O(log n ) s We need priority queues for cost-sensitive search methods s A priority queue is a data structure in which you can insert and retrieve (key, value) pairs with the following operations:...
View Full Document

{[ snackBarMessage ]}

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