{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

Info iconThis preview shows pages 1–5. 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 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 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 Graph search Initial state a2 a1 a3 Explored set Frontier (Queue) Unexplored set …. Goal state Goal state …. Goal state …. b3 c5 b4 b1 b2
Background image of page 1

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

View Full Document Right Arrow Icon
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 Informed (heuristic) search 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 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
Background image of page 2
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 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 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 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
Background image of page 3

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

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

{[ snackBarMessage ]}