Download presentation
Presentation is loading. Please wait.
Published byVincent Anderson Modified over 9 years ago
1
CHAPTER 2 SEARCH HEURISTIC
2
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, and 2. 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
3
Review: DFS vs. BFS
4
Graph Search In BFS, for example, we shouldn’t bother expanding the circled nodes (why?)
5
Graph Search
6
Iterative Deepening
7
Costs on Actions BFS finds the shortest path in terms of number of transitions, not the least-cost path
8
Uniform Cost Search
9
Priority 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
10
Uniform Cost Search What will UCS do for this graph? What does this mean for completeness?
11
Uniform Cost Search
12
Uniform Cost Issues Where will uniform cost explore? Why? What is wrong here?
13
Straight Line Distances
15
Greedy Best-First Search Expand the node that seems closest… What can go wrong?
16
Greedy Best-First Search
17
Combining UCS and Greedy
18
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
19
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!
20
Admissible Heuristics
21
Optimality of A*: Blocking
22
Optimality 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
23
Consistency/Monotonicity
24
UCS vs A* Contours
25
Properties of A*
26
Admissible 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?)
27
8-Puzzle I
28
8-Puzzle II
29
Relaxed 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?
30
8-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!
31
Trivial Heuristics, Dominance
32
Other A* Applications Robot motion planning Routing problems Planning problems Machine translation Statistical parsing Speech recognition
33
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
34
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)
35
Types of Problems
36
Example: N-Queens
37
Hill 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?
38
Hill Climbing Diagram
39
Simulated Annealing
41
Beam Search
42
Genetic Algorithms
43
Example: N-Queens
44
Continuous Problems
45
Gradient Methods
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.