Download presentation
Presentation is loading. Please wait.
1
Find a Path s A D B E C F G 3 4 4 5 5 2 4 4 3
2
Heuristically Informed Methods Which node do I expand next? What information can I use to guide this decision? Hill Climbing Beam Search Best First Search
3
Hill Climbing s A D B E C F G 3 4 4 5 5 2 4 4 3 s A D B E C F G 3 6.9 8.9 11.0 10.4 6.74
4
Hill Climbing Heuristic: Straight line distance to goal Sort new paths, if any, by the estimated distances between their terminal nodes and the goal Add the new paths to the FRONT of the Q
5
Hill Climbing Problems Local optima Uninformative landscape (plateaus) Uninformed movement operator (ridge) Consider parameter tuning Thermostat, television, mountain climbing
6
Beam Search BFS, but only the the best W (beam size) nodes at each level are expanded. Beam search will only consider w nodes per level. No exponential explosion.
7
Best-First Search Expand best next node Resort the ENTIRE Q by heuristic after every expansion
8
Optimal Search Finding the best path Find all paths and choose the best What’s the problem?
9
Branch and Bound Extend the shortest partial path When you find a path, you must extend all partial paths until their lengths are longer than the path you found, or you find a shorter path
10
B&B Form a one-element queue containing the root node Until the first path in the queue terminates at the goal node or the queue is empty Remove the first path from the queue, create new paths by extending the first path to all the neighbors of the terminal node Reject all new paths with loops Add the remaining new paths, if any, to the queue Sort the entire queue by path length with the least-cost paths in front If the goal node is found, announce success; otherwise failure
11
Underestimates In addition to partial path length, let us also use distance remaining Distance remaining is an admissable heuristic It always underestimates the true remaining distance. Why is this property important?
12
Underestimates help E(total path length) = D(already travelled) + E(remaining distance) What if your estimate is wrong? Overestimate Underestimate Other
13
Underestimates Overestimate: you could hide the optimal path Underestimate: you will not miss finding the optimal path Other: your mileage may vary
14
B&B with underestimates Form a one-element queue containing the root node Until the first path in the queue terminates at the goal node or the queue is empty Remove the first path from the queue, create new paths by extending the first path to all the neighbors of the terminal node Reject all new paths with loops Add the remaining new paths, if any, to the queue Sort the entire queue by the sum of the path length and a lower bound estimate of the cost remaining, with least cost paths in front. If the goal node is found, announce success; otherwise failure
15
Dynamic Programming Eliminate redundant paths that slow search efficiency The dynamic programming principle The best way through a particular, intermediate node is the best way to it, followed by the best way from it to the goal.
16
B&B with DP Form a one-element queue containing the root node Until the first path in the queue terminates at the goal node or the queue is empty Remove the first path from the queue, create new paths by extending the first path to all the neighbors of the terminal node Reject all new paths with loops Add the remaining new paths, if any, to the queue If two or more paths reach a common node, delete all those paths except the one that reaches the common node with the min cost Sort the entire queue by the path length with least cost paths in front. If the goal node is found, announce success; otherwise failure
17
A* Search Branch and bound, with understimates, and using the dynamic programming principle
18
B&B + underestimates + DP Form a one-element queue containing the root node Until the first path in the queue terminates at the goal node or the queue is empty Remove the first path from the queue, create new paths by extending the first path to all the neighbors of the terminal node Reject all new paths with loops Add the remaining new paths, if any, to the queue If two or more paths reach a common node, delete all those paths except the one that reaches the common node with the min cost Sort the entire queue by the sum of the path length and a lower- bound estimate of the cost remaining, with least cost paths in front. If the goal node is found, announce success; otherwise failure
19
Game Trees How do you represent a game situation in a search tree? Minimax search Alpha-Beta pruning Tic-Tac-Toe, Chess
20
Game Tree Original board New boards
21
Minimax search Evaluation of board position summarized into a single number. Positive numbers indicate favor to one player. Negative numbers indicate favor to other player Static evaluator evaluates board position, computes static evaluation score Maximizing player, Minimizing player
22
Minimax Example 2 718 Max Min Max
23
Minimax Procedure If the limit of the search has been reached, compute the static value of the current position relative to the appropriate player. Report the result Otherwise, if the level is a minimizing level, use MINIMAX on the children of the current position. Report the MINIMUM of the results Otherwise, if the level is a maximizing level, use the MINIMAX on the children of the current position. Report the MAXIMUM of the results
24
Alpha-Beta with Minimax If you have an idea that is truly bad, do not take the time to see how truly awful it is
25
Alpha-Beta Example 2 7 Max Min Max
26
Big Alpha-Beta example Figure 6.4
27
Heuristics for minimax Progressive deepening Heuristic continuation Heuristic pruning
28
Alpha-Beta effect Best case analysis 2b ^d/2 - 1if d is even B^(d+1)/2 - b^(d-1)/2 – 1if d is odd Does not change exponential explosion
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.