Contextual and Possibilistic Reasoning for Coalition Formation

In multiagent systems, agents often have to rely on other agents to reach their goals, for example when they lack a needed resource or do not have the capability to perform a required action. Agents therefore need to cooperate. Then, some of the questions raised are: Which agent(s) to cooperate with? What are the potential coalitions in which agents can achieve their goals? As the number of possibilities is potentially quite large, how to automate the process? And then, how to select the most appropriate coalition, taking into account the uncertainty in the agents' abilities to carry out certain tasks? In this article, we address the question of how to find and evaluate coalitions among agents in multiagent systems using MCS tools, while taking into consideration the uncertainty around the agents' actions. Our methodology is the following: We first compute the solution space for the formation of coalitions using a contextual reasoning approach. Second, we model agents as contexts in Multi-Context Systems (MCS), and dependence relations among agents seeking to achieve their goals, as bridge rules. Third, we systematically compute all potential coalitions using algorithms for MCS equilibria, and given a set of functional and non-functional requirements, we propose ways to select the best solutions. Finally, in order to handle the uncertainty in the agents' actions, we extend our approach with features of possibilistic reasoning. We illustrate our approach with an example from robotics.


Introduction
In multiagent systems, agents have goals to satisfy. Typically, agents cannot reach all their goals by themselves, without any help. Instead, agents need to cooperate with other agents, for example because they need a specific resource to satisfy a goal, or do not have the capability required to perform a task. Moreover, in most real-world settings, we cannot always be certain that agents will carry out their assigned tasks successfully.
The questions then, are: Which agent to cooperate with? Which group of agents to join? The problem of assembling a group of cooperating agents in order for all agents to reach their goals, shared or not, is referred to as coalition formation, and has been on the focus of many recent studies in the area of multiagent systems (e.g., [57,58,55,37,8,32,16]). This paper introduces a novel contextual reasoning approach to address the problem based on the use of Multi-Context Systems (MCS).
Multi-Context Systems (MCS ) [31,30,12] are logical formalizations of distributed context theories connected through a set of bridge rules, which enable information flow between different contexts. A context can be thought of as a logical theory -a set of axioms and inference rules -that models the knowledge of an agent. Intuitively, MCS can be used to represent any information system that consists of heterogeneous knowledge-based agents including peer-to-peer systems, distributed ontologies or Ambient Intelligence systems. Several applications have already been developed on top of MCS or other similar formal models of context including (a) the CYC common sense knowledge base [42], (b) contextualized ontology languages, such as Distributed Description Logics [10] and C-OWL [11], (c) context-based agent architectures [48,50], and (d ) distributed reasoning algorithms for Mobile Social Networks [4] and Ambient Intelligence systems [6].
In this article, we address the question of how to find and evaluate coalitions among agents while taking advantage of the MCS model and algorithms. Specifically, our approach uses two variants of MCS. The first variant, called nonmonotonic MCS [12], allows us to handle incomplete information and potential conflicts that may arise when integrating information from different sources. The second variant, called possibilistic MCS [35], is a formalism that enables to model uncertainty in context theories and bridge rules. The main advantages of our approach are: (a) MCS can represent heterogenous multiagent systems, i.e. systems containing agents with different knowledge representation models; (b) bridge rules can represent different kinds of inter-agent relationships such as dependencies, constraints and conflicting goals; (c) the possibilistic extension of MCS enables modeling uncertainty in the agents' actions; (d) there are both centralized and distributed algorithms that can be used for computing the potential coalitions.
We formulate our main research question as: -How to find and evaluate coalitions among agents in multiagent systems using MCS tools while taking into consideration the uncertainty around the agents' actions?
This breaks down into the following three sub-questions: 1. How to formally compute the solution space for coalition formation using the MCS model and algorithms? 2. How to select the best solution given a set of requirements? 3. How to compute and evaluate coalitions taking also into account the uncertainty in the agents' actions?
Our methodology is the following. We start with modeling dependencies among agents using dependence relations as described in [58]. We then model the system as a nonmonotonic MCS: each agent is modeled as a context with a knowledge base and an underlying logic and dependence relations are modeled as bridge rules. Third, we use appropriate algorithms to compute MCS equilibria. Each equilibrium corresponds to a different coalition. Finally, given a set of requirements, we show how to select the best solutions. The requirements we consider may be of two kinds. They may be domain related. For example in robotics, power consumption is a key concern that must be carefully dealt with. They may also be system related. For example in multiagent systems, the efficiency and conviviality of the system may be considered. We then extend our approach with features of possibilistic reasoning: We extend the definition of dependence relations with a certainty degree; we then use the model and algorithms of possibilistic MCS to compute the potential coalitions under uncertainty. In this case, we evaluate the different coalitions based on the certainty degree with which each coalition achieves the different goals, using multiple criteria decision making methods.
This article is an extended version of [7], where we presented our methodology for formalizing multiagent systems and computing coalitions between agents under the perfect world assumption, i.e. actions are always carried out with success by the agents that they have been assigned to. Here, we provide more details about the computation of coalitions and the selection of the best coalition in the perfect world case. We also present new results for the cases that the perfect world assumption does not hold due to uncertainty around the agents' actions.
The rest of the paper is structured as follows. Section 2 presents background information on dependence networks, coalition formation, nonmonotonic MCS and possibilistic MCS using an example from social networks. Section 3 introduces our main example originated in robotics. Section 4 describes our approach in a setting without uncertainty: how we use MCS to represent agents and their dependencies; how we systematically compute the coalitions; and how we then select the best coalitions with respect to given requirements. Section 5 presents the possibilistic reasoning approach, which takes into account the uncertainty in the agents' actions. Section 6 presents related research, and Section 7 concludes with a summary and a perspective on future works.

Dependence Networks and Coalition Formation
Our model for dependencies among agents in multiagent systems is based on dependence networks. According to Conte and Sichman [60], dependence networks can be used to represent the pattern of relationships that exist between agents, and more specifically, interdependencies among agents goals and actions. They can be used to study emerging social structures such as aggregates of heterogeneous agents. They are based on a social reasoning mechanism, on social dependence and on power [58]. Power, in this context, means the ability to fulfill a goal. Multi-agent dependence allows one to express a wide range of interdependent situations between agents.
A dependence network consists of a finite set or sets of actors and the relation or relations between them [59]. Actors can be people or organizations. They are linked together by goals, behaviors and exchanges such as hard currency or information. The structural similarity between dependence networks and directed graphs is such that a dependence network can be represented as a directed graph. Informally, the nodes in the graph represent both the agents themselves, and the actions they have to perform to reach a goal. The directed edges in the graph are labelled with goals, and link agents with actions.
When agents cooperate to achieve some of their goals, they form groups or coalitions. Coalitions are topological aspects of a dependence network. They are indicative of some kind of organization, for example, the cooperation between agents in the dependence network. The coalition is supposed to ensure individual agents a sufficient payoff to motivate them to collaborate. In a coalition, agents coordinate their behaviors to reach their shared or reciprocal goals, as for example described in [52,60]. All the agents in the coalition somehow benefit from the goals being reached. A coalition can achieve its purpose if its members are cooperative, i.e., if they adopt the goals of the coalition in addition to their own goals.

Multi-Context Systems
Multi-Context Systems (MCS) [31,30,12] has been the main effort to formalize context and contextual reasoning in Artificial Intelligence. We use here the definition of heterogeneous nonmonotonic MCS given in [12]. The main idea is to allow different logics to be used in different contexts, and to model information flow among contexts via bridge rules.

Formalization
According to [12], a MCS is a set of contexts, each composed of a knowledge base with an underlying logic, and a set of bridge rules. A logic L = (KB L , BS L , ACC L ) consists of the following components: -KB L is the set of well-formed knowledge bases of L. Each element of KB L is a set of formulae. -BS L is the set of possible belief sets, where the elements of a belief set is a set of formulae. -ACC L : KB L → 2 BS L is a function describing the semantics of the logic by assigning to each knowledge base a set of acceptable belief sets.
As shown in [12], this definition captures the semantics of many different logics both monotonic, e.g. propositional logic, description logics and modal logics, and nonmonotonic, e.g. default logic, circumscription, defeasible logic and logic programs under the answer set semantics. A bridge rule refers in its body to other contexts and can thus add information to a context based on what is believed or disbelieved in other contexts. Bridge rules are added to those contexts to which they potentially add new information. Let L = (L 1 , . . ., L n ) be a sequence of logics. An L k -bridge rule r over L, 1 ≤ k ≤ n, is of the form where c i , 1 ≤ i ≤ n, refers to a context, p i is an element of some belief set of L i , and k refers to the context receiving information s. We denote by h b (r) the belief formula s in the head of r. meaning that bridge rule heads are compatible  with knowledge bases. A belief state of a MCS is the set of the belief sets of its contexts. Formally, a belief state of M = (c 1 , . . . , c n ) is a sequence S = (S 1 , . . . , S n ) such that S i ∈ BS i . Intuitively, S is derived from the knowledge of each context and the information conveyed through applicable bridge rules. A bridge rule of form (3) is applicable in a belief state S iff for 1 ≤ i ≤ j: p i ∈ S i and for j < l ≤ m: p l / ∈ S l . Equilibrium semantics selects certain belief states of a MCS as acceptable. Intuitively, an equilibrium is a belief state S = (S 1 , . . . , S n ) where each context c i respects all bridge rules applicable in S and accepts S i . Formally, S = (S 1 , . . . , S n ) is an equilibrium of M , iff for 1 ≤ i ≤ n, S is a grounded equilibrium of M iff for 1 ≤ i ≤ n, S i is an answer set of logic program P = kb i ∪ {h b (r) | r ∈ br i applicable in S}. For a definite MCS (MCS without default negation in the bridge rules), its unique grounded equilibrium is the collection consisting of the least (with respect to set inclusion) Herbrand model of each context.
In a MCS, even if contexts are locally consistent, their bridge rules may render the whole system inconsistent. This is formally described in [12] as a lack of an equilibrium. Most methods for inconsistency resolution in MCS are based on the following intuition: a subset of the bridge rules that cause inconsistency must be invalidated and another subset must be unconditionally applied, so that the entire system becomes consistent again (e.g. [24,25]). In [15] we proposed a different method based on conviviality, a property of multiagent systems.
Example 1 Consider a scholar social network through which software agents, acting on behalf of students or researchers, share information about research articles they find online. Consider three such agents, each one with its own knowledge base and logic exchanging information about a certain article. The three agents can be represented as contexts The knowledge bases of the three contexts are respectively: kb 1 is a logic program stating that the article is about sensors and corba, and that articles about corba that are not classified in centralizedComputing can be classified in distributedComputing. kb 2 states in propositional logic that the article is written by profA. kb 3 is an ontology about computing written in a basic description logic, according to which ubiquitousComputing is a type of ambientComputing. The three agents use bridge rules r 1 -r 4 to exchange information about articles. With r 1 and r 2 , the first agent classifies articles about middleware (as described in c 2 ) in the category of centralizedComputing, and articles about am-bientComputing (as described in c 3 ) in distributedComputing. With r 3 , the second agent classifies articles about corba in middleware. Finally, with r 4 , the third agent classifies articles about sensors, which have been written by profB, in ubiquitousComputing. M has one equilibrium: according to which, the first agent classifies the paper in centralizedComputing, and the second agent classifies it in middleware.
Consider now the case that profB is identified by c 2 as a second author of the paper: Rules r 4 and r 2 would then become applicable, and as a result M would not have an equilibrium; it would therefore be inconsistent. To resolve the conflict, one of the four bridge rules r 1 -r 4 would have to be invalidated. For example, by invalidating rule r 1 , the system would have one equilibrium:

Computational Complexity
Paper [12] presents an analysis on computational complexity, focusing on MCS with logics that have poly-size kernels. A logic L has poly-size kernels, if there is a mapping κ, which assigns to every kb ∈ KB and S ∈ ACC(kb) a set κ(kb, S) ⊆ S of size (written as a string) polynomial in the size of kb, called the kernel of S, such that there is a one-to-one correspondence f between the belief sets in ACC(kb) and their kernels, i.e., S f (κ(kb, S)). Examples of logics with poly-size kernels include propositional logic, default logic, autoepistemic logic and nonmonotonic logic programs. If furthermore, given any knowledge base kb, an element b, and a set of elements K, deciding whether (i) K = κ(kb, S) for some S ∈ ACC(kb) and (ii) b ∈ S is in ∆ p k , then we say that L has kernel reasoning in ∆ p k . For example, default logic and autoepistemic logic have kernel reasoning in ∆ p 2 . According to the analysis in [12], for a finite MCS M (where all knowledge bases kb i and sets of bridge rules br i are finite, and the logics L i are from an arbitrary but fixed set), where all logics L i have poly-size kernels and kernel reasoning in ∆ p k , deciding whether a literal p is in a belief set S i for some (or each) equilibrium of M is in Σ p k+1 (resp. Π p k+1 = co − Σ p k+1 ).

Possibilistic reasoning in MCS
Recently, Yin et al. proposed a framework for possibilistic reasoning in Multi-Context Systems, which they called possibilistic MCS [35]. This has been so far the only attempt to model uncertainty in MCS. It is based on possibilistic logic [23] and possibilistic logic programs [46], which are logic-based frameworks for representing states of partial ignorance using a dual pair of possibility and necessity measures. These frameworks are in turn based on ideas from Zadeh's possibility theory [68]. Below, we first provide some preliminary information on possibilistic logic programs, which will then help us to present possibilistic MCS.

Possibilistic Logic Programs [46]
Possibilistic logic and logic programs use the notion of possibilistic concept, which is denoted by X, where X denotes its classical counterpart. The classical projection of p is the atom p and n(p) = α is called the necessity degree of p. ( where m, n ≥ 0, {p 1 , . . . , p m , q 1 , . . . , q n , s} ⊆ Σ, and n(r) = α ∈ [0, 1].
In (2), α represents the certainty level of the information described by rule r. The head of r is defined as head(r) = s and its body as body(r) = body + (r)∪ not body − (r), where body + (r) = {p 1 , . . . , p m } and body − (r) = {q 1 , . . . , q n }. The positive projection of r is The classical projection of r is the classical rule: If a poss-program p does not contain any default negation then p is called a definite poss-program. The reduct of a poss-program p w.r.t. a set of atoms T is the definite poss-program defined as: For a set of atoms T ⊆ Σ and a rule r ∈ p, we say that r is applicable in T if body + (r) ⊆ T and body − (r) ∩ T = ∅. App(p, T ) denotes the set of rules in p that are applicable in T .
P is said to be grounded if it can be ordered as a sequence r 1 , . . . , r n such that Given a poss-program p over a set of atoms Σ, the semantics of p is defined through possibility distributions on Σ. 1

Possibilistic MCS [35]
A possibilistic MCS (or poss-MCS ) is a collection of possibilistic contexts. A possibilistic context c is a triple (Σ, P , B) where Σ is a set of atoms, P is a poss-program, and B is a set of possibilistic bridge rules. A possibilistic bridge rule is defined as follows: Definition 3 Let k, c 1 , . . . , c n be possibilistic contexts. A possibilistic bridge rule pr for context k is of the form where s is an atom in k and each p i is an atom in context Intuitively, a rule of form (7) states that information s is added to context k with necessity degree α if, for 1 ≥ i ≥ j, p i is provable in context c i and for j + 1 ≥ l ≥ n, p l is not provable in c l .
By pr (see equation (3)) we denote the classical projection of pr. The necessity degree of pr is denoted by n(pr).
where each Σ i is the set of atoms used in context c i , P i is a poss-program on Σ i and B i is a set of possibilistic bridge rules over atom sets (Σ i , . . . , Σ n ).
A poss-MCS is definite if the poss-program and possibilistic bridge rules of each context are definite.
The possibility distribution specifies the degree of compatibility of each belief set S with the poss-MCS M . Based on definition 6 we can now define the possibility and necessity of an atom is a belief state S. Definition 7 Let M be a definite poss-MCS and π M be the possibilistic distribution for M . The possibility and necessity of an atom p i in a belief state S are respectively defined as: where As proved in [35] where Note that the reduct of P i relies only on S i while the reduct of B i depends on the whole belief state S.
Given the notion of reduct for normal poss-MCS, the equilibrium semantics of normal poss-MCS is defined as follows: Paper [35] presents also a fixpoint theory for definite poss-MCS, which provides a way for computing the equilibrium for both definite and normal poss-MCS.
Example 2 In a different version of example 1 all agents use possibilistic logic programs to encode their knowledge and bridge rules, forming a possibilistic MCS M . The three agents are modelled as contexts c 1 , c 2 and c 3 , respectively, with knowledge bases: and bridge rules: Rules or facts with degree [1] indicate that the agent is certain about them, while rules with degree less than [1] indicate uncertainty about whether the rule holds.
M is a normal poss-MCS. In order to compute its possibilistic equilibrium, we first have to compute its reduct with respect to S, where S is the grounded equilibrium of M (the classical projection of M ): The reduct of M with respect to S, M S , is derived from M by replacing P 1 with P 1 S : The next step is to compute the necessity of each atom in S.
We now present a scenario to illustrate how our approach works. Consider an office building, where robots assist human workers. As typically, there are not enough office supplies, such as cutters, glue, etc., for everyone, they have to be shared among the workers. Furthermore, as it is considered inefficient and unproductive for a worker to contact other colleagues and get supplies by themselves, the workers can submit requests to the robots to get and/or deliver the needed supplies for them, while they keep on working at their desks. We refer to a request submitted to the robots as a task.
Workers and robots communicate via a simple web-based application, which transmits the workers' requests to the robots and keeps track of their status. The robots have limited computational resources: they only keep track of their recent past. Furthermore, not all robots know about the exact locations of supplies. Therefore, robots rely on each other for information about the location of the supplies: the last robot having dealt with a supply is the one knowing where it is. We assume the availability of such an application, and a stable and reliable communication network. A depiction of the scenario is presented in Figure 1. We consider a set of four robots Ag = {ag 1 , ag 2 , ag 3 , ag 4 } and four tasks: where t 1 is to deliver a pen to desk D a , t 2 is to deliver a piece of paper to desk D a , t 3 is to deliver a tube of glue to desk D b , and t 4 is to deliver a cutter to desk D b . We assume that a robot can perform a task if it can carry the relevant material and knows its source and destination. Due to their functionalities, robots can carry the following material: ag 1 the pen or the glue, ag 2 the paper, ag 3 the glue or the cutter, and ag 4 the pen or the cutter. Each robot knows who has the information about the source and the destination of each material, but the actual coordinates are only revealed after an agreement on a coalition among the robots has been made. This involves interdependency among robots.
To start, robots get the information concerning the locations of the supplies and the distances between the material and their destinations. Tables 1 and 2 present the knowledge of the robots about the tasks and the current distances among the robots, the material and the destinations, respectively. The table should be read as follows. Robot ag 1 , regarding task t 1 , knows nothing about the source of the pen, i.e., where it currently is, but does know the destination for the pen, i.e., where it must be delivered. Regarding task t 2 , robot ag 1 knows where the paper is, but knows nothing about its destination.  Upon receiving information about the tasks, robots generate plans to carry out the tasks based on their knowledge and capabilities. For example, there are two different plans for delivering the pen to desk D a (t 1 ): ag 1 can deliver it after receiving information about its location from robot ag 2 ; alternatively, ag 4 can deliver it after receiving information about its location from ag 2 and about its destination from ag 1 . Given the plans, the robots then need to decide how to form coalitions to execute the tasks. We refer to a coalition as a group of robots executing a task. For example to accomplish all tasks t 1 , t 2 , t 3 , t 4 , the following two coalitions may be formed: After forming coalitions, each robot has to generate its own plan to carry out the assigned tasks, e.g. plan the optimal route to get the material and carry it to its destination.
Typically, route planning programs split into two main parts, the representation of the environment and a method of searching possible route paths between the current robot position and some new location, avoiding the obstacles which are known. Hence, mobile robot navigation planning requires to have sufficient reliable estimation of the current location of the robot, and also a precise map of the navigation space. Path planning takes into consideration a model or a map of the environment or contexts, to determine what are the geometric path points for the mobile robots to track from a start position to the goal to be reached.
The most commonly used algorithms for these methods are the A * algorithm, a global search algorithm giving a complete and optimal global path in static environments, and its optimization the D * algorithm. Other examples in the literature include using distributed route planning methods for multiple mobile robots, using the Lagrangian decomposition technique, neural networks [63] and genetic algorithms [13]. One of the lessons which has been learned in this research area is that the need for optimal planning is outweighed by the need for quickly finding an appropriate plan [38].
In this paper our focus is on finding and selecting among the possible coalitions with which a given set of goals will be reached, rather than on the individual plans of the agents to carry out their assigned tasks.

Computing and evaluating coalitions in a perfect world
One question that arises in scenarios such as the one that we present in Section 3 is how to compute the alternative coalitions that may be formed to achieve a set of given goals. Here we present a solution based on the use of heterogeneous nonmonotonic MCS [12], described in Section 2. The main reasons for choosing the MCS model are: (a) it enables representing systems consisting of agents with different knowledge representation models; (b) it can represent different kinds of relationships among agents such as goal-based dependencies, constraints and conflicting goals; and (c) it provides both centralized and distributed reasoning algorithms, which can be used for computing goal-based coalitions. Roughly, our solution consists in representing agent dependencies and inter-agent constraints using bridge rules and computing the potential coalitions using algorithms for MCS equilibria.

Modeling dependencies
We model each agent in a multiagent system as a context in a MCS. The knowledge base of the context describes the goals of the agent and the actions that it can perform. Goals and actions are represented as literals of the form g k , a j , respectively. Bridge rules represent the dependencies of the agent on other agents to achieve its goals. According to the definition given by [60], a dependence relation dp : basic dep(ag i , ag j , g k , p l , a m ) denotes that agent ag i depends on agent ag j to achieve goal g k , because ag j can perform action a m needed in the plan p l , which achieves the goal; for a goal g k of agent ag i , which is achieved through plan p l = (ag 1 : a 1 , ag 2 : a 2 , ..., ag n : a n ), where ag j : a j represents action a j performed by agent ag j , the following dependence relations hold: dp j : basic dep(ag i , ag j , g k , p l , a j ), j = {1, ..., n} We denote this set of dependencies as DP (ag i , g k , p l ). One way to represent dependencies is by using rules of the form: Head ← Body, where the Head denotes the goal of agent ag i that is to be achieved (g k ), and the Body describes the actions of plan p l that will lead to the achievement of the goal. Based on this intuition, we define bridge rules representing dependence relations among agents as follows: Definition 11 For an agent ag i with goal g k achieved through plan p l = (ag 1 : a 1 , ag 2 : a 2 , ..., ag n : a n ), the set of dependencies DP (ag i , g k , p l ) is represented by a bridge rule of the form: where c j , j = 1, ..., i, ..., n is the context representing agent ag j .
Based on the above representation of agents as contexts, and goal-based dependencies among agents as bridge rules, we represent multiagent systems as MCS as follows.
Definition 12 A MCS M (A) corresponding to a multiagent system A is a set of contexts c i = (L i , kb i , br i ), where L i = (KB i , BS i , ACC i ) is the logic of agent ag i ∈ A, kb i ∈ KB i is a knowledge base that describes the actions that ag i can perform and its goals, and br i is a set of bridge rules, a subset of which represents the dependencies DP (ag i , g k , p l ) of ag i on other agents in A for all goals g k of ag i and all plans p l , with which these goals can be achieved.
The main advantage of this model is that it enables agents using different logics to describe their actions and goals, to form plans cooperatively by exchanging information through their bridge rules. Assuming a signature Σ, the following are some example logics that are captured by definition 12: -Default logic [49]: KB is the set of default theories based on Σ; BS is the set of deductively closed sets of Σ-formulas; and ACC(kb) is the set of kb's extensions. -Normal logic programs under answer-set semantics [28]: KB is the set of normal logic programs over Σ; BS is the set of sets of atoms over Σ; and ACC(kb) is the set of kb's answer sets.
-Propositional logic under the closed-world assumption: KB is the set of sets of propositional formulas over Σ; BS is the set of deductively closed sets of propositional Σ-formulas; and ACC(kb) is the set of kb's consequences under the closed world assumption.
This feature (the generality of the representation model) is particularly important in open environments, where agents are typically heterogenous with respect to their representation and reasoning capabilities (e.g. Ambient Intelligence systems).
Example 3 In our main example, introduced in Section 3, we assume that all four robots use propositional logic. We model the four robots, ag 1 -ag 4 , as contexts c 1 -c 4 , respectively, with the following knowledge bases: where a ij represents the actions that a robot can perform. i stands for the object to be delivered: 1 stands for the pen, 2 for the paper, 3 for the glue and 4 for the cutter. j stands for the kind of action that the agent can perform: c stands for carrying the object, s stands for providing information about the current location (source) of the object, while d stands for providing information about the destination of the object. For example, ag 1 can provide information about the source of the paper (a 2s ) provide information about the destination of the pen (a 1d ) provide information about the destination of the glue (a 3d ) carry the pen or the glue (a 1c ∨ a 3c ) We represent the four tasks that the robots are requested to perform, t i , as goals, g i . For example g 1 represents the task of delivering the pen to desk D a (t 1 ). We also assume that a robot ag j can fulfil goal g i , i.e. deliver object i to its destination, if it can perform action a ic , i.e. carry object i. For example, g 1 can be fulfilled by robots ag 1 and ag 4 , because these robots can carry the pen (a 1c ).
Given the knowledge and capabilities of robots, as described in Table 1, the robots can fulfil goals g 1 − g 4 as follows. For g 1 , there are two alternative plans: p 11 =(ag 2 : a 1s , ag 1 : a 1c ) p 12 =(ag 2 : a 1s , ag 1 : a 1d , ag 4 : a 1c ) According to p 11 , robot ag 2 must provide information about the source of the pen (ag 2 : a 1s ) and ag 1 must carry the pen to its destination (ag 1 : a 1c ).
According to p 12 , robot ag 2 must provide information about the source of the pen (ag 2 : a 1s ), ag 1 must provide information about its destination (ag 1 : a 1d ), and ag 4 must carry the pen to its destination (ag 4 : a 1c ).
For g 2 there is only one plan, p 21 ; for g 3 there are two alternative plans: p 31 and p 32 ; and for g 4 there are two plans: p 41 and p 42 : p 21 =(ag 1 : a 2s , ag 3 : a 2d , ag 2 : a 2c ) p 31 =(ag 4 : a 3s , ag 1 : a 3c ) p 32 =(ag 4 : a 3s , ag 1 : a 3d , ag 3 : a 3c ) p 41 =(ag 2 : a 4d , ag 3 : a 4c ) p 42 =(ag 3 : a 4s , ag 2 : a 4d , ag 4 : a 4c ) Each plan implies dependencies among robots. For example, from p 11 the following dependency is derived: dp 1 : basic dep(ag 1 , ag 2 , g 1 , p 11 , a 1s ) namely ag 1 depends on ag 2 to achieve goal g 1 , because ag 2 can provide information about the source of the pen (a 1s ). Figure 2 represents the dependencies derived from all plans, abstracting from plans, similarly to [58]. The figure should be read as follows: The pair of arrows going from node ag 1 to the rectangle box labeled a 1s and then to node ag 2 indicates that agent ag 1 depends on agent ag 2 to achieve goal g 1 , because the latter can perform action a 1s . Bridge rules r 1 -r 7 represent the same dependencies. Each rule represents the dependencies derived by a different plan. For example r 1 corresponds to plan p 11 and represents dependency dp 1 . One system constraint is that two robots cannot carry the same object at the same time. In order to represent this constraint, we expand the body of each of the bridge rules with a predicate that describes the fact that another robot carries the material that the rule refers to: For example c 1 : carriesElse 1 , which appears in r 1 , represents that an agent different to ag 1 carries material 1 (the pen).
For each of the four robots ag l , and for each material i that the robot can carry, we also add bridge rules of the form: where i, k, l = {1...4} and k = l, which describe the cases that an agent different to ag l carries material i. For example, the following rules describe the cases that a robot different to ag 1 carries the pen. We should note here that the same example can also be represented using dynamic MCS [21], which use schematic bridge rules that are instantiated at run time. For example, using dynamic MCS, we would replace the static predicates (c 1 : carriesElse 1 ) in rule r 1 and (c 4 : carriesElse 1 ) in r 2 by a dynamic predicate (c x : a 1c ), which would be instantiated at run time by any context c x , which contains a 1c in its knowledge base; in other words by any robot that can carry material 1. Rules such as r 8 , r 9 and r 10 would then be unnecessary and would be omitted. Such an approach is more appropriate for open and dynamic environments, where any agent may join or leave the system at any time and without prior notice (e.g. Ambient Intelligence environments).
In the running example, we assumed (for reasons of simplicity) that the four agents use propositional logic. However, with MCS it is possible to represent any agent using a logic that can be captured by Definition 12. Note also that we use a rather simplistic representation for plans, because our goal is not to represent and reason with plans; we are only interested in the dependencies derived from plans.

Computing coalitions
An equilibrium in MCS represents an acceptable belief state of the system. Each belief set in this state is derived from the knowledge base of the corresponding context and is compatible with the applicable bridge rules. For a MCS M (A) that corresponds to a multiagent system A, an equilibrium S = {S 1 , ..., S n } represents a coalition in which agents of A can achieve their goals. Specifically, each belief set S i in the equilibrium contains the actions that agent ag i can perform and the goals that it will achieve in this coalition. If there is more than one ways with which the goals can be achieved, the MCS will have more than one equilibria, each one representing a different coalition. If a certain goal does not appear in any of the equilibria, this means that there is no coalition with which the goal can be achieved.
In order to compute the potential coalitions in a multiagent system A, one then has to formulate the MCS M (A) that corresponds to A, and compute the equilibria S of M (A).
Equilibria in nonmonotonic MCS can be computed using any of the following algorithms / implementations depending on the requirements of the specific system or application, e.g. with respect to the representation and reasoning capabilities of the agents: -The MCS-IE system [9] implements a centralized reasoning approach that is based on the translation of MCS into HEX-programs [26] (an extension of answer set programs with external atoms), and on their execution in the dlv-hex system 2 . -The algorithms proposed in [6] implement a distributed computation, which however assumes that all contexts are homogeneous with respect to the logic that they use (defeasible logic). -The three algorithms proposed in [22] enable distributed computation of equilibria. DMCS assumes that each agent has minimal knowledge about the world, namely the agents that it is connected through the bridge rules, but doesn't have any further metadata, e.g. topological information, of the system. Its computational complexity is exponential to the number of literals used in the bridge rules. DMCS-OPT uses graph theory techniques to detect any cycle dependencies in the system and avoid them during the evaluation of the equilibria, improving the scalability of the evaluation. DMCS-STREAMING computes the equilibria gradually (k equilibria at a time), reducing the memory requirements for the agents. The three algorithms have been implemented in a system prototype 3 .
Paper [22] presents a performance evaluation of the algorithms it proposes, as well as a comparison with previous approaches. They conclude that the algorithms in [6] are in general much faster as they are based on a low-complexity logic, while among the others there is no clear winner, as their performance depends on the memory capacity of the agents, and the topology of the system.
Choosing the best approach for the computation of coalitions depends on several parameters, such as the targeted environment, the available means of communication, the computational, communication and knowledge representation capabilities of the agents, and the specific needs and requirements of the use cases that we want to support. For small-scale systems, such as the one in our running example, a centralized approach, e.g. the one proposed in [9], is probably more appropriate as it achieves better performance when the total number of agents is small. For larger-scale systems, a distributed scalable approach is probably more appropriate. In that case, if the main requirement is to compute all possible coalitions as fast as possible, DMCS and DMCS-OPT should be preferred; DMCS for systems with simple topology, i.e. fewer dependencies among the agents, and DMCS-OPT for more complex systems with possible cycle dependencies among the agents. Finally, in cases that the memory capacity of the available agents is limited, or that we are only interested in computing fast some (and not all) of the possible coalitions, DMCS-STREAMING seems to be the most appropriate approach.
Example 4 Returning to our main example, the MCS that corresponds to the system of the four robots, M (A), has two equilibria: S 0 and S 1 : {a 2s , a 1d , a 3d , a 3c , g 3 }, {a 1s , a 4d , a 2c , g 2 }, {a 4s , a 2d , a 4c , g 4 }, {a 3s , a 1c , g 1 } {a 2s , a 1d , a 3d , a 1c , g 1 }, {a 1s , a 4d , a 2c , g 2 }, {a 4s , a 2d , a 3c , g 3 }, {a 3s , a 4c , g 4 }     S 0 represents coalition C 0 , according to which ag 1 delivers the glue to desk D b (g 3 ), ag 2 delivers the paper to desk D a (g 2 ), ag 3 delivers the cutter to desk D b (g 4 ) and ag 4 delivers the pen to desk D a (g 1 ). S 1 represents coalition C 1 , according to which ag 1 delivers the pen to desk D a (g 1 ), ag 2 delivers the paper to desk D a (g 2 ), ag 3 delivers the glue to desk D b (g 3 ) and ag 4 delivers the cutter to desk D b (g 4 ). Using the previous abstraction of plans, the two coalitions are graphically represented in Figure 3. In order to achieve their goals, the robots then have to carry out the actions in the plans that are associated to these goals. For example, for coalition C 0 the associated plans are: p 12 (for goal g 1 ), p 21 (for g 2 ), p 31 (for g 3 ) and p 41 (for g 4 ), while the plans associated to C 1 are p 11 , p 21 , p 32 and p 42 .

Selecting the best coalition
Selecting the best among the possible coalitions in which agents can achieve their goals requires evaluating and comparing them. Efficiency and stability metrics are commonly used to evaluate coalitions (e.g., [47,54,53,39]). The former giving an assurance on the economical gain reached by being in the coalition, the later giving a certainty that the coalition is viable on the long term.
Generally speaking, efficiency in a coalition is a relation between what agents can achieve as part of the organization compared to what they can do alone or in different coalitions. Furthermore, a coalition is economically efficient iff i) no one can be made better off without making someone else worse off, ii) no additional output can be obtained without increasing the amount of inputs, iii) production proceeds at the lowest possible per-unit cost [47].
Example 5 In our running example, we can associate efficiency to the distances that the four robots must cover to perform the required actions. From Table  2 we can compute the distance for each robot to do each task, and, by adding them up, the cost of executing tasks in a given coalition: where dist(ag i , j) denotes the distance between the robot (ag i ) and the material (j) it has to carry in coalition C, and dist(j, dest(j)) denotes the distance between the material (j) and its destination (dest(j)). Based on this formula, the costs of C 0 and C 1 are: cost(C 0 ) =(9 + 12) + (8 + 16) + (7 + 9) + (9 + 11) = 81 cost(C 1 ) =(10 + 11) + (8 + 16) + (10 + 12) + (11 + 9) = 87 If we compare C 0 and C 1 , C 0 is more economically efficient as at least one agent is better off without making anyone worse off, all else being equal (the distance that ag 3 has to cover is 16 in C 0 and 22 in C 1 , while all other robots have to cover the same distance in both coalitions). C 0 is also more cost efficient than C 1 , as its overall cost is smaller.
Other approaches could take into consideration the time it takes for each robot to accomplish its task and select the best coalition, which would in this case, be the one which executes the fastest all its tasks. To do this we would simply include a table of task duration for each robot along with the distances and compute the times similarly as for previously done for the distances. Moreover, other variables could be included such as the resources being actually used by each robot to accomplish its task, and the potential obstacle to avoid in order to reach their goals.
Stability of coalitions is related to the potential gain in staying in the coalition or quitting the coalition for more profit (i.e., free riding). Hence, several elements come to play for the evaluation of a coalition's stability. First, the coalition outcome should be greater than the individual ones cumulated. This is usually computed via a characteristic function such as the one proposed in [44]. Second, the distribution of benefits should be fair. Several functions, named sharing rules have been proposed for this purpose, such as the Shapley value [54], nucleolus [53] and Satisfactory Nucleolus [39]. The leading idea is to take the individual contribution and the free rider's value into account when sharing the benefits.
Depending on the application domain, other functional and non-functional requirements, e.g., security, user-friendliness or conviviality, may also play an important role in the choice of a coalition. In [14], we compared coalitions in terms of conviviality. Defined by Illich as "individual freedom realized in personal interdependence" [34], conviviality was introduced as a social science concept for multiagent systems to highlight soft qualitative requirements like user friendliness of systems. In [14], we proposed measures for conviviality to evaluate coalitions in dependence networks based on the following rough idea: more opportunities to work with others increases the system's conviviality. Specifically, we measured conviviality by the number of reciprocity-based coalitions that can be formed within an overall coalition. In our measures we used the notion of cycles in the dependence graph, which denote the smallest graph topology expressing interdependence, and therefore conviviality. Given the dependence network (DN ) that corresponds to a given coalition, the conviviality of the coalition conv(DN ) can be computed as follows: where |A| is the number of agents in the system, |G| is the number of goals, P erm is the usual permutation defined in combinatorics, coal(a, b) for any distinct pair of agents a, b ∈ A is the number of cycles that contain the ordered pair (a, b) in DN , l is the cycle length, and Ω denotes the maximal number of pairs of agents in cycles. Example 6 Back to our running example, abstracting from plans and actions, Figures 4.a and 4.b represent the dependence networks for coalitions C 0 and C 1 respectively. For both dependence networks, by applying formulae 16 and 17, we get Θ = 656 and Ω = 7872. By applying formula 15, we can then compute the conviviality of the two coalitions: conv(C 0 ) = 0.00089, conv(C 1 ) = 0.00127 Based on the above, C 1 is therefore preferred to C 0 in terms of conviviality.
In cases of agents with conflicting goals, coalitions differ in the set of goals that they can fulfil and the selection of a coalition depends on the priorities among the conflicting goals. It is among our future plans to integrate in the proposed model a preference relation on the set of goals to represent such priorities and develop algorithms for preference-based coalition formation.
The problem of selecting the best coalition however, has also been seen as tied to finding the optimal coalition structure, and therefore as a search problem which consists in performing a search on the coalition structure graph [51]. A search through a subset of the coalition structure space is required: first, the bottom two levels of the coalition structure graph, then a time bounded breadth first search from the top of the coalition structure graph. The best coalition structure that is found is selected. This was optimised by [20], who analysed fewer coalitions to establish small bounds from the optimal. In [55], coalition sizes are limited and a greedy heuristic to yield a coalition structure is used; i.e. based on a limited number of agents.

Computing coalitions under uncertainty
The models for representing and computing coalitions that we presented in Section 4 are based on the perfect world assumption, according to which it is always certain that agents will carry out the actions that are specified in the associated plans. However, in real-world settings, such assumption is not always valid. For instance, in our running example, there is uncertainty associated to the robots carrying the materials to their destinations. A robot may fall while on its way to pick up the material or towards its final destination; it may also run out of battery and fail to carry out its action.
In this section we extend the representation and computational models that we presented in Section 4 to take into account the uncertainty in the agents' actions. Similarly as in Section 4, we first present a rule-based representation model for dependencies, based on Possibilistic Multi-Context Systems [35]. We then present the algorithms for computing the alternative coalitions and for selecting the best coalition under uncertainty using also multiple-criteria decision making methods.

Modeling uncertainty
We extend the definition of [60] for dependence relations to take into account the uncertainty of actions:

Definition 13
The dependency of an agent ag i on agent ag j to achieve goal g k , because ag j may perform action a m needed in plan p l , which achieves the goal, is denoted as: dp : poss dep(ag i , ag j , g k , p l , a m , α am ) where α am represents the possibility that ag j will carry out action a m with success.
We denote the set of dependencies of agent ag i to achieve goal g k through plan p l = (ag 1 : a 1 , ag 2 : a 2 , . . . , ag n : a n ) as DP poss (ag i , g k , p l , α p l ), where α p l represents the aggregated possibility that agents ag i , . . . , ag n will successfully perform actions a 1 , . . . , a n , respectively. Assuming that actions a 1 , . . . , a n are mutually independent: In the general case, where dependencies among the actions in p l may exist: where α [ai|ai+1∧...∧an] denotes the possibility that a i will be carried out successfully given that actions a i+1 , . . . , a n have been successful.
In order to model the uncertainty in the agents' actions, we model a multiagent system as a possibilistic MCS (or poss-MCS) with possibilistic bridge rules that represent the dependencies of the agent on the other agents to achieve its goals.

Definition 14
For an agent ag i with goal g k achieved through plan p l = (ag 1 : a 1 , ag 2 : a 2 , ..., ag n : a n ), the set of dependencies DP poss (ag i , g k , p l , α p l ) is represented as a possibilistic bridge rule of the form: where c j , j = 1, ..., i, ..., n is the context representing agent ag j .
Based on the above representations, we can now define the following representation for multiagents systems with uncertainty.
Definition 15 A poss-MCS M (A) corresponding to a multiagent system A with uncertainty is a set of possibilistic contexts c i = (Σ i , P i , B i ), where Σ i is a set of atoms representing the goals of the agent and the actions it can perform; P i represents the local theory of the agent as a possibilistic logic program; and B i is a set of possibilistic bridge rules representing the dependencies of the agent on other agents to achieve its goals.
As it becomes obvious, the above definition is more restrictive compared to definition 12, as it only allows agents that use possibilistic logic programs. However, by explicitly representing the degree of certainty in the rules, it offers a more elaborate manipulation of uncertainty, which is desirable when such values are available (e.g. in sensor-enriched environments).
Example 7 In our running example, the uncertainty is associated with the robots carrying the materials to their destinations. In the robotics-related literature, different approaches may be found to compute uncertainty in (robotic) motion planning. Typically, uncertainty is considered in two ways: in sensing, where the current state of the robot and workspace may not be known with certainty, or in predictability, where the future state of the robot and workspace cannot be deterministically predicted even when the current state and future actions are known [40]. Factors that may affect predictability are uncertainty in the workspace, e.g. moving obstacles [66], uncertainty in the configuration of the robot [33]; or uncertainty in the robot's motion [3].
In our running example, the assumption is that uncertainty is associated with the motion of the robots and the grasping of a material. Furthermore, it is a function of the distance that the robot has to cover with and without the material. For our purpose, the following very simple function will suffice to compute the possibility that robot ag i carries out action a jc ; namely, carries material c to its destination: where dist(ag i , j) denotes the distance between the robot (ag i ) and the material (j), and dist(j, dest(j)) denotes the distance between the material (j) and its destination (dest(j)). The intuition is that the uncertainty of a robot carrying a material to its destination is proportional to the distance that the robot has to cover to get to the material, and the distance that it has to cover after it grabs the material to deliver it to its destination. As many more things may go wrong while carrying the material, the second element has a double weight.
Using this function and the distances between the different locations as they appear in Table 2, the dependencies among the robots are represented by the following possibilistic bridge rules: For example, the necessity degree of rule pr 1 is associated with the uncertainty of action (ag 1 : a 1c ): robot ag 1 carrying the pen to desk D a . According to function 18, the possibility that this action will be carried out with success is: poss(ag 1 , a 1c ) = 1 − (0.001 × 10 + 0.002 × 11) = 0.968 where 10 is the distance between ag 1 and the pen, and 11 is the distance between the pen and desk D a . As in the perfect world case, the negative atoms in the bridge rules (e.g. not(c 1 : carriesElse 1 )) represent that the material that a rule refers to (e.g. the pen) is not carried by another robot, and are derived from bridge rules such as the following: [1] pr 9 = (c 1 : carriesElse 1 ) ← (c 3 : a 1c ), [1] pr 10 = (c 1 : carriesElse 1 ) ← (c 4 : a 1c ), [1]

Computing coalitions under uncertainty
In Section 2, we showed that the possibilistic equilibrium of a poss-MCS M is a collection of possibilistic atom sets S i , where each S i is a collection of possibilistic atoms p i from the system contexts. In the context of multiagent systems, an equilibrium represents a coalition in which agents can achieve their goals and p i represents an action or a goal of agent ag i and its necessity degree. In the case of goals the necessity degree represents the level of certainty with which the coalition will achieve the goal.
To compute the potential coalitions under uncertainty in a multiagent system A, one actually has to compute the possibilistic equilibria of M (A). This is possible using a fixpoint theory proposed in [35], which is based on the use of a consequence operator that gradually computes the consequences of a possibilistic MCS using its applicable rules.  Figure 3. C 0 will achieve goal g 1 with certainty degree 0.969, g 2 with 0.96, g 3 with 0.967 and g 4 with 0.975. On the other hand, C 1 will achieve goal g 1 with certainty degree 0.968, g 2 with 0.96, g 3 with 0.966 and g 4 with 0.971.

Selecting the best coalition under uncertainty
In Section 4.3 we presented different approaches for selecting the best coalition in the perfect world, where there is certainty about the ability of the agents to carry out their tasks. If we take into account the uncertainty in the agents' actions, each coalition can achieve the agents' goals only with a certain degree of certainty. This is another criterion that we have to consider when evaluating the different coalitions.
The problem of selecting a coalition taking into account the degree of certainty with which the coalitions achieve the different goals is essentially a multi-attribute decision making (MCDM) problem. We use the following definition for MCDM problems [70]: . . , m be a set of decision alternatives and R = {R j }, j = 1, . . . , n a set of decision criteria according to which the desirability of an action is judged. Determine the optimal decision alternative D * with the highest degree of desirability with respect to all relevant decision criteria R j .
In our case, the decision alternatives, D, are the alternative coalitions that the agents may form, and the criteria, R, are the certainty degrees with which the four goals will be reached. In the literature one can find many different alternatives for solving this problem, most of which are based on functions that aggregate the scores for the different criteria. Some characteristic examples are: the Weighted Sum Method [27], according to which each criterion R j is given a weight w j , so that the sum of all weights is 1 ( n j=1 w j = 1), and the overall score of each alternative D i is the weighted sum of q ij , i.e. the scores of D i for each criterion R j : The optimal decision alternative is the one with the highest overall score (W S). This method can only be used in single-dimensional cases, in which all the score units are the same.
the Weighted Product Method [45], which aggregates the individual scores using their product instead of their sum. Specifically, each decision alternative is compared with the others by multiplying a number of ratios, one for each criterion. Each ratio is raised to the power equivalent to the relative weight of the corresponding criterion. In general, in order to compare alternatives D 1 and D 2 , the following product has to be calculated: where q 1j and q 2j are the scores of D 1 and D 2 respectively for criterion R j , and w j is the weight of criterion R j . If the ratio is greater than one, then D 1 is more desirable than D 2 . The best alternative is the one that is better, with respect to this ratio, than all other alternatives. This method is sometimes called dimensionless analysis because its structure eliminates any units of measure. It can, therefore, be used in both single-and multidimensional decision-making problems. -TOPSIS (Technique for Order Preference by Similarity to Ideal Solution [19]), which is based on the concept that the chosen alternative should have the shortest geometric distance from the positive ideal solution and the longest geometric distance from the negative ideal solution. TOPSIS assumes that each alternative has a tendency of monotonically increasing or decreasing utility. Therefore, it is easy to locate the ideal and negativeideal solutions.
A review and comparative study of the most prominent methods for multicriteria decision making is available in [65].
Computing coalitions in multiagent systems, as this is described in this paper, is a single-dimension problem, as the different criteria are the certainty degrees with which the goals are achieved, and are therefore of the same form and they take values in the same range ([0, 1]). For such cases, the Weighted Product Method is considered as the preferred method because of its simplicity.
Example 9 In our running example, there are two alternative coalitions with which the agents can achieve their goals: C 0 and C 1 . If we apply the Weighted Sum Method, and considering that the four criteria represent the certainty degrees with which the four goals will be reached (α gi ), the weighted sum of a coalition is: where w gi is the weight of goal g i . Assuming that the four goals are equally important, their weights are equal, therefore the weighted sums of the the coalitions are: C 0 is preferable as it achieves the system's goals with greater certainty.
Assuming that goals g 1 and g 4 (delivering the pen to desk D a and the cutter to desk D b ) are more important that g 2 and g 3 (delivering the piece of paper to desk D a and the glue to desk D b ), and the weights of the four goals are: w g1 = w g4 = 0.4 and w g2 = w g3 = 0.1, the weighted sums of the two coalitions are: This article does not pretend to be the first work bringing together agents and context logics. Two earlier studies ( [48,50]) used Multi-Context Systems as a means of specifying and implementing agent architectures. Both studies propose breaking the logical description of an agent into a set of contexts, each of which represents a different component of the architecture, and the interactions between these components are specified by means of bridge rules between the contexts. The first study [48] followed this approach to simplify the construction of a BDI agent, while the second [50] extended it to handle more efficiently implementation issues such as grouping together contexts in modules, and enabling inter-context synchronization. The main difference with our approach is that the focus is not on the internal representation of agents, but rather on their interactions with other agents and the coalitions that they can form.
As we also mention in the Introduction, this study is built on previous work on modeling multiagent systems as MCS and computing coalitions using MCS computational methods and tools, which we first presented in [7]. Here we give more details about the proposed methodology. We also extend it with modeling and reasoning methods from possibilistic reasoning to handle uncertainty in the agents' actions. In another previous study, we evaluated information exchange in distributed information systems, based on modeling MCS as dependence networks where bridge rules are represented as dependencies [15]. Here we do the opposite: we use bridge rules to represent dependencies among agents, and model agents as contexts in MCS.
Several studies from different research areas have focused on the problem of coalition formation including variants of the contract net protocol [29,41], according to which agents break down composite tasks into simpler subtasks and subcontract subtasks to other agents via a bidding mechanism; formal approaches from multiagent systems, e.g. [37,55]; solutions from the field of robotics based on schema theory [64,69] or synergy [43]; approaches inspired from the formation of coalitions in politics [18]; and adaptive approaches based on machine learning methodologies [2,61].
Compared to previous approaches, the solution that we propose is the only one that combines the following four characteristics: (a) it allows agents to use different knowledge representation models; (b) based on a non-monotonic reasoning model, it enables representing and reasoning with agents with conflicting goals; (c) by integrating features from possibilistic reasoning, it also allows handling uncertainty in the agents' actions; and (d) it provides both centralized and distributed algorithms for computing coalitions, and can hence be applied in settings with different requirements for information hiding and sharing, related for example to the privacy and security of the agents.
There is also a number of studies that focus on the problem of forming coalitions under uncertainty. There are different kinds of uncertainty that they consider. For example, studies such as [17,56] deal with uncertainty in the agent type, i.e. in the knowledge about the agent's abilities and motivations.
Other studies such as [36] focus on the uncertainty in the agents' costs, e.g. in a multi-robot system the relevant costs can be energy, hardware cost or processing time. Finally, the approaches proposed in [62,67] deal with uncertainty in the value of a coalition, i.e. the costs and payoff of a coalition for each agent taking part in it. Most of the proposed solutions are based on game theory and machine learning algorithms. Our approach, on the other hand, focuses on another kind of uncertainty, i.e. uncertainty in the agents' actions, and our proposed solution combines elements of logic-based and possibilistic reasoning.

Summary and Future Work
In multiagent systems agents often depend on each other and need to cooperate in order to achieve their goals. In this article, we deal with the problem of computing the alternative coalitions in which the agents may fulfil their goals. Specifically, we propose a representation of multiagent systems based on Multi-Context Systems, according to which agents are modeled as contexts and dependence relations among agents as bridge rules. Based on this representation, we compute the equilibria of the MCS, which correspond to the coalitions in which the agents may fulfil their goals. Then, given a set of functional and non-functional requirements such as efficiency, stability and conviviality, we propose ways to select the best coalition. Finally, we extend our model and algorithms with features from possibilistic reasoning, and more specifically possibilistic MCS, in order to model, compute and evaluate the different coalitions taking also into account the uncertainty in the agents' actions. We demonstrate the proposed approach using an example from robotics, in which four different robots need to cooperate in order to perform a given set of tasks.
In further research, we plan to integrate preferences on agents and goals into our model. Building on previous work on preference-based inconsistency resolution in MCS [6,24,25], we will develop algorithms for preference-based coalition formation in the presence of conflicting goals. We also want to extend our approach with elements of dynamic MCS [21], i.e. schematic bridge rules that are instantiated at run time with concrete contexts. This will enable us to handle changes such as the failure of an agent, the arrival of a new agent or any change in the operating environment. We will also plan to apply and test our methods in different kinds of agent-based systems characterized by the heterogeneity of the participating agents and uncertainty, such as ubiquitous robots and Ambient Intelligence systems. To achieve this we will use existing MCS implementations, such as DMCS [5], a distributed solver for MCS, and MCS-IE [9], a tool for explaining inconsistencies in MCS, and extend them with features from possibilistic MCS.