1 / 47

Local Search for Constraint Satisfaction Problems

Learn about local search methods for solving constraint satisfaction problems, including backtracking search and iterative min-conflicts. Understand the importance of variable and value selection heuristics and constraint propagation techniques. Discover how these methods can be applied to real-world CSPs.

msteward
Download Presentation

Local Search for Constraint Satisfaction Problems

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. CHAPTER 3 LOCAL SEARCHCONSTRAINT SATISFACTION PROBLEMS

  2. QUESTION ????? • What’s a heuristic for informed search? • An estimate of the proximity of the goal. • How do we order nodes in A* search? • f(n) = g(n) + h(n) • What’s an admissible heuristic? • One that is optimistic: for all n, h(n) <= h*(n) • What’s the difference between incremental search and local search? • In incremental search, the path to the goal state is returned as part of the solution, in local search we care only about the goal state

  3. Simulated Annealing • Idea: Escape local maxima by allowing downhill moves • But make them rarer as time goes on

  4. Simulated Annealing

  5. Beam Search

  6. Genetic Algorithms

  7. Example: N-Queens

  8. Continuous Problems

  9. Gradient Methods

  10. Constraint Satisfaction Problems

  11. Example: N-Queens

  12. Example: N-Queens

  13. Example: Map-Coloring

  14. Constraint Graphs

  15. Example: Cryptarithmetic

  16. Varieties of CSPs

  17. Varieties of Constraints

  18. Real-World CSPs • Assignment problems: e.g., who teaches what class • Timetabling problems: e.g., which class is offered when and where? • Hardware configuration • Spreadsheets • Transportation scheduling • Factory scheduling • Floorplanning • Many real-world problems involve real-valued variables…

  19. Standard Search Formulation • Standard search formulation of CSPs (incremental) • Let's start with the straightforward, dumb approach, then fix it • States are defined by the values assigned so far - Initial state: the empty assignment, {} - Successor function: assign a value to an unassigned variable - Goal test: the current assignment is complete and satisfies all constraints

  20. Search Methods

  21. Backtracking Search

  22. Backtracking Example

  23. Improving Backtracking • General-purpose ideas can give huge gains in speed: • Which variable should be assigned next? • In what order should its values be tried? • Can we detect inevitable failure early? • Can we take advantage of problem structure?

  24. Minimum Remaining Values

  25. Degree Heuristic

  26. Least Constraining Value

  27. Forward Checking

  28. Constraint Propagation

  29. Arc Consistency

  30. Arc Consistency

  31. Problem Structure

  32. Tree-Structured CSPs

  33. Tree-Structured CSPs

  34. Nearly Tree-Structured CSPs

  35. Local Search for CSPs • Greedy and local methods typically work with “complete” states, i.e., all variables assigned • To apply to CSPs: - Allow states with unsatisfied constraints - Operators reassign variable values • Variable selection: randomly select any conflicted variable • Value selection by min-conflicts heuristic: - Choose value that violates the fewest constraints - I.e., hill climb with h(n) = total number of violated constraints

  36. Review: Propositional Logic

  37. Review: Propositional Logic

  38. Review: Propositional Logic

  39. Propositional Satisfiability

  40. 3-SAT as CSP

  41. Two Approaches to 3-SAT

  42. WalkSAT

  43. Two Approaches

  44. Two Approaches

  45. Summary • CSPs are a special kind of search problem: - States defined by values of a fixed set of variables - Goal test defined by constraints on variable values • Backtracking = depth-first search with one legal variable assigned per node • Variable ordering/value selection heuristics help a lot! • Forward checking prevents assignments that guarantee later failure • Constraint propagation (e.g., arc consistency) does additional work to constrain values and detect inconsistencies • The constraint graph representation allows analysis of problem structure • Tree-structured CSPs can be solved in linear time • Iterative min-conflicts is usually effective in practice

  46. Backtracking Search • What are the choice points?

  47. Example: 4-Queens

More Related