1 / 21

Informed Search

Informed Search. Informed vs. Uninformed. Uninformed Search: just takes the information available in the problem description Informed Search: Takes additional problem specific properties to guide the search A way of “engineering knowledge” into the search. Best First Search.

alina
Télécharger la présentation

Informed Search

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. Informed Search

  2. Informed vs. Uninformed • Uninformed Search: just takes the information available in the problem description • Informed Search: Takes additional problem specific properties to guide the search • A way of “engineering knowledge” into the search

  3. Best First Search • A general search strategy • Uses an evaluation function f() in deciding which node (in queue) to expand next • Note: “best” could be misleading (it is relative, not absolute) • Greedy search is one type of Best First Search • What’s another you have seen?

  4. Greedy Search • Use a heuristic h() (cost estimate to goal) as the evaluation function • Example: straight-line distance in finding a path from one city to another • It is not optimal or complete • O(b^m) time and memory • But can be acceptable in practice

  5. Minimizing Total Path Cost • Use for the evaluation: f(node) = g(node) + h(node) where, f is the evaluation function, g is the path from root, and h is the heuristic (estimate to goal) • Or, f() = estimate of cheapest path to goal • Without h(), the search would be? • Without g()? • Combine advantages of both…

  6. A* search • We can actually guarantee optimality. by using an admissible heuristic: • h() is admissible if it never overestimates the cost to reach the goal • Example: straight-line distance in the travel problem

  7. Why is A* Optimal? • First we assume f() never decreases along a path (simple modification to the definition f() allows this) • Let f* be shortest path length, then • A* expands all nodes with f(node) < f* • Then some nodes with f(node)=f* before discovering the goal • Optimality follows • (need to assume some finiteness)

  8. Other Properties • It is complete if finitely many nodes n, with f(n) <= f* (e.g. finite branch factor and minimum positive distance) • No more expansion than other path following search optimal methods • Number of nodes can still be exponential within the goal counter (f < f*) • Memory is specially a problem (motivates IDA* and SMA*)

  9. Heuristics • Heuristics can make a big difference • Example: for the 8-puzzle problem • h1: Incorrect position count • h2: Manhatten distance • Observation: One dominates the other • Often: the higher the value (the under-estimate) the better • How about the cost to evaluate h()?

  10. The Art (and Science) of Heuristic Design • Relax the (constraints of the) problem • (so solution costs become under-estimates) • E.g. 8-puzzle, Rubic’s cube • Pick out state features that are significant for winning • E.g. chess, go • Other ideas: • Use max of multiple admissible heuristics • Use statistical heuristics or other (may give up optimality)

  11. When only the goal matters • In many optimization problems, the path is irrelevant • The “goal” state is the solution (the state is described by a set of conditions/constraints, not given) • Examples: • n-queens • traveling salesperson (TSP), • constraint satisfaction problems (CSPs) in general

  12. Local Search • Take the current state and “locally” change it until you reach a state that satisfies certain conditions • It may stop at the goal state/configuration or an optimum state • Examples: • Hill-climbing (gradient ascent/descent) • Simulated Annealing

  13. TSP: Find the shortest path that visits all the cities once

  14. Choice of neighborhood • In search algorithms, there is usually choices of state and operators • In local search: the choice of operators (“actions”) defines a neighborhood and can make a big difference • And don’t forget the choice of heuristic

  15. Hill-Climbing • Among the successors of the state, pick one that improves the most • Can get stuck in local optima, plateaus, or ridges global local value states

  16. Repeated Hill-Climbing • To avoid local optima and other problems, and improve the overall solution found, repeatedly restart the hill-climbing: random restarts • The success of hill-climbing depends on the shape of the space “surface”

  17. Simulated Annealing • Instead of restarting, take a random, possibly (locally) bad move • Helps get over local optimal • A parameter T, “temperature,” determines the probability of choosing a random (not necessarily best) move • Higher T, more random moves • In annealing, T is lowered gradually (use a “schedule”)

  18. Constraint Satisfaction Problems • Problem: a number of variable with a number of possible values for each • Constraints on the possible variable values • Goal state: All constraints are satisfied • Example: n-queens, satisfiability, VLSI

  19. Heuristics for CSPs and Search • Variables are incrementally assigned values • To limit the branching factor and/or depth searched, use: • Most constrained-variable heuristic • Most-constraining-variable heuristic • Least-constraining-value heuristic

  20. Heuristics for CSPs with Local Search • Min conflicts: Choose the new variable value resulting in minimum number of with other variables (unsatisfied constraints) • N-queens: put the queen in the spot resulting in the minimum number of threats to it

  21. Summary • Informed search more powerful than uninformed • Two main search techniques of “systematic” search and local-search • There is an art to choice of space, operators (actions), and heuristics • These choices can make a huge difference

More Related