find a path l.
Download
Skip this Video
Download Presentation
Find a Path

Loading in 2 Seconds...

play fullscreen
1 / 28

Find a Path - PowerPoint PPT Presentation


  • 166 Views
  • Uploaded on

4. A. B. C. 4. 3. 5. 5. s. G. 4. 3. F. D. E. 2. 4. Find a Path. 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. 4. A. B. C. 4. 3. 5. 5. s. G. 4. 3. F. D.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Find a Path' - long


Download Now An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
find a path

4

A

B

C

4

3

5

5

s

G

4

3

F

D

E

2

4

Find a Path
heuristically informed methods
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
hill climbing

4

A

B

C

4

3

5

5

s

G

4

3

F

D

E

2

4

Hill Climbing

A

B

C

10.4

6.7

4

11.0

s

G

8.9

3

6.9

F

D

E

hill climbing4
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
hill climbing problems
Hill Climbing Problems
  • Local optima
  • Uninformative landscape (plateaus)
  • Uninformed movement operator (ridge)
  • Consider parameter tuning
    • Thermostat, television, mountain climbing
beam search
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.
best first search
Best-First Search
  • Expand best next node
  • Resort the ENTIRE Q by heuristic after every expansion
optimal search
Optimal Search
  • Finding the best path
  • Find all paths and choose the best
    • What’s the problem?
branch and bound
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
slide10
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
underestimates
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?
underestimates help
Underestimates help
  • E(total path length) = D(already travelled) + E(remaining distance)
  • What if your estimate is wrong?
    • Overestimate
    • Underestimate
    • Other
underestimates13
Underestimates
  • Overestimate: you could hide the optimal path
  • Underestimate: you will not miss finding the optimal path
  • Other: your mileage may vary
b b with underestimates
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
dynamic programming
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.
b b with dp
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
a search
A* Search
  • Branch and bound, with understimates, and using the dynamic programming principle
b b underestimates dp
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
game trees
Game Trees
  • How do you represent a game situation in a search tree?
  • Minimax search
  • Alpha-Beta pruning
  • Tic-Tac-Toe, Chess
game tree
Game Tree

Original board

New boards

New boards

minimax search
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
minimax example
Minimax Example

Max

Min

Max

2

7

1

8

minimax procedure
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
alpha beta with minimax
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
heuristics for minimax
Heuristics for minimax
  • Progressive deepening
  • Heuristic continuation
  • Heuristic pruning
alpha beta effect
Alpha-Beta effect
  • Best case analysis
    • 2b ^d/2 - 1 if d is even
    • B^(d+1)/2 - b^(d-1)/2 – 1 if d is odd
  • Does not change exponential explosion