Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Lecture 8 Randomized Search Algorithms Part I: Backtrack Search CSE 573 Artificial Intelligence I Henry Kautz Fall 2001."— Presentation transcript:

1

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

3 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

4 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

5 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

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

7 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?

8 Problem Domain:  Chess

9 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)

10 Fiber Optic Networks Nodes connect point to point fiber optic links

11 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.

12 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 1 2 3 4 1 2 3 4 preassigned channels

13 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).

14 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.

15 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

16 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)

17 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 )

18 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 3 1 2 4 Input PortOutput Port 1 2 4 3

19 QCP as a CSP Variables - Constraints - row column

20 Forward CheckingArc Consistency Constraint Propagation in QCP

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

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

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

24 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

25 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)

26 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 )

27 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

28 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

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

30 1

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

32 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,...

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

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

35 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

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

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

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

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

40 Tuning Cutoff 20 2000 ~100 restarts Cutoff (log) Number backtracks (log) ~10 restarts 100000

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

42 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

43 Deterministic Search Austin, Texas Click here

44 Restarts Austin, Texas Click here

45 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


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

Similar presentations


Ads by Google