Intelligent Backtracking Algorithms: A Theoretical Evaluation

Slides:



Advertisements
Similar presentations
I am Patrick Prosser I am a senior lecturer at Glasgow I teach algorithms & data structures in java I am a member of the algorithms group the apes (distributed,
Advertisements

Backward Checking Search BT, BM, BJ, CBJ. An example problem Colour each of the 5 nodes, such that if they are adjacent, they take different colours 12.
Foundations of Constraint Processing Lookahead Schemas 1 Foundations of Constraint Processing CSCE421/821, Spring
Foundations of Constraint Processing Temporal Constraints Networks 1Topic Foundations of Constraint Processing CSCE421/821, Spring
This lecture topic (two lectures) Chapter 6.1 – 6.4, except 6.3.3
Artificial Intelligence Constraint satisfaction problems Fall 2008 professor: Luigi Ceccaroni.
A First Practical Algorithm for High Levels of Relational Consistency Shant Karakashian, Robert Woodward, Christopher Reeson, Berthe Y. Choueiry & Christian.
Foundations of Constraint Processing, Spring 2008 Evaluation to BT SearchApril 16, Foundations of Constraint Processing CSCE421/821, Spring 2008:
Foundations of Constraint Processing, Fall 2004 November 8, 2004Ordering heuristics1 Foundations of Constraint Processing CSCE421/821, Fall 2004:
Constraint Satisfaction CSE 473 University of Washington.
Artificial Intelligence Constraint satisfaction Chapter 5, AIMA.
Foundations of Constraint Processing, Fall 2005 November 16, 2005nFCi1 Foundations of Constraint Processing CSCE421/821, Fall 2005:
Foundations of Constraint Processing Evaluation to BT Search 1 Foundations of Constraint Processing CSCE421/821, Spring
Constraint Satisfaction Problems
Foundations of Constraint Processing, Fall 2005 Sep 20, 2005BT: A Theoretical Evaluation1 Foundations of Constraint Processing CSCE421/821, Fall 2005:
A Constraint Satisfaction Problem (CSP) is a combinatorial decision problem defined by a set of variables, a set of domain values for these variables,
General search strategies: Look-ahead Chapter 5 Chapter 5.
Tractable Symmetry Breaking Using Restricted Search Trees Colva M. Roney-Dougal, Ian P. Gent, Tom Kelsey, Steve Linton Presented by: Shant Karakashian.
Hande ÇAKIN IES 503 TERM PROJECT CONSTRAINT SATISFACTION PROBLEMS.
Problem Solving with Constraints Lookahead Schemas 1 Foundations of Constraint Processing CSCE496/896, Fall
Edge and Boundary interpretation Consistent line drawing labeling via backtracking Presented by Guy Shtub.
Chapter 5 Constraint Satisfaction Problems
Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs1 Foundations of Constraint Processing CSCE421/821, Fall 2004:
Eliminating non- binary constraints Toby Walsh Cork Constraint Computation Center.
Constraint Satisfaction CSE 473 University of Washington.
I am a senior lecturer at Glasgow
Consistency Methods for Temporal Reasoning
A First Practical Algorithm for High Levels of Relational Consistency
Constraint Satisfaction
An Empirical Study of the Performance
Constraint Satisfaction
Constraint Satisfaction Problems vs. Finite State Problems
Empirical Comparison of Preprocessing and Lookahead Techniques for Binary Constraint Satisfaction Problems Zheying Jane Yang & Berthe Y. Choueiry Constraint.
I am a senior lecturer at Glasgow
Rationale & Strategies Foundations of Constraint Processing
Extensions to BT Search Foundations of Constraint Processing
Extensions to BT Search Foundations of Constraint Processing
Problem Solving and Searching
CSPs and Relational DBs
Foundations of Constraint Processing
CSP Search Techniques Backtracking Forward checking
Problem Solving with Constraints
Intelligent Backtracking Algorithms: A Theoretical Evaluation
Problem Solving and Searching
Foundations of Constraint Processing All questions to Piazza
Heuristic Ordering for Asynchronous Backtracking
Evaluation of (Deterministic) BT Search Algorithms
Rationale & Strategies Foundations of Constraint Processing
Extensions to BT Search Foundations of Constraint Processing
Lookahead Schemas Foundations of Constraint Processing
Extensions to BT Search Foundations of Constraint Processing
Intelligent Backtracking Algorithms
Constraints and Search
Chapter 5: General search strategies: Look-ahead
Evaluation of (Deterministic) BT Search Algorithms
Intelligent Backtracking Algorithms: A Theoretical Evaluation
Intelligent Backtracking Algorithms: A Theoretical Evaluation
Constraint satisfaction problems
Intelligent Backtracking Algorithms: A Theoretical Evaluation
Intelligent Backtracking Algorithms: A Theoretical Evaluation
Artificial Intelligence
Rationale & Strategies Foundations of Constraint Processing
Foundations of Constraint Processing All questions to Piazza
Evaluation of (Deterministic) BT Search Algorithms
Problem Solving with Constraints
Problem Solving with Constraints
Extensions to BT Search Foundations of Constraint Processing
Constraint satisfaction problems
Rationale & Strategies Foundations of Constraint Processing
Basic Search Methods How to solve the control problem in production-rule systems? Basic techniques to find paths through state- nets. For the moment: -
Presentation transcript:

Intelligent Backtracking Algorithms: A Theoretical Evaluation Foundations of Constraint Processing CSCE421/821, Fall 2016 www.cse.unl.edu/~choueiry/F16-421-821/ All questions to Piazza Berthe Y. Choueiry (Shu-we-ri) Avery Hall, Room 360 BT: A Theoretical Evaluation

BT: A Theoretical Evaluation Reading Required: Paper by Kondrak and van Beek, IJCAI 95 Results from MS thesis of Kondrak There is more to the thesis than in the paper Best paper award at IJCAI 1995 Recommended: Dechter, Chapters 5 & 6 Dechter interleaves the presentation of the algorithms and their theoretical study BT: A Theoretical Evaluation

BT: A Theoretical Evaluation Context Usually, backtracking algorithms are evaluated empirically Performance of backtracking depends heavily on problem instance Shortcomings: average case analysis ‘Representativeness’ of test problems BT: A Theoretical Evaluation

Problems with empirical studies Problem1: CSP is NPC, thus it is always possible to construct examples where BJ/CBJ are worse than BT Problem2: comparison criteria Run time Constraint checks Nodes visited Anything else? BT: A Theoretical Evaluation

Significance of this paper The paper offers a theoretical approach States dominance of algorithms in terms of Number of nodes visited Number of constraint checks (We do not account for effort of checking a particular constraint cost of the special data structures of the algorithms) BT: A Theoretical Evaluation

BT: A Theoretical Evaluation Assumptions Constraints are binary Instantiation order fixed and static Seeking all solutions In his MS thesis, Kondrak removes some of these constraints BT: A Theoretical Evaluation

BT: A Theoretical Evaluation Contributions Advantages Proves correctness of BJ and CBJ Determine a partial order (PO) between algorithms in terms of 2 performance criteria Number of nodes visited Number of consistency checks performed PO explains/justifies experimental results of Prosser Results Proves BJ and CBJ are correct (soundness and completeness) Proves FC never visits more nodes than BJ (unexpected) Improves BMJ & BM-CBJ to perform less consistency checks Provides framework for characterizing (future) BT algorithms BT: A Theoretical Evaluation

BT: A Theoretical Evaluation Definitions (I) BT extends partial solutions A partial solution is consistent with a set of un-instantiated variables if it can be consistently extended to these variables (if there are assignments to these variables such that the ‘new’ partial solution is consistent) Dead-end: when all values of current variable are rejected Lower levels: closer to the root (shallower) Higher levels: closer to the fringe (deeper) 2 BT algorithms are equivalent if on every CSP they generate the same tree and perform the same consistency checks BT: A Theoretical Evaluation

6 Queens: representation Variables: board columns Domain values: board rows 3 1 2 Q Q6 Q5 Q4 Q3 Q2 Q1 6 5 4 BT: A Theoretical Evaluation

Chronological backtracking First queen 2 3 4 5 6 25 253 2531 25314 2536 25364 3 1 2 Q Q6 Q5 Q4 Q3 Q2 Q1 6 5 4 Denotes queen responsible for exclusion Inconsistent nodes Consistent nodes BT: A Theoretical Evaluation

BT: A Theoretical Evaluation Backjumping Reaches dead-end at Q6, when expanding 25364 Bjumps to Q4: 25365 and 25366 are safely skipped 25 2 3 1 2 Q Q6 Q5 Q4 Q3 Q2 Q1 6 5 4 253 3 2531 2536 4 5 25314 25364 6 BT: A Theoretical Evaluation

Conflict directed backjumping Reaches dead-end when expanding 25314 Conflict-set of Q6 is {1,2,3} Tries Q5=5, 6; then BJumps to Q3 253 is inconsistent with {Q5,Q6}, but consistent with Q5 & Q6 (separately) 2 3 4 5 6 25 253 2531 25314 2536 25364 3 1 2 Q Q6 Q5 Q4 Q3 Q2 Q1 6 5 4 BT: A Theoretical Evaluation

BT: A Theoretical Evaluation Forward checking Visits only consistent nodes, but not 25364 FC detects dead-end because Q4=6 and Q6 are inconsistent FC detects inconsistency between current partial solutions and a future variable before reaching it FC cannot detect inconsistency between a set of variables: 2536 is visited by FC but skipped by CBJ 3 1 2 Q Q6 Q5 Q4 Q3 Q2 Q1 6 5 4 2 3 4 5 6 25 253 2531 25314 2536 25364 BT: A Theoretical Evaluation

BT: A Theoretical Evaluation Two Important Lemmas BT: A Theoretical Evaluation

Theorem 1: sufficient conditions BT visits a node if its parent is consistent BJ visits a node if its parent is consistent with all variables CBJ visits a node if its parent is consistent with all sets of variables FC visits a node if it is consistent and its parent is consistent with all variables 2 3 4 5 6 25 253 2531 25314 2536 25364 BT: A Theoretical Evaluation

Theorem2: necessary conditions BT visits a node only if its parent is consistent BJ visits a node only if its parent is consistent CBJ visits a node only if its parent is consistent FC visits a node only if it is consistent and its parent is consistent with all variables 2 3 4 5 6 25 253 2531 25314 2536 25364 BT: A Theoretical Evaluation

Conditions graph FC visits p Parent(p) consistent with all sets of variables CBJ visits p Parent(p) consistent with all variables P consistent and Parent(p) consistent with all variables BJ visits p Parent(p) consistent BT visits p BT: A Theoretical Evaluation

Conditions graph FC visits p Parent(p) consistent with all sets of variables CBJ visits p Parent(p) consistent with all variables P consistent and Parent(p) consistent with all variables BJ visits p Parent(p) consistent BT visits p BT: A Theoretical Evaluation

Corollary 1 BT visits all nodes BJ visits BT visits all nodes CBJ visits BT visits all nodes FC visits BJ visits all nodes FC visits (new result!) Parent(p) consistent with all sets of variables FC visits p CBJ visits p P consistent and Parent(p) consistent with all variables Parent(p) consistent with all variables BJ visits p Parent(p) consistent BT visits p Theorem 3: BJ visits all nodes CBJ visits Note: Trace a partial/total order FC vs. CBJ? See 6-queens for counter-example BT: A Theoretical Evaluation

BT: A Theoretical Evaluation Proofs Correctness: Termination, soundness, & completeness Corollary 2: BT is correct BJ is correct CBJ is correct FC is correct BT: A Theoretical Evaluation

BT: A Theoretical Evaluation Extensions Approach can be extended to other algorithms Initial assumptions: seeking all solutions Theorems remain valid (for any number of solutions) if pre-order traversal is followed (Restriction to nodes that precede the last node visited) 2 1 3 1 3 2 3 1 2 In-order Pre-order Post-order Theorems hold for 1 solution, proofs slightly different BT: A Theoretical Evaluation

BT: A Theoretical Evaluation Fixing BM hybrids BM uses mcl (n x m) and mbl (n x 1) Prosser noted an anomaly when combining BM with intelligent backtracking mechanisms Kondrak & van Beek change mbl into 2-dim array (n x m) … and propose BMJ2 and BM-CBJ2, which fix the anomaly BT: A Theoretical Evaluation

Hierarchy 1: number of nodes visited BM does not affect the number of nodes visited All not shown relations can be disproved by counter-examples Surprise: FC-CBJ may visit more nodes than CBJ BT = BM BJ = BMJ = BMJ2 CBJ = BM-CBJ = BM-CBJ2 FC FC-CBJ BT: A Theoretical Evaluation

Hierarchy 2: # of consistency checks BT, BJ, CBJ perform the same amount of consistency checks at any given node  same order as in hierarchy 1 BM reduced consistency checks All not shown relations can be disproved… Surprise: FC-CBJ may perform more checks than BT! BT Performs no more consistency checks than… BJ FC CBJ BMJ BM BM-CBJ BMJ2 FC-CBJ BM-CBJ2 BT: A Theoretical Evaluation

BT: A Theoretical Evaluation Conclusions General theorems that (fully/partially) describe behavior of BT-based algorithms Theorems used to prove correctness of algorithms Theorems used to build hierarchy 1 & 2 Anomaly of BM (+ BJ and CBJ) fixed Future: Carry out same analysis for Graph-based backjumping (Dechter 1990) Full look-ahead (Nadel, 1989) Has been done in Dechter, Chapter 6 Draw stronger conclusions about non-comparable algorithms for special CSPs (i.e., identify special CSPs where non-comparable algorithms become comparable) BT: A Theoretical Evaluation