Part 2: Algorithms. CP-2001 Tutorial - Cyprus November 2001 Algorithms 1

Similar documents
Semi-Independent Partitioning: A Method for Bounding the Solution to COP s

Example: Bioinformatics. Soft Constraint Processing. From Optimal CSP to Soft CSP. Overview. From Optimal CSP to Soft CSP.

Conflict Directed Backjumping for Max-CSPs

Multi-Objective Russian Doll Search

Russian Doll Search with Tree Decomposition

Dynamic heuristics for branch and bound search on tree-decomposition of Weighted CSPs

Conflict based Backjumping for Constraints Optimization Problems

Announcements. CS 188: Artificial Intelligence Fall Reminder: CSPs. Today. Example: 3-SAT. Example: Boolean Satisfiability.

CS 188: Artificial Intelligence Fall 2008

Today. CS 188: Artificial Intelligence Fall Example: Boolean Satisfiability. Reminder: CSPs. Example: 3-SAT. CSPs: Queries.

Constraint Optimization Techniques for MultiObjective Branch and Bound Search

Constraint Satisfaction Problems

Lecture 18. Questions? Monday, February 20 CS 430 Artificial Intelligence - Lecture 18 1

Towards Parallel Non Serial Dynamic Programming for Solving Hard Weighted CSP

Constraint Satisfaction Problems

A fuzzy constraint assigns every possible tuple in a relation a membership degree. The function

Example: Map coloring

CS 188: Artificial Intelligence Fall 2011

CS 188: Artificial Intelligence Spring Today

Lecture 6: Constraint Satisfaction Problems (CSPs)

What is Search For? CSE 473: Artificial Intelligence. Example: N-Queens. Example: N-Queens. Example: Map-Coloring 4/7/17

On the Practical use of Variable Elimination in Constraint Optimization Problems: Still-life as a Case Study

Outline. Best-first search

CS 188: Artificial Intelligence

AI Fundamentals: Constraints Satisfaction Problems. Maria Simi

Branch and Bound Algorithm Selection by Performance Prediction

Constraint Satisfaction Problems Part 2

Constraint Programming

Set 5: Constraint Satisfaction Problems

Constraint Satisfaction

Constraint Optimisation Problems. Constraint Optimisation. Cost Networks. Branch and Bound. Dynamic Programming

Constraint Satisfaction Problems

Announcements. CS 188: Artificial Intelligence Spring Production Scheduling. Today. Backtracking Search Review. Production Scheduling

Constraint Satisfaction Problems (CSPs)

Outline. Best-first search

Local Consistency in Weighted CSPs and Inference in Max-SAT

Constraint Satisfaction Problems

Constraint Satisfaction Problems

CS 188: Artificial Intelligence Spring Announcements

The Objective Sum Constraint

6.034 Quiz 1, Spring 2004 Solutions

Constraint Satisfaction Problems Chapter 3, Section 7 and Chapter 4, Section 4.4 AIMA Slides cstuart Russell and Peter Norvig, 1998 Chapter 3, Section

Constraints. CSC 411: AI Fall NC State University 1 / 53. Constraints

Heuristic Optimization Introduction and Simple Heuristics

CS 188: Artificial Intelligence

Exact Max-SAT solvers for over-constrained problems

CSE 473: Artificial Intelligence

Module 4. Constraint satisfaction problems. Version 2 CSE IIT, Kharagpur

CS 188: Artificial Intelligence Fall 2008

Announcements. CS 188: Artificial Intelligence Fall Large Scale: Problems with A* What is Search For? Example: N-Queens

4 Search Problem formulation (23 points)

Constraint Satisfaction Problems

CS 188: Artificial Intelligence. Recap: Search

CS 188: Artificial Intelligence Spring Announcements

Set 5: Constraint Satisfaction Problems Chapter 6 R&N

CS 188: Artificial Intelligence

Constraint Satisfaction Problems

Constraint Satisfaction Problems

10/11/2017. Constraint Satisfaction Problems II. Review: CSP Representations. Heuristic 1: Most constrained variable

1 Tree Search (12 points)

Announcements. CS 188: Artificial Intelligence Spring Today. A* Review. Consistency. A* Graph Search Gone Wrong

Finding irreducible infeasible sets in inconsistent constraint satisfaction problems. Alain Hertz

Constraint Satisfaction Problems. A Quick Overview (based on AIMA book slides)

A Tutorial with Java API and Examples on Valued Constraint Satisfaction Problems

Constraint Satisfaction Problems

Announcements. Reminder: CSPs. Today. Example: N-Queens. Example: Map-Coloring. Introduction to Artificial Intelligence

What is Search For? CS 188: Artificial Intelligence. Example: Map Coloring. Example: N-Queens. Example: N-Queens. Constraint Satisfaction Problems

CS-171, Intro to A.I. Mid-term Exam Winter Quarter, 2016

Conflict-based Statistics

Last time: Problem-Solving

Example: Map-Coloring. Constraint Satisfaction Problems Western Australia. Example: Map-Coloring contd. Outline. Constraint graph

(Due to rounding, values below may be only approximate estimates.) We will supply these numbers as they become available.

Constraint Satisfaction Problems

Constraint Satisfaction Problems. Chapter 6

CS188 Spring 2010 Section 2: CSP s

K-Consistency. CS 188: Artificial Intelligence. K-Consistency. Strong K-Consistency. Constraint Satisfaction Problems II

Lecture: Iterative Search Methods

Reading: Chapter 6 (3 rd ed.); Chapter 5 (2 nd ed.) For next week: Thursday: Chapter 8

Parallel Computing in Combinatorial Optimization

Nogood Recording for Valued Constraint Satisfaction Problems.

Uninformed Search Methods. Informed Search Methods. Midterm Exam 3/13/18. Thursday, March 15, 7:30 9:30 p.m. room 125 Ag Hall

Week 8: Constraint Satisfaction Problems

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 6 February, 2018

Column Generation Based Primal Heuristics

Constraint Satisfaction. AI Slides (5e) c Lin

Virtual Arc Consistency for Weighted CSP

Algorithms for Integer Programming

Using Soft CSPs for Approximating Pareto-Optimal Solution Sets

Mathematical Programming Formulations, Constraint Programming

Decomposable Constraints

Artificial Intelligence

CMU-Q Lecture 8: Optimization I: Optimization for CSP Local Search. Teacher: Gianni A. Di Caro

CS 188: Artificial Intelligence Fall 2011

Cluster Tree Elimination for Distributed Constraint Optimization with Quality Guarantees

Set 5: Constraint Satisfaction Problems

Lars Schmidt-Thieme, Information Systems and Machine Learning Lab (ISMLL), University of Hildesheim, Germany, Course on Artificial Intelligence,

ARTIFICIAL INTELLIGENCE (CS 370D)

General Methods and Search Algorithms

CMU-Q Lecture 7: Searching in solution space Constraint Satisfaction Problems (CSPs) Teacher: Gianni A. Di Caro

CS 771 Artificial Intelligence. Constraint Satisfaction Problem

Transcription:

Part 2: Algorithms CP-2001 Tutorial - Cyprus November 2001 Algorithms 1

CP-2001 Tutorial - Cyprus November 2001 Algorithms 2 Overview Problem formulation: Optimization task Exact algorithms: Branch and Bound Partial Forward Checking Reversible DACs Russian Doll Search Bucket Elimination tree search Approximate algorithms: Local search approaches Interval approximation

τ[i]: current assignment projected over variable i CP-2001 Tutorial - Cyprus November 2001 Algorithms 3 Terminology Variables: i, j, k,... Values: a, b, c, Constraints: f, g, h, var(f): variables involved in f Domains: D 0 (i): initial domain of variable i D (i): current domain of variable i P: set of assigned or past variables F: set of unassigned or future variables C P : set of constraints involving past variables C PF : set of constraints involving past and future variables C F : set of constraints involving future variables τ: current assignment

Goal: minimize f C f (t ) weighted CSP (NP-hard) CP-2001 Tutorial - Cyprus November 2001 Algorithms 4 Soft CSP: (X,D,C) Problem Formulation X is a set of n variables D = { D 0 (1), D 0 (2),..., D 0 (n)} is a collection of variable domains C is a set of r soft constraints f C f : i var(f) D 0 (i) [0, + ] 0 t satisfies completely f f (t) = (0, + ) t satisfies / violates partially f + t violates completely f f (t) : cost associated with violation of f by t preferences

CP-2001 Tutorial - Cyprus November 2001 Algorithms 5 n Branch and Bound Depth-first tree search: internal node: partial assignment leaf: total assignment At each node: Distance: dist (τ) = f CP f (τ) Upper bound (UB): minimum distance of visited leaves: distance of the current best solution Lower bound (LB): underestimation of minimum distance among leaves below current node Pruning: UB LB Simplest LB: dist (τ) current node 1 2

LB quality: very important for branch and bound efficiency Lower Bound past variables cost of past variables distance current node local cost of future var because past var inconsistency counts future variables local cost of future variables directed arc-inconsistency counts global cost of future variables russian doll search CP-2001 Tutorial - Cyprus November 2001 Algorithms 6

Cost of value a of future variable i because constraint f: cost (i,a,f) = min t[i]=a f(t) t i var(f) D (i) cost 0 (i,a,f) = min t[i]=a f(t) t i var(f) D 0 (i) inconsistency counts on future values are computed inconsistency count of value a of future variable i : C PF : constraints involving one past and one future variables CP-2001 Tutorial - Cyprus November 2001 Algorithms 7 valid t initial t Partial Forward Checking [Freuder & Wallace 92] Branch and Bound + Lookahead Lookahead: after assigning a value to a variable ic (i,a) = f CPF cost (i,a,f) binary constraints

contributions to the lower bound CP-2001 Tutorial - Cyprus November 2001 Algorithms 8 Inconsistency Counts [Freuder & Wallace 92] 1, 2,......, i,...., j,..., n past IC IC IC 3 1 1 2 min = 1 a b c d future... 2 2 4 0 a b c d 2... 3 2 4 min = 0 min = 2 a b c d i F min a (ic (i,a))

LB jb (τ,f) = dist (τ) + ic (j,b) + i F -{j} min a {ic (i,a)} CP-2001 Tutorial - Cyprus November 2001 Algorithms 9 New lower bound: PFC Lower Bound [Freuder & Wallace 92] LB (τ,f) = dist (τ) + i F min a {ic (i,a)} cost from C P cost from C PF Future value pruning: LB jb (τ,f) UB the cost of extending τ with (j,b) is greater than or equal to the cost of the current best solution (j,b) can be pruned: it will never improve the current best solution when backtracking to i, (j,b) must be restored

Static DAC [Wallace 95] DAC: (directed arc-inconsistency counts) on future values static variable ordering: 1, 2,..., i,..., j,..., n C F : constraints involving two future variables binary constraints dac (i,a) = f CF cost 0 (i,a,f) var(f) = (i, j), i < j future Static order: 1, 2,........, i,....., j,...., n past DAC a 1 b 2 c 1 DAC a 2 b 0 c 1 min = 1 min = 0 contributions to the lower bound i F min a (dac (i,a)) CP-2001 Tutorial - Cyprus November 2001 Algorithms 10

CP-2001 Tutorial - Cyprus November 2001 Algorithms 11 New lower bound: Combining IC + DAC [Wallace 95] [Larrosa & Meseguer 96] future Static order: 1, 2,........, i,....., j,...., n past IC and DAC of value a of variable i: refer to different constraints can be added IC DAC LB (τ,f) = dist (τ) + i F min a {ic (i,a) + dac (i,a)} cost from C P cost from C PF UC F LB jb (τ,f) = dist (τ) + ic (j,b) + dac (j,b) + a b c i F -{j} min a {ic (i,a) + dac (i,a)}

DAC: Directed Constraints For DAC usage, constraints must be directed DAC stored in the variable pointed by the constraint Implicit in static DAC by static variable order CP-2001 Tutorial - Cyprus November 2001 Algorithms 12 i j f i j f a a 1 a b 2 b a 3 b b 4 dac i j a 1 1 b 3 2 min dac(i) + min dac (j) = 1+1=2 but f(a,a) = 1! i j f dac i j a 1 0 b 3 0 min dac(i) + min dac (j) = 1+0 =1 OK!

dac (i,a,g F ) = f CF cost 0 (i,a,f) var(f) = (i, j), (j, i) Edges(G F ) LB (τ,f,g F ) = dist (τ) + i F min a {ic (i,a) + dac (i,a,g F )} LB jb (τ,f,g F ) = dist (τ) + ic (j,b) + dac (j,b,g F ) + i F -{j} min a {ic (i,a) + dac (i,a,g F )} CP-2001 Tutorial - Cyprus November 2001 Algorithms 13 Graph-based DAC [Larrosa, Meseguer, Schiex 99] Directed constraint graph G F Nodes(G F )=F Edges(G F )={(j,i) C F, directed from j to i} DAC based on G F : New lower bound:

dac (i,a,g F ) = f CF cost (i,a,f) var(f) = (i, j), (j, i) Edges(G F ) CP-2001 Tutorial - Cyprus November 2001 Algorithms 14 Reversible DAC [Larrosa, Meseguer, Schiex 99] Reversible RDAC: Any G F is suitable for LB computation Dynamically selects a good G F (optimal NP-hard, greedy search) Single operation: reversing edge direction Maintaining DAC: redefinition cost 0 cost Previous DAC: initially precomputed DAC can be maintained at run time removed values generate further DAC AC adapted algorithm

rds (subpr) = optimal cost of subpr CP-2001 Tutorial - Cyprus November 2001 Algorithms 15 Static variable order Russian Doll Search [Verfaillie, Lemaitre, Schiex 96] To replace one search by n successive searches on nested subproblems Var 1 Subpr n Sequence subpr: 1, 2,..., i,.., n n-i+1 i Each subproblem is optimally solved: n-2 n-1 n 3 2 1 When solving subproblem i+1 costs of solutions of subproblem i to 1 are used

LB(τ,F) = dist (τ) + i F min a {ic (i,a)} + rds (F) cost from C P cost from C PF cost from C F Russian Doll Search [Verfaillie, Lemaitre, Schiex 96] New lower bound: Solving subproblem i+1: n-i, n-i+1, n-i+2,....., n P F F = subpr i n-i, n-i+1, n-i+2,....., n P F F = subpr i-1......... n-i, n-i+1, n-i+2,....., n P F F = subpr 1 CP-2001 Tutorial - Cyprus November 2001 Algorithms 16

Bucket k: set of constraints involving variable k and i, j,... such that i, j,... < k. Projecting out variable k: (f k) (t) = min a D(k) f (t) t [k] = a CP-2001 Tutorial - Cyprus November 2001 Algorithms 17 Bucket Elimination [Dechter 99] Dynamic programming/ Variable elimination: no tree search synthesize the best solution static variable ordering: 1, 2,...., n Operations on constraints: Addition: f (t) + g (t) = f (t[var(f)]) + g (t[var(g)])

CP-2001 Tutorial - Cyprus November 2001 Algorithms 18 Bucket Elimination [Dechter 99] Var Bucket Process from bucket n to 1: Bucket k = { f 1, f 2,..., f p } static variable order n n-1 bucket n bucket n-1 1. Add all constraints, getting a new one g = f 1 + f 2 +... + f p 2. Project out of g variable k h = g k n-2 bucket n-2 3. Add h to the corresponding bucket Comments: 1 bucket 1 Constraint g summarizes all information of constraints f 1, f 2,..., f p Each iteration transforms a problem P into an equivalent P with one less var The process iterates until no variables

Assign to variable i the best value in g according with previous assignements Complexity: Space and time exponential in the induced width of the graph: max arity of new constraints CP-2001 Tutorial - Cyprus November 2001 Algorithms 19 Example: Bucket Elimination [Dechter 99] Solution: from var 1 to n

Search + Variable Elimination [Larrosa 00] var elim branch var elim var elim Branching: a a changes graph topology lookahead Combining strategy: k parameter if eliminating variable i causes a new constraint with arity <= k then eliminate variable i else do branching on the most connected variable a a a k=2 b backtrack to branching points.... CP-2001 Tutorial - Cyprus November 2001 Algorithms 20

Local search approaches: produce an upper bound CP-2001 Tutorial - Cyprus November 2001 Algorithms 21 Local Search Optimization problem: minimize f C f (t ) hill climbing [Hao & Dorne 96] simulated annealing [Wah & Chen 00] tabu search [Galinier & Hao 97] genetic algorithms: special operators [Lau & Tsang 01] [Wiese & Goodwin 01] Elements: evaluation function: function to optimize neighborhood: one move, two moves,... selection criteria: new state, escaping local optima, randomization, cooling schedule,...

CP-2001 Tutorial - Cyprus November 2001 Algorithms 22 Idea: Interval Approximation [Cabon, de Givry, Verfaillie 98] in many cases, looking for the optimum is too complex instead, look for an interval [LB, UB] containing the optimum when [LB, UB] is narrow enough, stop search [ [ [ LB 1 LB 2... LB k optimum UB k... ]UB 2 ]UB 1 Anytime bounds: ] solution cost UB: local search approaches LB: three strategies problem simplification: solve a simpler problem objective simplification: sum of local costs search simplification: russian doll + iterative deepening