Lecture04 - CS440/ECE448 Intro to Articial Intelligence...

Info icon This preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 4: Heuristic search and local search Prof. Julia Hockenmaier [email protected] http://cs.illinois.edu/fa11/cs440 CS440/ECE448: Intro to Artificial Intelligence
Image of page 1

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

View Full Document Right Arrow Icon
Tuesday ʼ s key concepts Problem solving as search: Solution = a finite sequence of actions State graphs and search trees Which one is bigger/better to search? Systematic (blind) search algorithms Breadth-first vs. depth-first; properties? 2 CS440/ECE448: Intro AI
Image of page 2
Blind search: deterministic queuing functions Depth-first search (LIFO) Expand deepest node first QF(old, new): Append(new, old) Breadth-first (FIFO) Expand nodes level by level QF(old, new): Append(old, new); A B C D G H J I F E A B C D G H J I F E
Image of page 3

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

View Full Document Right Arrow Icon
Graph search R R R R R R R R R R R Initial state a2 a1 a3 Explored set Frontier (Queue) Unexplored set R …. Goal state R Goal state …. R Goal state …. b3 c5 b4 b1 b2
Image of page 4
Today ʼ s key questions How can we find the optimal solution? We need to assign values to solutions How can we find a better solution if we can only foresee the effect (=value) of the next action? This is local search. 5 CS440/ECE448: Intro AI
Image of page 5

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

View Full Document Right Arrow Icon
Informed (heuristic) search
Image of page 6
Considering the cost of solutions We may not just want to find any solution, but the cheapest solution , if: Each action has a (positive, finite) cost Some solutions may be cheaper than others 7 CS440/ECE448: Intro AI
Image of page 7

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

View Full Document Right Arrow Icon
Heuristic search: priority queue Heuristic search algorithms sort the nodes on the queue according to a cost function : QF(a,b): sort (append(a,b), CostFunction ) The cost function is an estimate of the true cost. Nodes with the lowest estimated cost have the highest priority. 8
Image of page 8
Heuristic graph search 9 SEARCH(Problem P, Queuing Function QF): local: n, q, e; q new List(Initial_State(P)); Loop: if q == () return failure; n Pop(q); if n solves P return n; add n.STATE to e for m in Expand(n): if m is not in e or q: q QF(q,{m}); /*NEW: we want to find the cheapest goal!*/ else if m.STATE in q with higher cost : q replace(q, m.STATE, m); end
Image of page 9

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

View Full Document Right Arrow Icon
Cost from root to node: g(n) g*(n): Minimum cost from root to n g*(n) is the sum of the costs for each action from the root to node n. This requires a cost function for actions g(n): Computable approximation to g*(n) For trees: g(n) == g*(n) 10 CS440/ECE448: Intro AI
Image of page 10
Uniform-cost search Sort the queue by path cost g(n): First expand the node with lowest g(n) QF(a,b): sort(Append(a,b), g ) 11 CS440/ECE448: Intro AI
Image of page 11

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

View Full Document Right Arrow Icon
Uniform-cost search illustrated CS440/ECE448: Intro AI 12 S g = 0 F g = 99 B g = 278 R g=80 P g = 177 99 211 80 97 101 S:0 [ R:80, F:99 ] R:80 [F:99, P:177 ] F:99 [P:177, B:310 ] P:177 [ B:278, B:310] B:278 [B:310] 1 2 3 4 5
Image of page 12
Properties of uniform-cost search Complete if b is finite, and each action has positive (non-zero) cost (gets stuck in loops of zero-cost actions) Optimal.
Image of page 13

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

View Full Document Right Arrow Icon
Image of page 14
This is the end of the preview. Sign up to access the rest of the 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