1 / 15

BEST FIRST SEARCH - BeFS

DFS is good becoz it allows a solution to be found without all competing branches having to be expanded. Breadth First Search is good because it does not get trapped on dead-end paths.

lucine
Download Presentation

BEST FIRST SEARCH - BeFS

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DFS is good becoz it allows a solution to be found without all competing branches having to be expanded. Breadth First Search is good because it does not get trapped on dead-end paths. One way of combining the two is to follow a single path at a time, but switch paths whenever some competing path looks more promising than the current one does. BeFS = DFS + BFS BEST FIRST SEARCH - BeFS S.SRIVATHSAN

  2. A* Algorithm • THE BeFS algorithm is a simplification of an algorithm called A* • It is presented by Hart et al in 1968-1972 • This algorithm uses the same f(n), g(n), h(n) functions, as well as the lists OPEN and CLOSED as like in BeFS. S.SRIVATHSAN

  3. LISTS & FUNCTIONS – a short description • OPEN – nodes that have been generated and have had the heuristic function applied to them but which have not yet been examined (i.e., had their successors generated). OPEN is actually a priority queue in which the elements with the highest priority are those with the most promising value of the heuristic function. • CLOSED – nodes that have already been examined. We need to keep these nodes in memory if we want to search a graph rather than a tree, since whenever a new node is generated, we need to check whether it has been generated before. S.SRIVATHSAN

  4. FUNCTIONS • The function g(n) is a measure of the cost of getting from the initial state to the current node. It must be non –ve. • The function h(n) is an estimate of the additional cost of getting from the current node to a goal state. – the place where the problem domain knowledge is exploited. • The combined function f(n), represents an estimate of the cost of getting from the initial state to the goal state along the path that generated the current node. S.SRIVATHSAN

  5. A* search • Idea: avoid expanding paths that are already expensive • Evaluation function f(n) = g(n) + h(n) • g(n) = cost so far to reach n • h(n) = estimated cost from n to goal • f(n) = estimated total cost of path through n to goal S.SRIVATHSAN

  6. A* search example

  7. A* search example

  8. A* search example

  9. A* search example

  10. A* search example

  11. A* search example

  12. Admissible heuristics • A heuristic h(n) is admissible if for every node n, h(n) ≤ h*(n), where h*(n) is the true cost to reach the goal state from n. • An admissible heuristic never overestimates the cost to reach the goal, i.e., it is optimistic • Example: hSLD(n) (never overestimates the actual road distance) • Theorem: If h(n) is admissible, A* using TREE-SEARCH is optimal S.SRIVATHSAN

  13. ALGORITHM • Put the starting node on open • If open is empty stop and return failure • Take from open node the node n that has the smallest value of f(n). • If the node is a goal node, return success and stop. Otherwise, • Expand n, generating all of its successors n’ and put n on closed. For every successor n’, if n’ is not already on open or closed; attach a back pointer to n. • Compute f(n’) and put it on open. • Each n’ that is already on open or closed should be attached to back pointers which reflect the lowest g(n’) path. If n’ was on closed and its pointer was changed, remove it and put it on open. • Go back to step2. ~~~EXPLAIN THE 8 – PUZZLE PROBLEM. ~~~~ S.SRIVATHSAN

  14. Properties of A* • Complete? Yes (unless there are infinitely many nodes with f ≤ f(G); G- Sub optimal goal ). • Time? Exponential • Space? Keeps all nodes in memory • Optimal? Yes

  15. THANK U - S. SRIVATHSAN II MCA

More Related