last time problem solving
play

Last time: Problem-Solving Problem solving: Goal formulation - PDF document

Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation: Initial state ? ? ? ? 1 Last time: Problem-Solving Problem


  1. Last time: Problem-Solving � Problem solving: � Goal formulation � Problem formulation (states, operators) � Search for solution � Problem formulation: � Initial state � ? � ? � ? � ? 1 Last time: Problem-Solving � Problem types: � Problem types: � single state: � accessible and � deterministic environment � multiple state: ? � contingency: ? � exploration: � exploration: ? ? 2 1

  2. Last time: Finding a solution Solution: is ??? Basic idea: offline, systematic exploration of simulated state-space by generating successors of explored states (expanding) Function General-Search( problem , strategy ) returns a solution , or failure initialize the search tree using the initial state problem loop do if there are no candidates for expansion then return failure if there are no candidates for expansion then return failure choose a leaf node for expansion according to strategy if the node contains a goal state then return the corresponding solution else expand the node and add resulting nodes to the search tree 3 end Last time: Finding a solution Function General-Search( problem , strategy ) returns a solution , or Function General Search( problem , strategy ) returns a solution , or failure initialize the search tree using the initial state problem loop do if there are no candidates for expansion then return failure choose a leaf node for expansion according to strategy if the node contains a goal state then return the corresponding solution di l ti else expand the node and add resulting nodes to the search tree end Strategy: The search strategy is determined by ??? 4 2

  3. Last time: search strategies Uninformed: Use only information available in the problem formulation � Breadth-first B dth fi t � Uniform-cost � Depth-first � Depth-limited � Iterative deepening p g Informed: Use heuristics to guide the search � Best first � A* 5 Evaluation of search strategies � Search algorithms’ four criteria: � Search algorithms four criteria: � Completeness: � Time complexity: � Space complexity: � Optimality: � Complexity are measured in terms of: Complexity are measured in terms of: � b – max branching factor of the search tree � d – depth of the least-cost solution � m – max depth of the search tree (may be infinity) 6 3

  4. Last time: uninformed search strategies Uninformed search: Uninformed search: Use only information available in the problem formulation � Breadth-first � Uniform-cost Uniform cost � Depth-first � Depth-limited � Iterative deepening 7 Comparing uninformed search strategies Criterion Breadth Uniform DepthFirst DepthLim Iterative Bidirectional Time b^ d b^ d b^ m b^ l b^ d b^ (d/2) Space b^ d b^ d bm bl bd b^ (d/2) Optimal? Yes Yes No No Yes Yes Complete? Yes Yes No Yes if l ≥ d Yes Yes � b – max branching factor of the search tree � d – depth of the least-cost solution � m – max depth of the state-space (may be infinity) 8 � l – depth cutoff 4

  5. This time: informed search I nformed search: I nformed search: Use heuristics to guide the search � Best first � A* � Heuristics � Heuristics � Hill-climbing � Simulated annealing 9 Best-first search � Idea: use an evaluation function for each Idea: use an evaluation function for each node; estimate of “desirability” � Implementation: QueueingFn = insert successors in decreasing Q g g order of desirability � Special cases: � greedy search 10 � A* search 5

  6. Romania with step costs in km 374 253 329 11 Greedy search � Estimation function: Estimation function: h(n) = estimate of cost from n to goal (heuristic) � For example: 12 6

  7. 13 14 7

  8. 15 16 8

  9. Properties of Greedy Search � Complete? � Complete? � Time? � Space? S ? � Optimal? 17 Properties of Greedy Search � Complete? 99 105 120 18 9

  10. Properties of Greedy Search � Complete? � Complete? � Time? � Space? Space? � Optimal? 19 A* search � Idea: combine the advantages of uniform Idea combine the ad antages of nifo m cost and greedy approach 20 10

  11. A* search � A* search uses an admissible heuristic, A* sea ch ses an admissible he istic � Theorem: A* search is optimal 21 22 11

  12. 23 24 12

  13. 25 26 13

  14. 27 Optimality of A* (standard proof) G 2 : suboptimal goal has been generated and is generated and is in the queue. n : an unexpanded node on a shortest path to an optimal goal G 1 . l G 28 14

  15. Optimality of A* ( more useful proof ) 29 f-contours How do the contours look like when h(n) =0? 30 15

  16. Properties of A* � Complete? Complete? � Time? � Space? S ? � Optimal? 31 Proof of lemma: pathmax 32 16

  17. Admissible heuristics 33 Relaxed Problem � How to determine an admissible heuristics? � How to determine an admissible heuristics? 34 17

  18. Relaxed Problem � Example: � Example: 35 Next time � Iterative improvement Iterative improvement � Hill climbing � Simulated annealing 36 18

Recommend


More recommend