Upload
gianna-clevenger
View
220
Download
1
Tags:
Embed Size (px)
Citation preview
(Centralized) Constraint Satisfaction Problem - CSP
(X , D, C) where:
• X is a set of n variables {x1, . . . , xn}
• D = {D(x1), . . . ,D(xn)} is a set of n domains,
where D(xi) is a finite set of possible values for variable xi
• C is a set of binary constraints, cij D⊆ (xi)⨯D(xj)
Solution: combination of assignments of values to all variables in a way that all the constraints are satisfied.
Applications of Centralized CSP
• Resource Allocation
• Planning
• Timetabling
• DNA sequencing
• Circuit analysis
• …
3
Distributed Meeting Scheduling Problem
Meeting 3Meeting 1
Meeting 2
Meeting 4
M43
M33
M44
M23
≠
M41
M11
M31
M12
M22
≠
≠
=
=
=
=
Agent 2
Agent 1
Agent 3
Agent 4
July 3rd, 2012 Algorithms and Ordering Heuristics for Distributed Constraint Satisfaction Problem 4
Distributed Target Tracking
• In SensorDCSP we have multiple sensors S = {s1,...,sm} and multiple mobiles T ={t1,...,tn} which are to be tracked by the sensors. The goal is to allocate three sensors to track each mobile node, such that all these triplets of sensors are pair-wise disjoint and consistent with two sets of constraints: visibility constraints and compatibility constraints.
• Each mobile has a set of sensors that can possibly detect it, as depicted by the bipartite visibility graph in Fig. 1(a). In addition, it is required that each mobile be assigned three sensors that satisfy a compatibility relation with each other; this compatibility relation is depicted by the graph in Fig. 1(b). Finally, it is required that each sensor only track at most one mobile
6
Distributed CSP - DisCSP
CSP where variables and constraints are distributed among several agents.
(A, X, D, C) where:
• A is a set of agents {A1, ..., Ap}
• X is a set of variables {x1, . . . , xn}
• D = {D(x1), . . . ,D(xn)} is a set of n domains
• C is a set of binary constraints, cij D⊆ (xi) D⨯ (xj)
• We assume all agents hold exactly one variable (p = n)
7
Solving DisCSP
• Agents must assign values to their variables so that all constraints are satisfied
• Agents exchange messages about the variable assignments
• Synchronous Search: – Agents perform assignments in a sequential way
• Asynchronous Search:– Agents perform assignments asynchronously
8
The standard DisCSP synchronous algorithm: Asynchronous Forward Checking (AFC)
CPA:[(x1 ,v1);…;(xi ,vi)]
• Search: synchronous (Current Partial Assignment - CPA)
CPA : ordered set of assignments CPA = {[(x1 ,v1);…;(xi ,vi)] | x1 ··· ≺ ≺ xi }
FC_CPA:[(x1 ,v1);…;(xi ,vi)]
xj xnx1 xkxi xi+1… … xk
Forward-Checking
Empty domain
• FC: asynchronous
Not_OK : [(x1 ,v1),…,(xi ,vi)]
xj xnxk
CPA:[(x1 ,v1);…;(xj-1 ,vj-1)]
Back_CPA:[(x1=v1),…,(xi=vi)]
9
July 3rd, 2012 Algorithms and Ordering Heuristics for Distributed Constraint Satisfaction Problem 10
Asynchronous Forward Checking (AFC)
The standard DisCSP asynchronous algorithm: Asynchronous Backtracking (ABT)
12
• Agents are totally ordered: [A1 , …, Ai-1, Ai , Ai+1, …, An]
• [A1 , …, Ai-1] higher priority agents
• [Ai+1, …, An] lower priority agents
• Agents exchange messages (assignment/backtrack...)
• ABT is correct, complete and terminates
The standard DisCSP asynchronous algorithm: Asynchronous Backtracking (ABT)
15
• xi informs a lower connected agent xk of its assignment
• xk evaluates the constraint, with its own assignment
• If permitted, no action
• Else, xk looks for a value consistent with (xi = vi)
• If it exists, assign it
• Else, backtrack
xkxi
ok?(xi = vi)
Backtrack
The standard DisCSP algorithm: Asynchronous Backtracking (ABT)
x3 x5x2x1 x4
x1=a
ok?(x1=a)
abcd
abcd
abcd
abcd
abcd
x1=a x1=a x1=a
x1=a
x2=b x3=b x4=cx3=bx3=b x2=b
x4=c
resolving the nogoods¬(x1=a ∧ x2=b ∧ x4=c)
ngd: x1=a ∧ x2=b x⟶ 4≠c
x1=a ∧ x2=b
16
Asynchronous Backtracking (Example)
July 3rd, 2012 Algorithms and Ordering Heuristics for Distributed Constraint Satisfaction Problem 17
Asynchronous Backtracking (Example)
July 3rd, 2012 Algorithms and Ordering Heuristics for Distributed Constraint Satisfaction Problem 18
Asynchronous Backtracking (Example)
July 3rd, 2012 Algorithms and Ordering Heuristics for Distributed Constraint Satisfaction Problem 19
Asynchronous Backtracking (Example)
July 3rd, 2012 Algorithms and Ordering Heuristics for Distributed Constraint Satisfaction Problem 20
Asynchronous Backtracking (Example)
July 3rd, 2012 Algorithms and Ordering Heuristics for Distributed Constraint Satisfaction Problem 21
Asynchronous Backtracking (Example)
July 3rd, 2012 Algorithms and Ordering Heuristics for Distributed Constraint Satisfaction Problem 22
Asynchronous Backtracking (Example)
July 3rd, 2012 Algorithms and Ordering Heuristics for Distributed Constraint Satisfaction Problem 23
Asynchronous Backtracking (Example)
July 3rd, 2012 Algorithms and Ordering Heuristics for Distributed Constraint Satisfaction Problem 24
Asynchronous Weak Commitment
• 1. The algorithm uses the min-conflict heuristic as a value ordering heuristic.
• 2. It abandons the partial solution and restarts the search process if there exists no consistent value with the partial solution.
• When selecting a variable value, if there exist multiple values consistent with the agent view (those that satisfy all constraints with variables of higher priority agents), the agent prefers the value that minimizes the number of constraint violations with variables of lower priority agents.
25