Concurrent Backtrack Search on DisCSPs

A distributed search algorithm for solving distributed constraint satisfaction problems (DisCSPs) is presented. The proposed algorithm is composed of multiple search processes (SPs) that operate concurrently. Concurrent search processes scan nonintersecting parts of the search space. Each SP is represented by a unique data structure, containing a current partial assignment (CPA), that is circulated among the different agents. The splitting of the search space, leading to several concurrent SPs is achieved by splitting the domain of one or more variables. The proposed algorithm generates concurrent search processes dynamically, starting with the initializing agent, but occurring also at any number of agents during search. The Concurrent BackTracking (ConcBT) algorithm is presented and an outline of the correctness proof is given. Experimental evaluation of the algorithm, on randomly generated DisCSPs, is presented. ConcBT outperforms asynchronous backtracking (ABT) (Yokoo2000) on random DisCSPs with different patterns of message delays. Load balancing for ConcBT is achieved by adding concurrent search trees dynamically, performing re-splitting of the search space by the use of a simple heuristic. Introduction Distributed constraint satisfaction problems (DisCSPs) are composed of agents, each holding its local constraints network, that are connected by constraints among variables of different agents. Agents assign values to variables, attempting to generate a locally consistent assignment that is also consistent with all constraints between agents (cf.(Yokoo2000; Solotorevsky et. al. 1996)). To achieve this goal, agents check the value assignments to their variables for local consistency and exchange messages with other agents, to check consistency of their proposed assignments against constraints with variables owned by different agents. Following common practice, it is assumed that an agent can send messages to any one of the other agents (Yokoo2000; Meseguer and Jimenez2000; Bessiere et. al. 2001). Copyright c © 2004, American Association for Artificial Intelligence (www.aaai.org). All rights reserved. Several asynchronous search algorithms for DisCSPs have been proposed in the last decade (Yokoo2000; Bessiere et. al. 2001). The common feature of all asynchronous search algorithms is that agents process their assignments asynchronously, even if their local assignments are not consistent with other agents’ assignments. In order to make asynchronous backtracking correct and complete the algorithm usually keeps data structures for nogoods (cf. (Bessiere et. al. 2001)). The present paper proposes a search algorithm on DisCSPs that is composed of several concurrent search processes, each of which is a synchronous backtrack procedure. The proposed algorithm uses a form of message in which agents send and receive a consistent partial assignment of multiple agents. When such a message includes a complete assignment, to all variables of all agents, the search stops and the solution is reported. Agents that initialize a search process generate a data structure that we term current partial assignment CPA. The initializing agent records on the CPA its consistent assignment and sends it to another agent. Each receiving agent adds its consistent assignment if it exists to the CPA. Otherwise, it backtracks by sending the same CPA to a former agent. The concurrency of the concurrent backtrack (ConcBT) algorithm is achieved by the circulation of multiple CPAs. Each CPA represents one search process (SP ) and each search process scans a different part of the global search space. The search space is split dynamically at different points on the path of the search process by agents generating additional CPAs. This changes dynamically the degree of concurrency during search and enables automatic load balancing. The splitting and re-splitting of the search space is performed independently by agents and is thus a distributed process. The concurrent backtrack (ConcBT) algorithm is described in the following section. A correctness and completeness proof for ConcBT is outlined next. Then we present experimental evaluations, in which the ConcBT algorithm, out performs asynchronous backtracking (ABT), on randomly generated DisCSPs in systems with different patterns of message delays. The last section summarize our conclusions. Concurrent Backtrack ConcBT The ConcBT algorithm performs concurrent backtrack searches on disjoint parts of the DisCSP search-space. Each agent holds the data relevant to its state on each sub-search-space in a separate data structure which we term Search Process (SP). Agents in the ConcBT algorithm pass their assignments to other agents on a CPA (Current Partial Assignment) data structure. Each CPA represents one search process, and holds the agents current assignments in the corresponding search process. An agent that receives a CPA tries to assign its local variables with values that are not conflicting with the assignments on the CPA, using only the current domains in the SP related to the received CPA. The uniqueness of the CPA for every search space ensures that assignments are not done concurrently in a single sub-search-space. The main point of interest of the ConcBT algorithm, is its ability to split the search space dynamically. Each agent can generate a set of CPAs that split the search space of a CPA that passed through that agent, by splitting the domain of one of its variables. Agents can perform splits independently and keep the resulting data structures (SPs) privately. All other agents need not be aware of the split, they process all CPAs in exactly the same manner (see Algorithm description below). CPAs are created either by the Initializing Agent (IA) at the beginning of the algorithm run, or dynamically by any agent that splits an active searchspace during the algorithm run. The present study uses a heuristic of counting the number of times agents pass the CPA in a sub-search-space (without finding a solution), to determine the need for re-splitting of that sub-search-space. This generates a nice mechanism of load balancing, creating more search processes on heavily backtracked search spaces. A backtrack operation is performed by an agent which fails to find a consistent assignment in the searchspace corresponding to the partial assignment on the CPA. Agents that have performed dynamic splitting, have to collect all of the returning CPAs, of the relevant SP , before performing a backtrack operation. Main objects of ConcBT The main data structure that is used and passed between the agents is a current partial assignment (CPA). A CPA contains an ordered list of triplets where Ai is the agent that owns the variable Xj and val is a value, from the domain of Xj , assigned to Xj . This list of triplets starts empty, with the agent that initializes the search process, and includes more assignments as it is passed among the agents. Each agent adds to a CPA that passes through it, a set of assignments to its local variables that is consistent with all former assignments on the CPA. If successful, it passes the CPA to the next agent. If not, it backtracks, by sending the CPA to the agent from which it was received. Splitting the search space on some variable divides the values in the domain of this variable into several groups. Each sub-domain defines a unique sub-search-space and a unique CPA traverses this search space (see subsection Example of dynamic splitting for a detailed example). Every agent that receives a CPA for the first time, creates a local data structure which we call a search process (SP). This is true also for the initializing agent (IA), for each created CPA. The SP holds all data on current domains for the variables of the agent, such as the remaining and removed values during the path of the CPA. The ID of a CPA and its corresponding SP is a pair , where A is the ID of the agent that created the CPA and j is the number of CPAs this agent created so far. The ID of CPAs enables all agents to create CPAs independently, with a unique ID. This is the basis for dynamic splitting of the search space. When a split is performed during search, all CPAs generated by the agent that performs the split have a unique ID and carry the ID of the CPA from which they were split. Algorithm description The ConcBT algorithm is run on each of the agents in the DisCSP and uses the following terminology: • CPA generator: Every CPA carries the ID of the agent that created it. • steps limit: the number of steps (from one agent to the next) that will trigger a split, if the CPA does not find a solution, or return to its generator. • split set: the set of SP -IDs, stored in each SP , including the IDs of the active SPs that were split from the SP by the agent holding it. • origin SP : an agent that performs a dynamic split, holds in each of the new SPs the ID of the SP it was split from (i.e. of origin SP ). An analogous definition holds for origin CPA. The origin SP of an SP that was not created in a dynamic split operation is its own ID. The messages exchanged by agents in ConcBT are the following: • CPA a regular CPA message. • backtrack msg a CPA sent in a backtrack operation. • stop a message indicating the end of the search. • split a message that is sent in order to trigger a split operation. Contains the ID of the SP to be split. The ConcBT algorithm is presented in two parts. The first part includes the main function of the algorithm and functions that perform assignments on the CPA when it moves forward (Figure 1). • The main function ConcBT, initializes the search if it is run by the initializing agent (IA). It initializes the algorithm by creating multiple SPs, assigning each SP with one of the first variable’s values. After initialization, it loops forever, waiting for messages to arrive. • ConcBT: 1. done ← false 2. if(IA) then initialize SPs

[1]  Youssef Hamadi Interleaved Backtracking in Distributed Constraint Networks , 2002, Int. J. Artif. Intell. Tools.

[2]  Seif Haridi,et al.  Distributed Algorithms , 1992, Lecture Notes in Computer Science.

[3]  Patrick Prosser,et al.  An Empirical Study of Phase Transitions in Binary Constraint Satisfaction Problems , 1996, Artif. Intell..

[4]  Makoto Yokoo,et al.  Algorithms for Distributed Constraint Satisfaction: A Review , 2000, Autonomous Agents and Multi-Agent Systems.

[5]  Bhaskar Krishnamachari,et al.  Communication and Computation in Distributed CSP Algorithms , 2002, CP.

[6]  Martin E. Dyer,et al.  Locating the Phase Transition in Binary Constraint Satisfaction Problems , 1996, Artif. Intell..

[7]  Ehud Gudes,et al.  Modeling and Solving Distributed Constraint Satisfaction Problems (DCSPs) , 1996, CP.

[8]  Patrick Prosser,et al.  Binary Constraint Satisfaction Problems: Some are Harder than Others , 1994, ECAI.

[9]  Makoto Yokoo,et al.  The Distributed Constraint Satisfaction Problem: Formalization and Algorithms , 1998, IEEE Trans. Knowl. Data Eng..

[10]  Youssef Hamadi,et al.  Distributed, Interleaved, Parallel and Cooperative Search in Constraint Satisfaction Networks , 2002 .

[11]  Christian Bessiere,et al.  Distributed Dynamic Backtracking , 2001, CP.

[12]  Amnon Meisels,et al.  Comparing performance of distributed constraints process ing algorithms , 2002 .

[13]  Peter van Beek,et al.  A Theoretical Evaluation of Selected Backtracking Algorithms , 1995, IJCAI.

[14]  Makoto Yokoo Distributed Constraint Satisfaction Problem , 2001 .