![Page 1: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/1.jpg)
CHAPTER 2CHAPTER 2
SEARCHSEARCHHEURISTIC HEURISTIC
![Page 2: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/2.jpg)
QUESTION ????QUESTION ????• What is Artificial Intelligence?
The study of systems that act rationally
• What does rational mean?Given its goals and prior knowledge, a rational agent should:1. Use the information available in new observations to update its knowledge, and2. Use its knowledge to act in a way that is expected to achieve its goals in the world
• How do you define a search problem? Initial state Successor function Goal test Path cost
![Page 3: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/3.jpg)
Review: DFS vs. BFSReview: DFS vs. BFS
![Page 4: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/4.jpg)
Graph SearchGraph Search• In BFS, for example, we shouldn’t bother• expanding the circled nodes (why?)
![Page 5: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/5.jpg)
Graph SearchGraph Search
![Page 6: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/6.jpg)
Iterative DeepeningIterative Deepening
![Page 7: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/7.jpg)
Costs on ActionsCosts on Actions• BFS finds the shortest path in terms of
number of transitions, not the least-cost path
![Page 8: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/8.jpg)
Uniform Cost SearchUniform Cost Search
![Page 9: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/9.jpg)
Priority Queue RefresherPriority Queue Refresher• A priority queue is a data structure in which you can
insert and retrieve (key, value) pairs with the following operations:
• You can promote or demote keys by resetting their priorities• Unlike a regular queue, insertions into a priority queue are not constant time, usually O(log n)• We’ll need priority queues for most cost-sensitive search methods
![Page 10: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/10.jpg)
Uniform Cost SearchUniform Cost Search
• What will UCS do for this graph?
• What does this mean for completeness?
![Page 11: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/11.jpg)
Uniform Cost SearchUniform Cost Search
![Page 12: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/12.jpg)
Uniform Cost IssuesUniform Cost Issues
• Where will uniform cost explore?• Why?• What is wrong here?
![Page 13: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/13.jpg)
Straight Line DistancesStraight Line Distances
![Page 14: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/14.jpg)
Straight Line DistancesStraight Line Distances
![Page 15: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/15.jpg)
Greedy Best-First SearchGreedy Best-First Search• Expand the node that seems closest…
• What can go wrong?
![Page 16: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/16.jpg)
Greedy Best-First SearchGreedy Best-First Search
![Page 17: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/17.jpg)
Combining UCS and GreedyCombining UCS and Greedy
![Page 18: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/18.jpg)
When should A* terminate?When should A* terminate?• A* Search orders by the sum: f(n) = g(n) + h(n)• Should we stop when we enqueue a goal?
• No! Only stop when we dequeue a goal
![Page 19: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/19.jpg)
Is A* Optimal?Is A* Optimal?
• A* Search orders by the sum: f(n) = g(n) + h(n)• What went wrong?• Actual goal cost greater than estimated goal cost• We need estimates to be less than actual costs!
![Page 20: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/20.jpg)
Admissible HeuristicsAdmissible Heuristics
![Page 21: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/21.jpg)
Optimality of A*: Blocking
![Page 22: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/22.jpg)
Optimality of A*: ContoursOptimality of A*: Contours• Consider what A* does:
– Expands nodes in increasing total f value (fcontours)– Optimal goals have lower f value, so get expanded first
![Page 23: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/23.jpg)
Consistency/MonotonicityConsistency/Monotonicity
![Page 24: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/24.jpg)
UCS vs A* ContoursUCS vs A* Contours
![Page 25: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/25.jpg)
Properties of A*Properties of A*
![Page 26: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/26.jpg)
Admissible HeuristicsAdmissible Heuristics
• Most of the work is in coming up with admissible heuristics
• Quiz: what’s the simplest admissable heuristic?
• Good news: usually admissible heuristics are also consistent
• More good news: inadmissible heuristics are still useful effective (Why?)
![Page 27: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/27.jpg)
8-Puzzle I8-Puzzle I
![Page 28: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/28.jpg)
8-Puzzle II8-Puzzle II
![Page 29: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/29.jpg)
Relaxed ProblemsRelaxed Problems
• A version of the problem with fewer restrictions on actions is called a relaxed problem
• Relaxed problems of the 8 puzzle:- Each move can swap a tile directly into its final position- Each move can move a tile one step closer to its final position
• Relaxed problem for the route planning problem:- You can fly directly to the goal from each state
• Relaxed problems for Pac-Man?
![Page 30: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/30.jpg)
8-Puzzle III8-Puzzle III
• How about using the actual cost as a heuristic?
- Would it be admissible?- Would we save on nodes?- What’s wrong with it?
• With A*, trade-off between quality of estimate and work per node!
![Page 31: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/31.jpg)
Trivial Heuristics, DominanceTrivial Heuristics, Dominance
![Page 32: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/32.jpg)
Other A* ApplicationsOther A* Applications
• Robot motion planning• Routing problems• Planning problems• Machine translation• Statistical parsing• Speech recognition
![Page 33: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/33.jpg)
Summary: A*Summary: A*
• A* uses both backward costs and (estimates of) forward costs
• A* is optimal with admissible heuristics• Heuristic design is key: often use relaxed
problems
![Page 34: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/34.jpg)
Local Search Methods
• Queue-based algorithms keep fallback options(backtracking)
• Local search: improve what you have until youcan’t make it better
• Generally much more efficient (but incomplete)
![Page 35: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/35.jpg)
Types of ProblemsTypes of Problems
![Page 36: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/36.jpg)
Example: N-QueensExample: N-Queens
![Page 37: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/37.jpg)
Hill ClimbingHill Climbing
• Simple, general idea:– Start wherever– Always choose the best neighbor– If no neighbors have better scores than
current, quit• Why can this be a terrible idea?
– Complete?– Optimal?
• What’s good about it?
![Page 38: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/38.jpg)
Hill Climbing DiagramHill Climbing Diagram
![Page 39: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/39.jpg)
Simulated AnnealingSimulated Annealing
![Page 40: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/40.jpg)
Simulated AnnealingSimulated Annealing
![Page 41: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/41.jpg)
Beam SearchBeam Search
![Page 42: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/42.jpg)
Genetic AlgorithmsGenetic Algorithms
![Page 43: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/43.jpg)
Example: N-QueensExample: N-Queens
![Page 44: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/44.jpg)
Continuous ProblemsContinuous Problems
![Page 45: CHAPTER 2 SEARCH HEURISTIC. QUESTION ???? What is Artificial Intelligence? The study of systems that act rationally What does rational mean? Given its](https://reader034.vdocuments.net/reader034/viewer/2022051303/5a4d1b637f8b9ab0599ae8b5/html5/thumbnails/45.jpg)
Gradient MethodsGradient Methods