Docsity

Advanced Constraint Techniques - Embedded Intelligent Robotics - Lecture Slides, Slides of Robotics

Partial preview of the text

Download Advanced Constraint Techniques - Embedded Intelligent Robotics - Lecture Slides and more Slides Robotics in PDF only on Docsity!

Advanced Constraint

Techniques

Review

  • Represent a problem as a set of variables and constraints among those variables - For binary constraints, result is a constraint graph G = ( V , C ) with N variables and M constraints
  • Use search and/or constraint propagation to solve the constraint network
  • Improve efficiency of solving by
    • Interleaving search and constraint propagation
    • Variable ordering
    • Value ordering
    • Intelligent backtracking

Labelling line drawings II

  • Here are some illegal labelings:
    • +^

Labelline line drawings (cont.)

  • Waltz labelling algorithm: Propagate constraints repeatedly until a solution is found A solution for one labelling problem A labelling problem with no solution

Tree-structured constraint graph

  • An OCG with width 1 is a constraint tree rooted at V 1
  • That is, in the ordering V1, …, Vn, every node has zero or one parents
  • If this constraint tree is also node- and arc-consistent (i.e., strongly 2-consistent), then it can be solved without backtracking
  • More generally, if the ordered graph is strongly k- consistent, and has width w < k, then it can be solved without backtracking V V8 V V V V9 V V2 V3 V

Backtrack-free CSPs: Proof sketch

  • Given a strongly k-consistent OCG, G, with width w < k:
    • Instantiate variables in order, choosing values that are consistent with the constraints between Vi and its parents
    • Each variable has at most w parents, and k-consistency tells us we can find a legal value consistent with the values of those w parents
  • Unfortunately , achieving k-consistency is hard
    • (and can increase the width of the graph in the process!)
  • Fortunately , 2-consistency is relatively easy to achieve, so constraint trees are easy to solve
  • Unfortunately , many CGs have width greater than one (that is, no equivalent tree), so we still need to improve search

Interleaving constraint propagation and search Generate and Test No constraint propagation: assign all variable values, then test constraints Simple Backtracking Check constraints only for variables “up the tree” Forward Checking Check constraints for immediate neighbors “down the tree” Partial Lookahead Propagate constraints forward “down the tree” Full Lookahead Ensure complete arc consistency after each instantiation

Variable ordering

  • Intuition : choose variables that are highly constrained

early in the search process; leave easy ones for later

  • Minimum width ordering (MWO): identify OCG with

minimum width

  • Minimum cardinality ordering : approximation of

MWO that’s cheaper to compute: order variables by

decreasing cardinality

  • Fail first principle (FFP): choose variable with the

fewest values

  • Static FFP: use domain size of variables
  • Dynamic FFP ( search rearrangement method ): At each point in the search, select the variable with the fewest remaining values

Value ordering

  • Intuition : Choose values that are the least constrained

early on, leaving the most legal values in later variables

  • Maximal options method (least-constraining-value

heuristic): Choose the value that leaves the most legal

values in uninstantiated variables

  • Min-conflicts : Used in iterative repair search

Iterative repair

  • Start with an initial complete (but invalid) assignment
  • Hill climbing, simulated annealing
  • Min-conflicts: Select new values that minimally conflict with the other variables - Use in conjunction with hill climbing or simulated annealing or…
  • Local maxima strategies
    • Random restart
    • Random walk
    • Tabu search: don’t try recently attempted values

Intelligent backtracking

  • Backjumping : if V j fails, jump back to the variable V i with greatest i such that the constraint (V i
, V

j ) fails (i.e., most recently instantiated variable in conflict with V i

  • Backchecking : keep track of incompatible value assignments computed during backjumping
  • Backmarking : keep track of which variables led to the incompatible variable assignments for improved backchecking

Some challenges for constraint reasoning

  • What if not all constraints can be satisfied?
    • Hard vs. soft constraints
    • Degree of constraint satisfaction
    • Cost of violating constraints
  • What if constraints are of different forms?
    • Symbolic constraints
    • Numerical constraints [constraint solving]
    • Temporal constraints
    • Mixed constraints