Distributed Constraint Handling and Optimization Alessandro Farinelli 1 Alex Rogers 2 Meritxell Vinyals 1 1 Computer Science Department University of Verona, Italy 2 Agents, Interaction and Complexity Group School of Electronics and Computer Science University of Southampton,UK Tutorial EASSS 2012 Valencia https://sites.google.com/site/ easss2012optimization/
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Distributed Constraint Handlingand Optimization
Alessandro Farinelli1 Alex Rogers2 Meritxell Vinyals1
1Computer Science DepartmentUniversity of Verona, Italy
2Agents, Interaction and Complexity GroupSchool of Electronics and Computer Science
• The mathematical formulation of a DCOP• The main exact solution techniques for DCOPs
• Key differences, benefits and limitations
• The main approximate solution techniques for DCOPs• Key differences, benefits and limitations
• The quality guarantees these approach provide:• Types of quality guarantees• Frameworks and techniques
Outline
Introduction
Distributed Constraint Reasoning
Applications and Exemplar Problems
Complete algorithms for DCOPs
Approximated Algorithms for DCOPs
Conclusions
Constraint Networks
A constraint network N is formally defined as a tuple 〈X ,D,C〉 where:
• X = {x1, . . . ,xn} is a set of discrete variables;
• D = {D1, . . . ,Dn} is a set of variable domains, which enumerateall possible values of the corresponding variables; and
• C = {C1, . . . ,Cm} is a set of constraints; where a constraint Ci isdefined on a subset of variables Si ⊆ X which comprise thescope of the constraint
• r = |Si| is the arity of the constraint• Two types: hard or soft
Hard constraints
• A hard constraint Chi is a relation Ri that enumerates all the valid
joint assignments of all variables in the scope of the constraint.
Ri ⊆ Di1× . . .×Dir
Ri x j xk
0 11 0
Soft constraints
• A soft constraint Csi is a function Fi that maps every possible joint
assignment of all variables in the scope to a real value.
Fi : Di1× . . .×Dir →ℜ
Fi x j xk
2 0 00 0 10 1 01 1 1
Binary Constraint Networks
• Binary constraint networks are those where:
• Each constraint (soft or hard) is definedover two variables.
• Every constraint network can be mapped toa binary constraint network
• requires the addition of variables andconstraints
• may add complexity to the model
• They can be represented by a constraintgraph
x1
x2 x3
x4
F 1,2 F
1,3
F 2,4
F 1,4
Different objectives, different problems
• Constraint Satisfaction Problem (CSP)
• Objective: find an assignment for all the variables in the networkthat satisfies all constraints.
• Constraint Optimization Problem (COP)
• Objective: find an assignment for all the variables in the networkthat satisfies all constraints and optimizes a global function.
• Global function = aggregation (typically sum) of local functions.F(x) = ∑i Fi(xi)
Distributed Constraint Reasoning
When operating in adecentralized context:
• a set of agents controlvariables
• agents interact to find asolution to the constraintnetwork
A1
A2
A3
A4
Distributed Constraint Reasoning
Two types of decentralized problems:
• distributed CSP (DCSP)
• distributed COP (DCOP)
Here, we focus on DCOPs.
Distributed Constraint Optimization Problem (DCOP)
A DCOP consists of a constraint network N = 〈X ,D,C〉 and a set ofagents A = {A1, . . . ,Ak} where each agent:
• controls a subset of the variables Xi ⊆ X• is only aware of constraints that involve variable it controls
• communicates only with its neighbours
Distributed Constraint Optimization Problem (DCOP)
• Agents are assumed to be fully cooperative• Goal: find the assignment that optimizes the global function, not
their local local utilities.
• Solving a COP is NP-Hard and DCOP is as hard as COP.
Motivation
Why distribute?
• Privacy
• Robustness
• Scalability
Outline
Introduction
Distributed Constraint Reasoning
Applications and Exemplar Problems
Complete algorithms for DCOPs
Approximated Algorithms for DCOPs
Conclusions
Real World Applications
Many standard benchmark problems in computer science can bemodeled using the DCOP framework:
Then the minimum lower bound across variablevalues is LB = 0.
ADOPT by example
Each agent asynchronously chooses the value of its variable thatminimizes its lower bound.
A1
A2x2 = 0→ 1 A3
A4
[0,2,c
2]
x 2=
1
A2 computes for each possible value of itsvariable its local function restricted to thecurrent context c2 = {(x1 = 0)}(λ (0,x2) = F1,2(0,x2)) and adding lowerbound message from A4 (lb).
• Lower/upper bounds only stored for thecurrent context
Solution
• Backtrack thresholds: used to speed upthe search of previously exploredsolutions.
ADOPT by example
A1
x1 = 0→ 1→ 0
A2 A3
A4
A1 changes its value and the context withx1 = 0 is visited again.
• Reconstructing from scratch is inefficient
• Remembering solutions is expensive
Backtrack thresholds
Solution: Backtrack thresholds
• Lower bound previously determined by children
• Polynomial space
• Control backtracking to efficiently search
• Key point: do not change value until LB(currentvalue)> threshold
A child agent will not change its variable value so long as cost is lessthan the backtrack threshold given to it by its parent.
A1LB(x1 = 0) = 1
A2LB(x2 = 0)> 12 ? A3 LB(x3 = 0)> 1
2 ?
A4
t(x 1
=0)
=1 2
t(x1=
0)=
12
Rebalance incorrect threshold
How to correctly subdivide threshold among children?
• Parent distributes the accumulated bound among children• Arbitrarily/Using some heuristics
• Correct subdivision as feedback is received from children• LB < t(CONT EXT )• t(CONT EXT ) = ∑Ci t(CONT EXT )+δ
Backtrack Threshold Computation
A1
A2 A3
A4
(2)
t(x 1
=0)
=1
(1) L
B=
1
(2)12 t(x
1=
0)=
0
• When A1 receives a new lower boundfrom A2 rebalances thresholds
• A1 resends threshold messages to A2and A3
ADOPT extensions
• BnB-ADOPT [Yeoh et al., 2008] reduces computation time byusing depth-first search with branch and bound strategy
• [Ali et al., 2005] suggest the use of preprocessing techniques forguiding ADOPT search and show that this can result in aconsistent increase in performance.
Outline
Introduction
Distributed Constraint Reasoning
Applications and Exemplar Problems
Complete algorithms for DCOPsSearch Based: ADOPTDynamic Programming DPOP
• Constraint processing• exploit problem structure to solve hard problems efficiently
• DCOP framework• applies constraint processing to solve decision making problems
in Multi-Agent Systems• increasingly being applied within real world problems.
References I
• [Modi et al., 2005] P. J. Modi, W. Shen, M. Tambe, and M.Yokoo. ADOPT: Asynchronousdistributed constraint optimization with quality guarantees. Artificial Intelligence Jour- nal,(161):149-180, 2005.
• [Yeoh et al., 2008] W. Yeoh, A. Felner, and S. Koenig. BnB-ADOPT: An asynchronousbranch-and-bound DCOP algorithm. In Proceedings of the Seventh International JointConference on Autonomous Agents and Multiagent Systems, pages 591Ð598, 2008.
• [Ali et al., 2005] S. M. Ali, S. Koenig, and M. Tambe. Preprocessing techniques foraccelerating the DCOP algorithm ADOPT. In Proceedings of the Fourth International JointConference on Autonomous Agents and Multiagent Systems, pages 1041Ð1048, 2005.
• [Petcu and Faltings, 2005] A. Petcu and B. Faltings. DPOP: A scalable method formultiagent constraint opti- mization. In Proceedings of the Nineteenth International JointConference on Arti- ficial Intelligence, pages 266-271, 2005.
• [Dechter, 2003] R. Dechter. Constraint Processing. Morgan Kaufmann, 2003.
References II
• [Petcu and Faltings, 2005(2)] A. Petcu and B. Faltings. A-DPOP: Approximations indistributed optimization. In Principles and Practice of Constraint Programming, pages802-806, 2005.
• [Petcu and Faltings, 2007] A. Petcu and B. Faltings. MB-DPOP: A new memory-boundedalgorithm for distributed optimization. In Proceedings of the Twentieth International JointConfer- ence on Artificial Intelligence, pages 1452-1457, 2007.
• [S. Fitzpatrick and L. Meetrens, 2003] S. Fitzpatrick and L. Meetrens. Distributed SensorNetworks: A multiagent perspective, chapter Distributed coordination through anarchicoptimization, pages 257- 293. Kluwer Academic, 2003.
• [R. T. Maheswaran et al., 2004] R. T. Maheswaran, J. P. Pearce, and M. Tambe.Distributed algorithms for DCOP: A graphical game-based approach. In Proceedings ofthe Seventeenth International Conference on Parallel and Distributed ComputingSystems, pages 432-439, 2004.
– DALO for generic k (and t-optimality) [Kiekintveld et al. 10]
• The higher k the more complex the computation
(exponential)(exponential)
Percentage of Optimal:
• The higher k the better
• The higher the number of
agents the worst
Trade-off between generality and solution
quality
• K-optimality based on worst case analysis
• assuming more knowledge gives much better bounds
• Knowledge on structure [Pearce and Tambe 07]
Trade-off between generality and
solution quality• Knowledge on reward [Bowring et al. 08]
• Beta: ratio of least minimum reward to the maximum
Off-Line Guarantees: Region
Optimality• k-optimality: use size as a criterion for optimality
• t-optimality: use distance to a central agent in the constraint graph
• Region Optimality: define regions based on general criteria (e.g. S-size bounded distance) [Vinyals et al 11]criteria (e.g. S-size bounded distance) [Vinyals et al 11]
• Ack: Meritxell Vinyals
3-size regions
x0 x1 x2 x3
x0
x1 x2
x3
x0
x1 x2
x3
x0
x1 x2
x3
x0
x1 x2
x3
1-distance regions
x0 x1 x2 x3
C regions
Size-Bounded Distance
• Region optimality can explore new regions: s-size bounded distance
• One region per agent, largest t-distance group whose size is less than s
3-size bounded distance
x0 x0than s
• S-Size-bounded distance – C-DALO extension of DALO for general
regions
– Can provides better bounds and keep under control size and number of regions
x1 x2
x3
x0
x1 x2
x3
x1 x2
x3
x0
x1 x2
x3
t=1
t=0 t=1
t=0
Max-Sum and Region Optimality
• Can use region optimality to provide bounds for Max-sum [Vinyals et al 10b]
• Upon convergence Max-Sum is optimal on SLT regions of the graph [Weiss 00]
• Single Loops and Trees (SLT): all groups of agents whose • Single Loops and Trees (SLT): all groups of agents whose vertex induced subgraph contains at most one cycle
x1
x0
x2
x3
x0
x1 x2
x3
x0
x1 x2
x3
x0
x1 x2
x3
x0
x1 x2
x3
Bounds for Max-Sum
• Complete: same as
3-size optimality
• bipartite
• 2D grids
Variable Disjoint Cycles
Very high quality guarantees if smallest cycle is large
Instance-specific guarantees
Characterise solution quality after/while
running the algorithm
Bounded Max-
Sum
DaCSA
Instance-specific
Generality
Accuracy
MGM-1,
DSA-1,
Max-Sum
DaCSA
K-optimality
T-optimality
Region Opt.
Instance-generic
No guarantees
Build Spanning tree
Bounded Max-SumAim: Remove cycles from Factor Graph avoiding
exponential computation/communication (e.g. no junction tree)
Key Idea: solve a relaxed problem instance [Rogers et al.11]
X1 F2 X3 X1 F2 X3
Run Max-SumCompute Bound
X1 X2
X2F1 F3 X2F1 F3
X3
Optimal solution on tree
Factor Graph Annotation
• Compute a weight for
each edge
– maximum possible impact of the variable on the
X1 F2 X3
w21 w23of the variable on the function
X2F1 F3
w21
w11
w12
w22
w23
w33
w32
Factor Graph Modification
X1 F2 X3
w21 w23
• Build a Maximum
Spanning Tree
– Keep higher weights
• Cut remaining
dependencies
– Compute
X2F1 F3
w11
w12
w22 w33
w32
W = w22 + w23
– Compute
• Modify functions
• Compute bound
Results: Random Binary Network
Optimal
Approx.
Lower Bound
Upper Bound
Bound is significant
– Approx. ratio is typically 1.23 (81 %)
Comparison with k-optimal
with knowledge on
reward structure
Much more accurate less general
Discussion
• Discussion with other data-dependent techniques
– BnB-ADOPT [Yeoh et al 09]
• Fix an error bound and execute until the error bound is met
• Worst case computation remains exponential
– ADPOP [Petcu and Faltings 05b]– ADPOP [Petcu and Faltings 05b]
• Can fix message size (and thus computation) or error bound and
leave the other parameter free
• Divide and coordinate [Vinyals et al 10]
– Divide problems among agents and negotiate agreement
by exchanging utility
– Provides anytime quality guarantees
Summary
• Approximation techniques crucial for practical applications:
– No guarantees (convergence, solution quality)– No guarantees (convergence, solution quality)
• Instance generic guarantees:
– K-optimality framework
– Loose bounds for large scale systems
• Instance specific guarantees
– Bounded max-sum, ADPOP, BnB-ADOPT
– Performance depend on specific instance
References IDOCPs for MRS• [Delle Fave et al 12] A methodology for deploying the max-sum algorithm and a case study on
unmanned aerial vehicles. In, IAAI 2012
• [Taylor et al. 11] Distributed On-line Multi-Agent Optimization Under Uncertainty: Balancing Exploration and Exploitation, Advances in Complex Systems
MGM • [Maheswaran et al. 04] Distributed Algorithms for DCOP: A Graphical Game-Based Approach,
PDCS-2004
DSADSA• [Fitzpatrick and Meertens 03] Distributed Coordination through Anarchic Optimization,
Distributed Sensor Networks: a multiagent perspective.
• [Zhang et al. 03] A Comparative Study of Distributed Constraint algorithms, Distributed Sensor Networks: a multiagent perspective.
Max-Sum• [Stranders at al 09] Decentralised Coordination of Mobile Sensors Using the Max-Sum
Algorithm, AAAI 09
• [Rogers et al. 10] Self-organising Sensors for Wide Area Surveillance Using the Max-sum Algorithm, LNCS 6090 Self-Organizing Architectures
• [Farinelli et al. 08] Decentralised coordination of low-power embedded devices using the max-sum algorithm, AAMAS 08
References IIInstance-based Approximation• [Yeoh et al. 09] Trading off solution quality for faster computation in DCOP search algorithms,
IJCAI 09
• [Petcu and Faltings 05b] A-DPOP: Approximations in Distributed Optimization, CP 2005
• [Rogers et al. 11] Bounded approximate decentralised coordination via the max-sum algorithm, Artificial Intelligence 2011.
Instance-generic Approximation• [Vinyals et al 10b] Worst-case bounds on the quality of max-product fixed-points, NIPS 10
• [Vinyals et al 11] Quality guarantees for region optimal algorithms, AAMAS 11• [Vinyals et al 11] Quality guarantees for region optimal algorithms, AAMAS 11
• [Pearce and Tambe 07] Quality Guarantees on k-Optimal Solutions for Distributed Constraint Optimization Problems, IJCAI 07
• [Bowring et al. 08] On K-Optimal Distributed Constraint Optimization Algorithms: New Bounds and Algorithms, AAMAS 08
• [Weiss 00] Correctness of local probability propagation in graphical models with loops, Neural Computation
• [Kiekintveld et al. 10] Asynchronous Algorithms for Approximate Distributed Constraint Optimization with Quality Bounds, AAMAS 10