Lecture 8 Randomized Search Algorithms Part I: Backtrack Search CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.

Slides:



Advertisements
Similar presentations
Constraint Satisfaction Problems
Advertisements

Constraint Satisfaction Problems
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
This lecture topic (two lectures) Chapter 6.1 – 6.4, except 6.3.3
ICS-271:Notes 5: 1 Lecture 5: Constraint Satisfaction Problems ICS 271 Fall 2008.
Artificial Intelligence Constraint satisfaction problems Fall 2008 professor: Luigi Ceccaroni.
1 Backdoor Sets in SAT Instances Ryan Williams Carnegie Mellon University Joint work in IJCAI03 with: Carla Gomes and Bart Selman Cornell University.
Review: Constraint Satisfaction Problems How is a CSP defined? How do we solve CSPs?
1 Restart search techniques for Employee Timetabling Problems Amnon Meisels And Eliezer Kaplansky Ben-Gurion University.
Dynamic Restarts Optimal Randomized Restart Policies with Observation Henry Kautz, Eric Horvitz, Yongshao Ruan, Carla Gomes and Bart Selman.
Wavelength Assignment in Optical Network Design Team 6: Lisa Zhang (Mentor) Brendan Farrell, Yi Huang, Mark Iwen, Ting Wang, Jintong Zheng Progress Report.
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
Constraint Systems Laboratory Oct 21, 2004Guddeti: MS thesis defense1 An Improved Restart Strategy for Randomized Backtrack Search Venkata P. Guddeti Constraint.
Statistical Regimes Across Constrainedness Regions Carla P. Gomes, Cesar Fernandez Bart Selman, and Christian Bessiere Cornell University Universitat de.
CP Formal Models of Heavy-Tailed Behavior in Combinatorial Search Hubie Chen, Carla P. Gomes, and Bart Selman
08/1 Foundations of AI 8. Satisfiability and Model Construction Davis-Putnam, Phase Transitions, GSAT Wolfram Burgard and Bernhard Nebel.
Constraint Satisfaction and the Davis-Putnam-Logeman-Loveland Procedure Henry Kautz.
CPGomes - AAAI00 1 Structure and Randomization: Common Themes in AI/OR Carla Pedro Gomes Cornell University
Artificial Intelligence Constraint satisfaction Chapter 5, AIMA.
Impact of Structure on Complexity Carla Gomes Bart Selman Cornell University Intelligent Information Systems.
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 1 Ryan Kinworthy CSCE Advanced Constraint Processing.
Master Class on Experimental Study of Algorithms Scientific Use of Experimentation Carla P. Gomes Cornell University CPAIOR Bologna, Italy 2010.
AAAI00 Austin, Texas Generating Satisfiable Problem Instances Dimitris Achlioptas Microsoft Carla P. Gomes Cornell University Henry Kautz University of.
1 Backdoors To Typical Case Complexity Ryan Williams Carnegie Mellon University Joint work with: Carla Gomes and Bart Selman Cornell University.
Carla P. Gomes CS4700 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Randomization in Complete Tree Search.
Structure and Phase Transition Phenomena in the VTC Problem C. P. Gomes, H. Kautz, B. Selman R. Bejar, and I. Vetsikas IISI Cornell University University.
Carla P. Gomes CS4700 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: CSP2 (Reading R&N: Chapter 5)
Carla P. Gomes CS4700 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Instance Hardness and Phase Transitions.
CP-AI-OR-02 Gomes & Shmoys 1 The Promise of LP to Boost CSP Techniques for Combinatorial Problems Carla P. Gomes David Shmoys
1 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Satisfiability (Reading R&N: Chapter 7)
Knowledge Representation II (Inference in Propositional Logic) CSE 473 Continued…
1 Understanding Problem Hardness: Recent Developments and Directions Bart Selman Cornell University.
Carla P. Gomes School on Optimization CPAIOR02 Exploiting Structure and Randomization in Combinatorial Search Carla P. Gomes
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 2 Ryan Kinworthy CSCE Advanced Constraint Processing.
Controlling Computational Cost: Structure and Phase Transition Carla Gomes, Scott Kirkpatrick, Bart Selman, Ramon Bejar, Bhaskar Krishnamachari Intelligent.
1 Combinatorial Problems in Cooperative Control: Complexity and Scalability Carla Gomes and Bart Selman Cornell University Muri Meeting March 2002.
Why SAT Scales: Phase Transition Phenomena & Back Doors to Complexity slides courtesy of Bart Selman Cornell University.
Constraint Satisfaction Problems
1 Constraint Satisfaction Problems Slides by Prof WELLING.
Distributions of Randomized Backtrack Search Key Properties: I Erratic behavior of mean II Distributions have “heavy tails”.
Structure and Phase Transition Phenomena in the VTC Problem C. P. Gomes, H. Kautz, B. Selman R. Bejar, and I. Vetsikas IISI Cornell University University.
Quasigroups Defaults Foundations of AI. Given an N X N matrix, and given N colors, color the matrix in such a way that: -all cells are colored; - each.
Constrainedness Including slides from Toby Walsh.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 3 Logic Representations (Part 2)
Constraint Satisfaction Problems Chapter 6. Review Agent, Environment, State Agent as search problem Uninformed search strategies Informed (heuristic.
Chapter 5 Section 1 – 3 1.  Constraint Satisfaction Problems (CSP)  Backtracking search for CSPs  Local search for CSPs 2.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems by Carla P. Gomes, Bart Selman, Nuno Crato and henry Kautz Presented by Yunho.
Hande ÇAKIN IES 503 TERM PROJECT CONSTRAINT SATISFACTION PROBLEMS.
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Fall 2006 Jim Martin.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module Logic Representations.
Quality of LP-based Approximations for Highly Combinatorial Problems Lucian Leahu and Carla Gomes Computer Science Department Cornell University.
Constraint Satisfaction Problems (Chapter 6)
1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3 Grand Challenge:
CHAPTER 5 SECTION 1 – 3 4 Feb 2004 CS Constraint Satisfaction 1 Constraint Satisfaction Problems.
1 Combinatorial Problems in Cooperative Control: Complexity and Scalability Carla P. Gomes and Bart Selman Cornell University Muri Meeting June 2002.
Balance and Filtering in Structured Satisfiability Problems Henry Kautz University of Washington joint work with Yongshao Ruan (UW), Dimitris Achlioptas.
1. 2 Outline of Ch 4 Best-first search Greedy best-first search A * search Heuristics Functions Local search algorithms Hill-climbing search Simulated.
Eliminating non- binary constraints Toby Walsh Cork Constraint Computation Center.
Computing & Information Sciences Kansas State University Friday, 08 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 7 of 42 Friday, 08 September.
Chapter 5 Team Teaching AI (created by Dewi Liliana) PTIIK Constraint Satisfaction Problems.
Inference in Propositional Logic (and Intro to SAT) CSE 473.
Where are the hard problems?. Remember Graph Colouring? Remember 3Col?
1 P NP P^#P PSPACE NP-complete: SAT, propositional reasoning, scheduling, graph coloring, puzzles, … PSPACE-complete: QBF, planning, chess (bounded), …
Lecture 7 Constraint Satisfaction Problems
Constraint Satisfaction Problems
CS 8520: Artificial Intelligence
Constraint Satisfaction Problems
Presentation transcript:

Lecture 8 Randomized Search Algorithms Part I: Backtrack Search CSE 573 Artificial Intelligence I Henry Kautz Fall 2001

Coming Up… Leveraging Randomization in Tree Search Problem Hardness Heavy-tailed Distributions Randomized Restarts Satisfiability (R&N sec 6.4) Boolean (0/1) variables Non-binary constraints Local Search (R&N 4.4, exercise 6.15, sec 20.9) GSAT/Walksat Simulated Annealing Genetic Algorithms

Variable and Value Selection Select variable with smallest domain –Minimize branching factor –Most likely to propagate: most constrained variable heuristic Which values to try first? –Most likely value for solution –Least propagation! Least constrained variable Why different? –Every constraint must be eventually satisfied –Not every value must be assigned to a variable! Tie breaking? –In general randomized tie breaking best – less likely to get stuck on same bad pattern of choices

Inference in CSP’s: So Far… Constraint checking against partial assignments Forward checking: each time a variable is instantiated, remove other inconsistent values Keep track of current domains of vars Arc consistency: Iterate forward checking until no more changes For each pair (V i,V j ): for every value d in the current domain of V i there is some value y in the domain of V j such that V i =x and V j =y is permitted by the binary constraint between V i and V j Variable / value selection

N-queens Demo Board size 15 Delay 6 Deterministic vs. Randomized tie breaking

Question of the Day Random tie breaking appears to improve tree search Is this a general phenomena? Does it appear in real-world problems? How can we best leverage randomization to minimize expected solution time?

Problem Domain:  Chess

Wavelength Division Multiplexing (WDM) is the most promising technology for the next generation of wide-area backbone networks. WDM networks use the large bandwidth available in optical fibers by partitioning it into several channels, each at a different wavelength. Fiber Optic Networks (Barry and Humblet 92, 93; Chen and Banerjee 95; Kumar et al. 1999)

Fiber Optic Networks Nodes connect point to point fiber optic links

Fiber Optic Networks Nodes connect point to point fiber optic links Each fiber optic link supports a large number of wavelengths Nodes are capable of photonic switching --dynamic wavelength routing -- which involves the setting of the wavelengths.

Routing in Fiber Optic Networks Routing Node How can we achieve conflict-free routing in each node of the network? Dynamic wavelength routing is a NP-hard problem. Input PortsOutput Ports preassigned channels

Timetabling (Gomes et al. 1998, McAloon & Tretkoff 97, Nemhauser & Trick 1997, Regin 1999) The problem of generating schedules with complex constraints (in this case for sports teams).

Paramedic Crew Assignment (Austin, Texas) Paramedic crew assignment is the problem of assigning paramedic crews from different stations to cover a given region, given several resource constraints.

Given an N X N matrix, and given N colors, a quasigroup of order N is a a colored matrix, such that: -all cells are colored. - each color occurs exactly once in each row. - each color occurs exactly once in each column. Quasigroup or Latin Squar (Order 4) Quasigroups or Latin Squares: An Abstraction for Real World Applications

Quasigroup Completion Problem (QCP) Given a partial assignment of colors (10 colors in this case), can the partial quasigroup (latin square) be completed so we obtain a full quasigroup? Example: 32% preassignment (Gomes & Selman 97)

Quasigroup Completion Problem A Framework for Studying Search NP-Complete. Has a structure not found in random instances, such as random K-SAT. Leads to interesting search problems when structure is perturbed (more about it later). (Anderson 85, Colbourn 83, 84, Denes & Keedwell 94, Fujita et al. 93, Gent et al. 99, Gomes & Selman 97, Gomes et al. 98, Meseguer & Walsh 98, Stergiou and Walsh 99, Shaw et al. 98, Stickel 99, Walsh 99 )

QCP Example Use: Routers in Fiber Optic Networks Dynamic wavelength routing in Fiber Optic Networks can be directly mapped into the Quasigroup Completion Problem. (Barry and Humblet 93, Cheung et al. 90, Green 92, Kumar et al. 99) each channel cannot be repeated in the same input port (row constraints); each channel cannot be repeated in the same output port (column constraints); CONFLICT FREE LATIN ROUTER Input ports Output ports Input PortOutput Port

QCP as a CSP Variables - Constraints - row column

Forward CheckingArc Consistency Constraint Propagation in QCP

Are all the Quasigroup Instances (of same size) Equally Difficult? Time performance: 165 What is the fundamental difference between instances? Click here

Are all the Quasigroup Instances Equally Difficult? % 50% 150 Time performance: 35% Fraction of preassignment:

Complexity of Quasigroup Completion Fraction of pre-assignment Median Runtime (log scale) Critically constrained area Overconstrained area Underconstrained area 42%50%20%

Phase Transition Almost all unsolvable area Fraction of pre-assignment Fraction of unsolvable cases Almost all solvable area Complexity Graph Phase transition from almost all solvable to almost all unsolvable

These results for the QCP - a structured domain, nicely complement previous results on phase transition and computational complexity for random instances such as SAT, Graph Coloring, etc. (Broder et al. 93; Clearwater and Hogg 96, Cheeseman et al. 91, Cook and Mitchell 98, Crawford and Auton 93, Crawford and Baker 94, Dubois 90, Frank et al. 98, Frost and Dechter 1994, Gent and Walsh 95, Hogg, et al. 96, Mitchell et al. 1992, Kirkpatrick and Selman 94, Monasson et 99, Motwani et al. 1994, Pemberton and Zhang 96, Prosser 96, Schrag and Crawford 96, Selman and Kirkpatrick 97, Smith and Grant 1994, Smith and Dyer 96, Zhang and Korf 96, and more)

Constrainedness The constrainedness of combinatorial problems is an important notion to differentiate instances of problems. Fraction of pre-assigned colors (QCP); Ratio of clauses to variables (SAT); Ratio of nodes to edges (Graph Coloring); (Gent, MacIntyre,Prosser, & Walsh 96, Williams and Hogg 94, Smith & Dyer 96 )

Effect of Constrainedness Under-constrained: search rapidly finds path to a solution, with few backtracks Over-constrained: all branches quickly terminate in failure, search proves there is no solution Critically constrained: search must explore many possibilities before deciding –Critical region empirically identified for many interesting distributions (e.g. random QCP, random 3-SAT) – Important topic in theory and statistical physics: proving that critical regions exist and where located for different kinds of problems

Recall: we introduced randomness in a backtrack search method by randomly breaking ties in variable and/or value selection. Compare with standard lexicographic tie- breaking. Randomized Backtrack Search

Distributions of Randomized Backtrack Search Key Properties: I Erratic behavior of mean II Distributions have “heavy tails”.

1

Median = 1! sample mean number of runs 3500! Erratic Behavior of Search Cost Quasigroup Completion Problem

Heavy-Tailed Distributions … infinite variance … infinite mean Introduced by Pareto in the 1920’s --- “probabilistic curiosity.” Mandelbrot established the use of heavy-tailed distributions to model real-world fractal phenomena. Examples: stock-market, earth- quakes, weather,...

Decay of Distributions Standard --- Exponential Decay e.g. Normal: Heavy-Tailed --- Power Law Decay e.g. Pareto-Levy:

Standard Distribution (finite mean & variance) Power Law Decay Exponential Decay

How to Check for “Heavy Tails”? Log-Log plot of tail of distribution should be approximately linear. Slope gives value of infinite mean and infinite variance infinite mean and infinite variance infinite variance infinite variance

Number backtracks (log) (1-F(x))(log) Unsolved fraction => Infinite mean Heavy-Tailed Behavior in QCP Domain 18% unsolved 0.002% unsolved

Consequence for algorithm design: Use rapid restarts or parallel / inter-leaved runs Super linear speedups!!!

XXXXX solved 10 Sequential: = 51 seconds Parallel: 10 machines second 51 x speedup Super-linear Speedups Interleaved (1 machine): 10 x 1 = 10 seconds 5 x speedup

Restarts 70% unsolved 250~ 62.5 restarts 1-F(x) Unsolved fraction Number backtracks (log)

Tuning Cutoff ~100 restarts Cutoff (log) Number backtracks (log) ~10 restarts

Deterministic Logistics Planning108 mins.95 sec. Scheduling sec250 sec (*) not found after 2 days Scheduling 16---(*)1.4 hours Scheduling (*)~18 hrs Circuit Synthesis 1---(*)165sec. Circuit Synthesis 2---(*)17min. Summary Results: Other Domains Restarts

Eliminating Heavy Tails The run-time distribution with restarts provably follows a geometric distribution: No heavy tails! m=cutoff Y=total number of backtracks using restarts

Deterministic Search Austin, Texas Click here

Restarts Austin, Texas Click here

Summary The difficulty of search can (sometimes!) be identified with the degree to which a problem instance is critically constrained On many kinds of hard problem distributions, backtrack CSP solvers show very high variance in run-time – heavy tailed distributions Randomized restart and portfolio strategies in such cases can give superlinear speedup leveraging unpredictability to improve search