• No results found

4.2 Distributed Constraint Satisfaction with One Variable per Agent

4.2.2 Distributed Backtracking

Distributed Backtracking algorithms can be divided into synchronous algorithms and asynchronous algorithms. In synchronous algorithms, agents perform actions in a pre- defined order whilst agents act concurrently with other agents in asynchronous algorithms. Whilst one may assume that the concurrent behaviour of asynchronous algorithms means that asynchronous algorithms will always be beneficial over synchronous algorithms, Brito and Meseguer [12] have shown this not always to be the case. Many backtracking algo- rithms use nogoods which record values for variables which have been attempted and do not lead a solution.

Synchronous Backtracking (SBT) [94] is the simplest distributed algorithm and is based on the Naive Backtracking algorithm [87]. Ordered agents sequentially instantiate their variable and send a message with a consistent partial assignment (CP A) con- taining all values assigned so far to the next agent. Agents send a backtracking message to the previous agent if no consistent value exists. A solution is found when every agent has a consistent instantiated variable.

Synchronous Backtracking has been improved by Zivan and Meisels [102] to SynCBJ which is a distributed version of conflict-directed backjumping [74] combined with dynamic backtracking [34]. SynCBJ [102] is a synchronous systematic search algorithm where each agent keeps track of the reasons why values have been eliminated from their variable’s domain. When a backtrack step is required, the agent is able to determine the variable re- sponsible for the conflict and backjumps to the agent holding that variable. This increases the performance of the algorithm very substantially when compared to SBT [102] whilst it has also been shown to outperform asynchronous algorithms on some problems [12]. We have implemented a distributed version of backjumping (see Appendix A.4) and found

4.2. Distributed Constraint Satisfaction with One Variable per Agent 30 that SynCBJ significantly outperforms this backjumping algorithm. A revised version of SynCBJ entitled Multi-CBJ [81] speeds up the search by running multiple SynCBJ search processes with different orderings on different processors.

Yokoo et al. developed Asynchronous Backtracking (ABT) [94, 97] to allow agents to search in parallel for a solution. Each agent has a priority (or place) in the ordering. This is often lexicographic by agent id, but other heuristics such as maximum degree or minimum domain can be used. Statically ordered agents (later approaches use dynamic ordering) send values to lower priority agents which evaluate shared constraints. Asyn- chronously, each agent assigns a consistent value to its variable, sending OK messages to agents sharing constraints (connected agents) to determine if violated constraints ex- ist. Each agent’s view of the problem is updated with the new value of that agent and constraints are checked. If constraints are violated, and the agent cannot change to a con- sistent value, the agent sends a nogood message to the lowest priority agent with a higher priority than itself. This agent checks the nogood for validity (message delay and parallel execution may affect this) prior to changing its value. If an agent receives a nogood with an unconnected agent, a link is added between the two agents. This process is repeated until all agents have consistent assignments or all values of the highest priority agent lead to failure.

A simple Distributed Constraint Satisfaction problem is shown in figure 4.1 with three agents W EB, OOP and DAT ABASES each representing a single variable with the same name as its agent. We assume for the sample execution of ABT that agent W EB has the highest priority, followed by OOP with DAT ABASES having the lowest priority. W EB and OOP send OK messages to DAT ABASES with their chosen val- ues (e.g. 11am and 10am respectively). At this point, DAT ABASES knows that the value of W EB is 11am and OOP is 10am. These values are stored in the agent view of DAT ABASES. DAT ABASES cannot assign a value consistent with this agent view and so sends a nogood {(W EB,11am)(OOP ,10am)} to the lowest priority agent higher than itself (i.e. OOP ). Since this nogood, contains a variable (W EB) which OOP has no constraints with, a link is added between W EB and OOP . The value of W EB as

11am is now stored in the OOP agent’s view. OOP would now send an OK message to DAT ABASES with its other value of 12noon but DAT ABASES generates an ad- ditional nogood {(W EB,11am)(OOP ,12noon)} to OOP . OOP now has no consistent values and so sends a nogood to W EB {(W EB,11am)}. W EB now changes its value to 1pm and sends an OK message to DAT ABASES and OOP . DAT ABASES can now assign a consistent value to its variable (10am) and a solution is found to the problem {(W EB,1pm)(OOP ,12noon)(DAT ABASES,10am)}.

Figure 4.1: A simple Distributed Constraint Satisfaction Problem

ABT has been extended by various authors. Yokoo proposed Asynchronous Weak- Commitment Search (AWCS) [93, 97], a new algorithm with dynamic ordering where backtracking agents become the highest priority agent within their neighbourhood. For example in the simple problem, DAT ABASES would be promoted to the highest priority agent when it composes a nogood to backtrack to OOP . This algorithm requires expo- nential space complexity to store all nogoods generated for completeness2. Some authors classify AWCS as a local search algorithm.

Bessi`ere et al. [10] removed the need for new links between unconnected agents in

2

This algorithm is a descendant of Weak-Commitment Search (see section 3.8), but is no longer a hybrid approach in this distributed version.

4.2. Distributed Constraint Satisfaction with One Variable per Agent 32 ABT. Fernandez et al. [28] proposed to negate the message delay effect through a random restart procedure.

Meisels and Zivan explored integrating forward-checking constraint propagation with sequential variable assignment [57], parallel exploration through the ConcDB algorithm [103] and message delay effects on ABT and AWCS [101].

Silaghi’s extensions include aggregations where constraints are sent between agents rather than variable values [83], combining ABT and AWCS to reduce AWCS’s space complexity [85] and asynchronous consistency [84].

Brito and Meseguer [12] create ABT-Hyb, introducing synchronised steps for part of ABT to reduce the number of messages between agents.

Nguyen et al. [64] developed Dynamic Distributed Backjumping with synchronous forward assignment of variables phase and asynchronous backjumping phase when assign- ments fail.

Sycara et al. developed a heuristic-based search for scheduling problems which is also called Asynchronous Backtracking search [86].

Concurrently with Yokoo’s ABT and AWCS, Hamadi has developed IDIBT/CBJ- DkC [40] using parallel exploration of search trees, constraint propagation and conflict- directed backjumping.

Harvey et al. [44] developed Support-Based Distributed Search using argumen- tation techniques and message ordering rather than variable ordering. The approach is complete through nogood construction.

Distributed Backtracking with Sessions [61] is a recent approach which aims to minimise message processing time as opposed to the number of messages actually sent. The algorithm uses the notion of sessions to only process those messages which contain the same session number. Sessions are closed whenever an agent is able to assign a value to its variable. Backtracks are only processed if the session number between the agents is identical. This reduces processing effort of obsolete messages.

The distributed backtracking approaches have identical disadvantages as centralised backtracking techniques (see section 3.4). Specifically, they incur a high number of non-

concurrent constraint checks. In addition, for distributed problems, they incur a high cost of sending messages.