Applying Interchangeability to Complex Local Problems in ... - CiteSeerX

0 downloads 0 Views 200KB Size Report
Many algorithms for distributed constraint problems assume each agent ... 1 Introduction. Many combinatorial problems are naturally distributed over a set of agents; for ...... In: CP, London, UK, Springer-Verlag (1995) 88–102. 14. Yokoo, M.
Applying Interchangeability to Complex Local Problems in Distributed Constraint Reasoning ? David A. Burke and Kenneth N. Brown Centre for Telecommunications Value-chain Research and Cork Constraint Computation Centre, Department of Computer Science, University College Cork, Ireland [email protected], [email protected]

Abstract. Many algorithms for distributed constraint problems assume each agent has a single variable. For problems with multiple variables per agent, one standard approach is to transform each agent’s local problem by defining a single new variable whose domain is the set of all local solutions, and reformulating the inter-agent constraints accordingly. We propose two general improvements to this method intended to (i) reduce problem size by removing interchangeable and dominated values from the new domains, and (ii) speed up search by identifying values that are interchangeable with respect to inter-agent constraints.

1

Introduction

Many combinatorial problems are naturally distributed over a set of agents; for example, coordinating activities in a sensor network [1], coordinating vehicle schedules in a transport logistics problem [2], or scheduling meetings among a number of participants [3]. Distributed Constraint Reasoning (DCR) considers constraint satisfaction and optimisation algorithms explicitly designed to handle such distributed problems, attempting to minimise communcation between agents, while finding globally acceptable solutions. Most of the algorithms, however, assume that each agent controls a single variable, in order to simplify the algorithm specification and to ensure that solutions are correct. This assumption is justified by two standard reformulations [4], by which any DCR problem with complex local problems for each agent can be transformed so that there is exactly one variable per agent: (i) Compilation: for each agent, define a new variable whose domain is the set of solutions to the original local problem; (ii) Decomposition: for each variable in each local problem, create a unique agent to manage it. ?

This work is supported by Science Foundation Ireland under Grant No. 03/CE3/I405 as part of the Centre for Telecommunications Value-Chain Research (CTVR)

However, neither of these methods scales up well as the size of the local problems increase, either (i) because of the space and time requirements of the reformulation, or (ii) because of the extra communication overhead. To address these issues, algorithms for handling multiple local variables in distributed constraint satisfaction (DisCSP) have been proposed [5][6][7][8]. These algorithms are specific to DisCSP, since they reason about violated constraints, and cannot be applied directly to distributed constraint optimisation problems (DCOP), which are concerned with costs. For DCOP, the two original reformulations remain the standard way of handling complex local problems [9], which limits the practical application of DCOP algorithms. In this paper, we re-examine the compilation reformulation. Using concepts of dominance and interchangeability [10], we introduce two modifications which can reduce search in both DisCSP and DCOP algorithms with large local problems. First, when forming compiled solutions for each agent, we represent only the variables which are directly linked to other agents, and we discard dominated or fully interchangeable solutions to the remaining sub-problems. Secondly, in the new domains, we identify sets of equivalence classes, based on the original values and on the neighbouring agents. Values in an equivalence class are interchangeable with respect to a specific agent and, through the use of examples, we show how to use the classes to prune regions of the search space and reduce inter-agent communication. In Section 2 we present an overview of DCR and the concept of interchangability. Our first contribution, an improved compilation process for complex local problems, is described in Section 3. This is followed by a description of our second contribution, using interchangeabilities during search, in Section 4. In Section 5, we give a formal description of the compilation reformulation technique and our improvements to it. Related work, and how our approach compares is discussed in Section 6 and finally we summarise our work briefly in Section 7.

2

Background

A Distributed Constraint Satisfaction Problem (DisCSP) consists of a set of agents, where each agent has a set of variables. Each variable has a corresponding domain of values. There exists a set of constraints, where each constraint acts on a subset of the variables. Two agents are neighbours if they contain variables that share a constraint. A solution to a DisCSP is an assignment to each variable of a value from its domain such that no constraints are violated. The solution process, however, is restricted: each agent is responsible for the assignment of its own variables, and thus agents must communicate with each other in order to find a global solution. A Distributed Constraint Optimisation Problem (DCOP) is an extension of DisCSP, where each constraint is a cost function, specifying a cost for each combination of values assigned to the variables in its scope. The problem also has an objective function, which is a function over the constraints (for simplicity, we will assume summation). A solution to a DCOP is an assignment

to each variable of a value from its domain; an optimal solution is one which minimises the objective function. Asynchronous Backtracking (ABT) [11] was the first algorithm developed to tackle DisCSP. ABT allows agents to act asynchronously and concurrently without any global control. Agents are statically ordered, with higher priority agents selecting values and sending them to lower priority agents. If the lower priority agent(s) can not find a consistent assignment to their own value, they can then add a nogood/constraint containing the variables/values of the conflict set. Several ABT-like algorithms have been proposed since including [12], which does not need to add constraints between agents who are not initially neighbours. In Asynchronous Weak Commitement (AWC) [13], a consistent partial solution is constructed for a subset of variables, and then extended by adding the remaining variables one by one, choosing a value that is consistent with all variables in the partial solution and with as many as possible of the variables that are not. If no such value is found, then this partial solution is abandoned and added as a new constraint to the problem. Agents are dynamically ordered, allowing lower priority agents to increase their priority in the case of a constraint violation with variables of higher priority agents. This allows bad decisions to be revised without an exhaustive search. Like ABT, the agents can act asynchronously based on their local knowledge, while guaranteeing the completeness of the algorithm. AWC has been shown to be more efficient than ABT, but requires storage of a potentially exponential number of nogoods. Another approach is the agent-centred Distributed Breakout (DB) [14] algorithm. Each agent tries to reduce the number of constraints violations that it is involved in by exchanging its current value and the possible amount of its improvement among neighbouring agents. The agent whose change will lead to the best improvement is given the right to change its value. In Asynchronous Aggregation Search (AAS) [15] an alternative approach is used where constraints are assigned to agents instead of variables. This is particularly useful when privacy is a requirement on the problem. The combination of parallel and distributed search in DisCSP has also been investigated [16]. The first DCOP algorithms appear in [17]. Synchronous Branch and Bound (SBB) simulates branch and bound in a distributed environment. Agents are prioritised into a fixed order, and a partial solution is exchanged among agents to be extended until it becomes a complete solution. If an agent cannot find a value such that the cost remains below an upper bound (current best solution), then the agent backtracks. The same paper presents Iterative Distributed Breakout (IDB), which is an extension of DB that works by running DB repeatedly for decreasing lower bounds. The goal being to find assignments such that all agents become less than the bound. However, IDB, like DB, is not a complete algorithm. In recent years, a number of new algorithms have been proposed. Asynchronous Distributed Optimisation (ADOPT) [9] is a complete algorithm that allows agents to work asynchronously. The agents are first prioritised into a tree and then it proceeds by parent agents sending values to children and child agents sending costs to parents. Each agent chooses a value that minimises the

lower bound on its constraints with parents and that of its subtrees. As the search progresses, the bounds are tightened until an optimal solution is found. Optimal Asynchronous Partial Overlay (OptAPO) [18] is an optimal algorithm based on a partial centralization technique called cooperative mediation. Agents with the most information are chosen as mediators, and portions of the DCOP are centralised with these agents who search for an optimum assignment to the variables in their control. Another complete method is the Distributed Pseudotree Optimization Procedure (DPOP) [19] algorithm. In this, agents calculate the utilities of their constraints with higher priority neighbours using a method similar to dynamic programming. The algorithm requires a linear number of messages, which means it scales up well to handle larger problems, however the size of the messages is exponential in the induced width of the pseudotree. Finally, Asynchronous Forward Bounding (AFB) [20] is a promising new algorithm where agents assign their variables and generate a partial solution sequentially, and propagate the partial solutions asynchronously. This enables asynchronous updating of bounds on their cost, and early detection of a need to backtrack. The concept of interchangeability was first introduced by Freuder [10]. Interchangeability can be used to reduce the computational complexity of constraint satisfaction problems and also provide a mechanism to speed up the search when solving problems. This is achieved by identifying certain values that are equivalent for certain variables. Interchangeability can exist at various different levels and we consider two of these: Full interchangeability: Two values x and y for a variable V are fully interchangeable (FI), if and only if every solution where x is assigned to V still remains a solution if y is assigned to V. Neighbourhood interchangeability: Two values x and y for a variable V are neighbourhood interchangeable (NI), if and only if for every constraint C on V, x and y both satisfy C for identical sets of assignments to the other variables in C. These interchangeabilities are expressed in terms of constraint satisfaction, but they are easily extended to optimisation. If two values produce the same evaluation/cost for a constraint, they can be treated as if they satisfy the constraint in the above definitions. Interchangeability techniques have mainly been investigated in the context of centralised CSPs, however, they have also been used in the Distributed Breakout algorithm by Petcu and Faltings [21]. Here, they consider how agents can make use of interchangeable values when trying to repair constraint violations by avoiding spreading the conflict to other agents not involved in the conflict set.

3 3.1

Improving the compilation of complex local problems Basic compilation

To demonstrate our approach, consider a graph colouring problem where each variable can take the value 0, 1 or 2 and connected variables are constrained to

Fig. 1. An agent in a DCR problem with multiple local variables, three of which are external (have constraints with other agents).

be different. We look at the problem from one agents’ point of view. This agent, I, is shown in figure 1. It contains 6 local variables, three of which, a, b and c, are external (have constraints with other agents). We will examine this problem from both DisCSP and DCOP scenarios. In the DCOP scenario, the goal is to minimise constraint violations. To find a solution using the compilation method, we take following steps: 1. Find all solutions to each agent’s internal problem – each solution corresponds to one value in the domain of a new single-variable agent. 2. Add a unary constraint at each agent, the cost of which is the corresponding local cost for each new value (DCOP only). 3. Construct new constraints between the agents new variables, that are evaluated by referring back to the original variables in the problem. 4. Solve the distributed problem using a chosen DCR algorithm. If we treat our example as part of a DisCSP, agent I’s local problem has 18 solutions (Table 1), so using the basic compilation, agent I will be converted to having a single variable with a domain of size 18. If we treat it as part of a DCOP, every set of assignments of values to variables is a valid solution. Therefore there are 36 solutions for the agent, producing a single variable with a domain of size 729. 3.2

Improved compilation

First, we note that some of the reformulated values are essentially equivalent for all the other agents in the distributed problem. In the original local problem, the external variables are the only ones that had any direct impact on the other agents. Therefore, any set of local solutions that have identical assignments to

Table 1. All solutions for local CSP problem of agent I (18 solutions). This includes the new value in the reformulated domain and the corresponding original assignment of values to variables. New value 0 1 2 3 4 5

a 0 0 0 0 0 0

b 0 0 1 1 2 2

c 0 0 0 2 0 1

d 2 1 2 0 1 0

e 1 2 1 1 2 2

f New value 2 6 1 7 2 8 2 9 1 10 1 11

a 1 1 1 1 1 1

b 0 0 1 1 2 2

c 1 2 1 1 0 1

d 2 1 0 2 1 0

e 0 0 2 0 2 2

f New value 2 12 2 13 0 14 2 15 0 16 0 17

a 2 2 2 2 2 2

b 0 0 1 1 2 2

c 1 2 0 2 2 2

d 2 1 2 0 0 1

e 0 0 1 1 1 0

f 1 1 0 0 0 1

the external variables are equivalent with respect to the distributed problem. For example, considering Table 1, value 0 is equivalent to value 1 with respect to the distributed problem as both have identical assignments to the external variables a, b and c. Thus in the reformulated problem, Values 0 and 1 of our new domain are fully interchangeable. Similarly, value 8 is interchangeable with value 9 and value 16 is interchangeable with value 17. We can reduce the size of the domain by refining the reformulation, so that we only find at most one local solution for each combination of the external variables. This will reduce the time needed to find solutions of the local problem and, since we have smaller domains, should reduce the time needed for the distributed search. Table 2 contains the new domain/set of local solutions for our agent. In DCOP, we can reduce the number of internal solutions required in a similar fashion. Since the global solution will require a certain assignment to the external variables, then we only need to calculate the internal optimal solution for each combination of value assignments to these, reducing our domain size to from 36 to 33 . In cases where there is more than one optimal solution with the same combination of external variables (such as solution 0 and 1 in Table 1), the solutions are fully interchangeable, and so only one is required. Also, solutions with identical assignments to the external variables but with sub-optimally assigned internal variables are strictly dominated and can be ignored. In our example, Table 3 contains the new domain for our DCOP problem, with each solution shown being the optimal for a specific combination of external variables. This extends Table 2 to include solutions that include broken constraints but are still optimal for certain combinations of external variable, as these may be of use when optimising the distributed problem. Constraints between the agents’ new variables are created in exactly the same way as with the basic compilation, and though they will apply to the same sets of variables, they will be simpler due to the smaller domain sizes. Compilation is essentially a preprocessing step before a distributed algorithm is applied to the global problem. As such, our improved compilation can be considered to be a general update to the compilation reformulation and does not impact the distributed algorithms themselves.

Table 2. Reduced domain for DisCSP, with at most one solution for each combination of external variables (15 solutions, reduced from 18). New value 0 2 3 4 5

a 0 0 0 0 0

b 0 1 1 2 2

c 0 0 2 0 1

d 2 2 0 1 0

e 1 1 1 2 2

f New value 2 6 2 7 2 8 1 10 1 11

a 1 1 1 1 1

b 0 0 1 2 2

c 1 2 1 0 1

d 2 1 0 1 0

e 0 0 2 2 2

f New value 2 12 2 13 0 14 0 15 0 16

a 2 2 2 2 2

b 0 0 1 1 2

c 1 2 0 2 2

d 2 1 2 0 0

e 0 0 1 1 1

f 1 1 0 0 0

Table 3. Reduced domain for DCOP, with one solution for each combination of external variables (27 solutions, reduced from 729 - Note that the numbering of solutions is kept consistent with the previous tables resulting in values from 0–29). New value 0 2 3 4 5 18 19 20 21

4

a 0 0 0 0 0 0 0 0 0

b 0 1 1 2 2 0 0 1 2

c 0 0 2 0 1 1 2 1 2

d 2 2 0 1 0 2 1 0 0

e 1 1 1 2 2 2 1 2 1

f Cost New value 2 0 6 2 0 7 2 0 8 1 0 10 1 0 11 1 1 22 2 1 23 2 1 24 1 1 25

a 1 1 1 1 1 1 1 1 1

b 0 0 1 2 2 0 1 1 2

c 1 2 1 0 1 0 0 2 2

d 2 1 0 1 0 1 2 0 1

e 0 0 2 2 2 2 2 0 0

f Cost New value 2 0 12 2 0 13 0 0 14 0 0 15 0 0 16 2 1 26 0 1 27 2 1 28 0 1 29

a 2 2 2 2 2 2 2 2 2

b 0 0 1 1 2 0 1 2 2

c 1 2 0 2 2 0 1 0 1

d 2 1 2 0 0 2 2 1 0

e 0 0 1 1 1 1 0 1 0

f Cost 1 0 1 0 0 0 0 0 0 0 1 1 0 1 0 1 1 1

Using Interchangeability in distributed search

4.1

Sub-neighbourhood interchangeability

Next, we consider the distributed search process itself and a second use for interchangeability, introducing a new type which we call sub-neighbourhood interchangeability. This is a restricted form of NI, where only a subset of neighbours are considered1 . Sub-neighbourhood interchangeability: Two values x and y for a variable V are sub-neighbourhood interchangeable (SNI), if and only if for every constraint C between V and a subset of the neighbours of V, x and y both satisfy C for identical sets of assignments to the other variables in C. Consider variable c which is an external variable linked to agent C. In our DisCSP solution set (Table 2), the original variables may have their values duplicated a number of times. For example, we can see that variable c is assigned the value 0 in five of the solutions {0,2,4,10,14}, 1 in five of the solutions {5,6,8,11,12} 1

This should not be confused with partial interchangeability or neighbourhood partial interchangeability [22], which allow different assignments to other variables.

and 2 in five of the solutions {3,7,13,15,16}. Therefore, with respect to the constraint that our agent has with agent C, the new values 0,2,4,10 and 14 are equivalent. This is an example of sub-neighbourhood interchangeability as the values are interchangeable with respect to a subset of our agent’s constraints. A similar partition of values can be created with respect to the constraints with agents A and B. However, in the case of agents A and B, we should also note that their is also a constraint between these two agents2 . Therefore, it is more appropriate to calculate an SNI set with respect to both agents (as the assignment to variable a indirectly affects the assignment to variable b). We do this by finding solutions that have identical assignments to both a and b. E.g. the new values 2 and 3 both correspond to assignments of a = 0, b = 1. This allows us to create the SNI sets {2,3}, {4,5}, {6,7}, {10,11}, {12,13} and {14,15}. In DCOP, we have a similar situation. In Table 3, the new values {0,2,4,10,14} are SNI with respect to agent C, since all have an equivalent assignment to variable c and have a local cost of 0. However, there also may be cases where values are equivalent with respect to a constraint with another agent, but the local cost could be different. For example, values {22,23,26,28} also represent an assignment of c = 0, but the local cost for the agent is 1. These values form an SNI set with each other, but are also equivalent to the values {0,2,4,10,14} with respect to the inter-agent constraint with agent C. We can consider this to be a slightly weaker form of SNI. Our first improvement, applied to the compilation process before a distributed search algorithm is used. Now, for our second improvement, we have identified interchangeabilities that can be incorporated into the distributed search algorithms. DCR algorithms can make use of SNI sets by only considering a single value per partition when dealing with particular agents, or by interpereting information about one value in a partition as being representative of each of the other interchangeable values, thus speeding up search and reducing communication. In the following subsections, we suggest how this may be applied in two particular algorithms: ABT and ADOPT. 4.2

Application to ABT

In Asynchronous Backtracking (ABT) [11], agents can act asynchronously and concurrently. The algorithm first prioritises the agents. Then higher priority agents send ok? messages, containing a proposed assignment to their variable, to lower priority agents. When an agent receives an ok? message it adds this value to its current agent view, which is its belief of what values are assigned to the other agents’ variables. It then searches for a value in its domain that is consistent with this agent view. If it finds a consistent value, then it sends this value in an ok? message to lower priority agents. If it can find no consistent value, then it sends a nogood message specifying the assignment(s) that are causing the conflict to the lowest priority agent involved in the conflict (other than itself). 2

Whether this information is available to agent I depends on the algorithm being used. E.g. many algorithms structure agents into a tree and if two neighbours are in the same subtree, then their assignments will directly or indirectly affect each other.

Let us consider how ABT might work on our earlier example, which has been reformulated as in Table 2. Let us assume that agent I is the highest priority agent, and it maintains SNI sets with respect to the lower priority neighbours that it has. Agent I chooses the value 0 and sends this in an ok? message to the other agents. Let us say that agent C can not find a value consistent with this, and so sends a nogood, that contains I = 0. Agent I now knows that it has a conflict with agent C for the value 0. It also knows that the values in the SNI set {0,2,4,10,14} are fully interchangeable with respect to agent C. Therefore it can deduce that all of these will cause a conflict, and so add a nogood for each. The number of values that need to be evaluated and the number of messages that have to be sent to solve the problem is now reduced. 4.3

Application to ADOPT

Fig. 2. Problem reformulation in ADOPT, with agents prioritised into a tree

The Asynchronous Distributed Optimisation (ADOPT) [9] algorithm is a state of the art algorithm for solving DCOP problems. Returning to our example from Figure 1, let us assume that each of the agents have been reformulated to consist of a single variable as discussed. In ADOPT, the agents are first prioritised into a tree as in Figure 2. During the search, each agent repeatedly and asynchronously performs the following tasks3 : 1. receive incoming values from higher priority agents and costs from children; 2. add received values to its CurrentContext, which is a record of higher priority neighbours’ current variable assignments; 3. update costs of subtrees to include costs received from children (for each possible value assignment the agent maintains separate costs for each direct child/subtree); 3

We describe only the parts of ADOPT that are relevant for our example. For a complete description of the algorithm the reader is referred to [9].

4. calculate the cost of each of its possible values, summing the cost of subtrees and constraint costs of agents with higher priority (i.e. calculate the cost of the subtree rooted at this particular agent); 5. choose the value that minimises the lower bound on the costs; 6. send this value to all neighbours of lower priority; 7. send the minimum lower and minimum upper bounds of the costs calculated in (4) to parent agent including the context to which they apply. As the search progresses, the bounds are tightened in each agent until the lower bound of the minimum cost solution is equal to its upper bound. If an agent detects this condition, and its parent has terminated, then an optimal solution is found and it may terminate also (sending a termination message to children). We can use SNI sets in ADOPT to infer the costs associated with particular values. In the example given in Figure 2, agent I has two subtrees. We first consider the right-hand subtree. Agent I has only one child in the subtree, therefore the equivalences can be calculated by only considering the original variables (in this case c) that are linked to that child. From Table 3, we can see that agent I has a domain of 27 values. Initially, it will not know the costs in the subtrees associated with each of these values and so the lower bound for each value/subtree tuple will be set to 0. Now we consider a possible sequence of decisions that might be made by agent I. As all lower bounds are initially zero, the agent randomly chooses the value 0 and sends this value to agent C. Subsequently, agent A sends a cost to agent I considering this variable assignment. Agent I then updates its costs for subtree = A, I = 0. At this point, the standard implementation of ADOPT would then try to select a new value. It is likely that the costs received for I = 0 would mean it no longer has the lowest lower bound and so agent I will now choose another value, e.g. 1, send this to C, and receive the associated costs. It is possible that this is repeated for all 27 values in the domain4 . However, using SNI sets, when we receive the costs assocated with subtree = A, I = 0, we can also automatically update the costs associated with I = 2, 4, 10, 14, 22, 23, 26 and 28, as these values are equivalent with respect to agent C. Agent I will then not have to test each of these values individually in order to discover their costs for that subtree. Choosing one value from each SNI set will be enough to discover all associated costs. In the left-hand subtree agent I is linked to agents A and B. To apply equivalences to this subtree, agent I must consider the original variables a and b as both of these have links in this subtree and so affect the costs that are received. This results in several smaller equivalences sets being calculated as discussed in Section 3 and these can be used in the same way to update several costs at once reducing the number of value choices that have to be made, the number of messages that have to be communicated and ultimately the number of search paths that have to be explored. 4

In practice costs for the other subtree will also be affecting value selection so an exact sequence of value selections is unpredictiable.

5

Formalisation

We now present a formal description of our methods, and discuss the expected savings. We begin with definitions for a distributed constraint problem. There exists a set of agents A = {a1 , a2 , . . . , an }. ∀i Xi = {xi1 , xi2 , . . . , ximi } is the set of variables controlled by ai , such that S ∀i 6= j Xi ∩ Xj = φ. Each variable xij has a corresponding domain Dij . X = Xi is the set of all variables in the problem, and D is the set of all domains. C = {c1 , c2 , . . . , ct } is the set of constraints. Each constraint ck has a scope s(ck ) ⊆ X, and is a function Q ck : ij:xij∈s(ck ) Dij → IN . For DisCSP, each constraint maps its tuples to {0, 1}, where 1 indicates a constraint violation. A global assignment, g, is the selection Q of one value for each variable in the Q problem: g ∈ ij Dij . A local assignment, li , to an agent ai , is an element of j Dij . Let t be any assignment, and let Y be a set of variables, then t↓Y is the projection of t over the variables in Y (i.e. t without the values Q that correspondedPto variables not in Y ). The global objective function F : ij Dij → IN :: g 7→ k ck (g↓s(ck ) ) assigns a cost to each global assignment. Using the basic compilation method, forQ each agent ai , create a new variable Zi , whose domain, Di , is a subset of j Dij . For DisCSP, l ∈ Di ↔ ∀j(s(cj ) ⊆ Xi → cj (l↓s(cj ) ) = 0). That is, Di contains a value corresponding to each local assignment that satisfies every constraint that acts on ai only. For Q DCOP, D = D , and there is a function fi such that for each l ∈ Di , ij j Pi fi (l) = c (l j:s(cj )⊆Xi j ↓s(cj ) ). That is, Di contains a value for each local assignment, and its cost is the sum of the costs from all constraints which act on ai only. An assignment to the reformulated problem, t, is the selection of one domain value for each new variable (which has a corresponding assignment over the original variables). For each constraint c, let a(c) be the agent scope of c, or the set of agents that c acts upon: a(c) = {ai : Xi ∩ s(c) 6= φ}. For each set of agents Aj = {aj1 , aj2 , ..., ajpj }, let Sj = {c : a(c) = Aj } be the set of constraints whose agent scope is Aj . For P each Sj 6= φ, define a new constraint Cj : Dj1 × Dj2 × . . . × Djpj → IN :: t 7→ c∈Sj c(t↓s(c) ), equal to the sum of the constraints in SQj . Note that for each agent, ai , the size of its reformulated domain is |Di | = j |Dij |. The total solution space for the reformulated problem Qn is i=1 |Di |, and assuming that all n agents have the same number of variables m, with the same domain sizes d, then this becomes dnm . In our improved compilation, we modify the standard method to reduce the domain sizes. For each agent ai , let pi = {xij : ∀c xij ∈ s(c) → s(c) ⊆ Xi } be its private variables – the subset of its variables which are not directly constrained by other agents’ variables; define ei = Xi \pi to be the external variables – the variables that do have direct constraints with other agents. For Q each agent ai , create a new variable Zi0 , whose domain, Di0 , is a subset of j:xij ∈ei Dij . For DisCSP, l ∈ Di0 ↔ ∃t ∈Di t↓ei = l. That is, Di0 contains exactly those assignments to the external variables that can be extended to a local solution for the agent. Q For DCOP, Di0 = j:xij ∈ei Dij , and there is a function fi0 such that for each l ∈ Di0 , fi0 (l) =min{fi (t) : t ∈ Di , t↓ei = l}. That is, Di0 contains all assignments

to the external variables, and their cost is the minimun cost obtained when they are extended to a full local assignment for ai . Note that using our improved compilation method: Q – |Di | = j:xij ∈ei |Dij |, which is a reduction over the basic compilation by Q a factor of j:xij ∈pi |Dij |; – assuming n agents, each with p private variables with domain size d, the total solution space is now dn(m−p) , which is a reduction by a factor of dnp over the basic compilation. Once we have our reformulation, we can then identify equivalence sets. For each agent ai , let hki = {xij : ∀c xij ∈ a(c) → a(c) = (ai ∪ Ak )} be the set of variables of agent ai that are adjacent to variables of the agents in the set Ak . Two values, ta , tb ∈ Di0 are sub-neighbourhood interchangeable with respect to the agents with respect to the agents in Ak (ta ≡Ak tb ), if both values represent identical assignments to the variables of hki : ta ≡Ak tb ↔ ta↓hki = tb↓hki . This is clearly an equivalence relation since ‘ =0 is an equivalence relation. The use of equivalence sets will depend on the algorithm but we can state some general properties. Let Bi = {bi1 , bi2 , ...biqi } be the set of neighbours of agent ai . These are partitioned into equivalence set collections, ϕi,s , such that interconnected neighbours are grouped together: bij , bik ∈ ϕi,s → ∃c : bij , bik ∈ a(c). This is at most |Bi | collections per agent. In each collection, each domain value from Di0 will fall in exactly one equivalence set, so |ϕi,s | = |Di0 |.

6

Related Work

Apart from the compilation and decomposition methods of extending DCR algorithms for complex problems, a number of other attempts at extending algorithms to handle multiple variables have been proposed. Armstrong and Durfee [5] developed an algorithm based on ABT and AWC that uses dynamic priorities. Each agent tries to find a local solution that is also consistent with the solutions of higher priority agents. Priorities are adjusted using a variety of heuristics when solutions can not be found. This is a similar to technique to compilation, but search for local solutions is done as needed instead of finding all solutions at the beginning. Yokoo and Hirayama [6] proposed a modified version of AWC to handle multiple local variables. In this algorithm, Multi-AWC, each variable is assigned a priority (as opposed to each agent) and when a consistent value can not be found for a variable, its priority is increased. This is similar to the decomposition method in that assigning values to internal variables is part of the distributed algorithm, but has been shown to be more efficient than the extension of AWC using decomposition. The Distributed Breakout algorithm is extended to handle multiple local variables for SAT problems in [7]. By using restarts, and allowing agents to simultaneously flip variables that are mutually exclusive, Multi-DB is shown to outperform Multi-AWC on 3-SAT problems. Like Armstrong and Durfee, the

local search process is seperate from the distributed algorithm and is done only as needed. Recently, Maestre and Bessiere [8] presented improvements for handling complex local problems in ABT-like algorithms. Nogood learning is improved by minimising the size of nogoods and employing heuristics to intelligently choose what nogoods to store. They also improve agent cooperation by trying to improve solution stability, as keeping solutions as close as possible to the previous one reduces the changes that have to be propagated. Communication is also reduced by trying to preserve the values of variables that are constrained with lower priority agents, as these are the only changes that need to be propagated. This work also assumes a black-box centralised solver for performing the local search. It may often be both desirable and natural for agents that have complex local problems to model these problems using centralised Constraint Programming (CP) [23]. This will allow the local solving process to benefit from many specialised techniques such as global constraints [24] and symmetry breaking [25]. The compilation method, as well as a number of the above algorithms use a centralised solver in this way to perform the local search. The algorithms above work with the agents’ variables in their original form. This differs from the compilation approach where the distributed search is done using the reformulated single variables. As such, the work we present, and how interchangeabilities are used, is not applicable to these algorithms. Instead, our work constitutes an improvement to the compilation method, which is an alternative approach to handling complex local problems. Each of the algorithms described above are extenstions to specific singlevariable algorithms, although some of the concepts may be transferable. On the other-hand, the interchangeabilities that we introduce to the compilation reformulation should be applicable to most algorithms. Furthermore, each of the algorithms above are specific to DisCSP or SAT and cannot trivially be extended to DCOP. Optimisation algorithms use different protocols, nogoods don’t exist, and dynamically reprioritising of agents is not practical as optimisation algorithms keep track of costs and bounds that are normally based on a static structure. As optimisation algorithms are normally dealing with over-constrained problems, this means that they also generally need to explore more of the search space, and investigate more assignments of values to variables. The compilation method is therefore quite applicable to DCOP problems and our improvements should allow more complex problems to be handled using this reformulation. The compilation method also has an additional advantage in that it improves security by masking the original problem values. The constraint functions between agents need to know how to map the new domain values to the original domain values but any agent that is not party to the constraint need not know this mapping. For example, in ADOPT, agents receive values from indirect parents and include this in the context that they send to their direct parent, resulting in information being revealed to agents that the indirect parent may not be neighbours with. Since new domains are created in the compilation reformula-

tion, then original information becomes encrypted and so can be passed between agents in a safer manner.

7

Conclusion

This paper addressed the issue of extending DCR algorithms to handle agents with complex local problems. We propose two advances to a basic compilation technique that converts multiple local variables to a single variable whose domain is the set of all local solutions. The two techniques improve on this reformulation by (i) finding at most one local solution for each combination of external variables instead of all solutions, thus removing solutions that are either fully interchangeable or strictly dominated, and (ii) identifying values in the the new formulation of the problem which are interchangeable with respect to a subset of neighbours (sub-neighbourhood interchangeability). We propose potential applications for these interchangeabilities to existing algorithms (ABT and ADOPT), and argue that they are particularly relevant for DCOP algorithms. Future work will focus on implementing and evaluating these proposals.

References 1. B´ejar, R., Domshlak, C., Fern` andez, C., Gomes, C.P., Krishnamachari, B., Selman, B., Valls, M.: Sensor networks and distributed csp: communication, computation and complexity. Artif. Intell. 161(1-2) (2005) 117–147 2. Calisti, M., Neagu, N.: Constraint satisfaction techniques and software agents. In: Agents and Constraints Workshop at AIIA’04. (2004) 3. Wallace, R.J., Freuder, E.C.: Constraint-based multi-agent meeting scheduling: Effects of agent heterogeneity on performance and privacy loss. In: AAMAS’02 Workshop on Distributed Constraint Reasoning. (2002) 176–182 4. Yokoo, M., Hirayama, K.: Algorithms for distributed constraint satisfaction: A review. Autonomous Agents and Multi-Agent Systems 3(2) (2000) 185–207 5. Armstrong, A.A., Durfee, E.H.: Dynamic prioritization of complex agents in distributed constraint satisfaction problems. In: IJCAI. (1997) 620–625 6. Yokoo, M., Hirayama, K.: Distributed constraint satisfaction algorithm for complex local problems. In: ICMAS, Washington, DC, USA, IEEE Computer Society (1998) 372 7. Hirayama, K., Yokoo, M.: Local search for distributed sat with complex local problems. In: AAMAS, New York, NY, USA, ACM Press (2002) 1199–1206 8. Maestre, A., Bessi`ere, C.: Improving asynchronous backtracking for dealing with complex local problems. In: ECAI. (2004) 206–210 9. Modi, P.J., Shen, W.M., Tambe, M., Yokoo, M.: Adopt: Asynchronous distributed constraint optimization with quality guarantees. Artificial Intelligence 16(1–2) (2005) 149–180 10. Freuder, E.C.: Eliminating interchangeable values in constraint satisfaction problems. In: AAAI. (1991) 227–233 11. Yokoo, M., Durfee, E.H., Ishida, T., Kuwabara, K.: Distributed constraint satisfaction for formalizing distributed problem solving. 12th IEEE International Conference on Distributed Computing Systems ’92 (1992) 614–621

12. Bessi`ere, C., Maestre, A., Brito, I., Meseguer, P.: Asynchronous backtracking without adding links: a new member in the ABT family. Artificial Intelligence 161 (2005) 7–24 13. Yokoo, M.: Asynchronous weak-commitment search for solving distributed constraint satisfaction problems. In: CP, London, UK, Springer-Verlag (1995) 88–102 14. Yokoo, M., Hirayama, K.: Distributed breakout algorithm for solving distributed constraint satisfaction problems. In: ICMAS. (1996) 401–408 15. Silaghi, M.C., Sam-Haroud, D., Faltings, B.: Asynchronous search with aggregations. In: AAAI and IAAI, AAAI Press / The MIT Press (2000) 917–922 16. Hamadi, Y.: Interleaved backtracking in distributed constraint networks. International Journal on Artificial Intelligence Tools 11(2) (2002) 167–188 17. Hirayama, K., Yokoo, M.: Distributed partial constraint satisfaction problem. In: CP. (1997) 222–236 18. Mailler, R., Lesser, V.: Solving Distributed Constraint Optimization Problems Using Cooperative Mediation. In: AAMAS, IEEE Computer Society (2004) 438– 445 19. Petcu, A., Faltings, B.: A scalable method for multiagent constraint optimization. In: IJCAI. (2005) 266–271 20. Meisels, A.G.A., Zivan, R.: Asynchronous forward-bounding for distributed constraints optimization. In: Proc. 1st Intern. Workshop on Distributed and Speculative Constraint Processing. (2005) 21. Petcu, A., Faltings, B.: Applying interchangeability techniques to the distributed breakout algorithm (2003) 22. Choueiry, B.Y., Noubir, G.: On the computation of local interchangeability in discrete constraint satisfaction problems. In: AAAI/IAAI. (1998) 326–333 23. Dechter, R.: Constraint Processing. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA (2003) 24. Regin, J.C.: Global Constraints and Filtering Algorithms. In: Constraints and Integer Programming Combined. Kluwer (2003) 25. Cohen, D., Jeavons, P., Jefferson, C., Petrie, K.E., Smith, B.M.: Symmetry definitions for constraint satisfaction problems. In: CP. (2005) 17–31