Synthesis of Cost-Optimal Multi-Agent Systems
for Resource Allocation
Abstract
Multi-agent systems for resource allocation (MRAs) have been introduced as a concept for modelling competitive resource allocation problems in distributed computing. An MRA is composed of a set of agents and a set of resources. Each agent has goals in terms of allocating certain resources. For MRAs it is typically of importance that they are designed in a way such that there exists a strategy that guarantees that all agents will achieve their goals. The corresponding model checking problem is to determine whether such a winning strategy exists or not, and the synthesis problem is to actually build the strategy. While winning strategies ensure that all goals will be achieved, following such strategies does not necessarily involve an optimal use of resources.
In this paper, we present a technique that allows to synthesise cost-optimal solutions to distributed resource allocation problems. We consider a scenario where system components such as agents and resources involve costs. A multi-agent system shall be designed that is cost-minimal but still capable of accomplishing a given set of goals. Our approach synthesises a winning strategy that minimises the cumulative costs of the components that are required for achieving the goals. The technique is based on a propositional logic encoding and a reduction of the synthesis problem to the maximum satisfiability problem (Max-SAT). Hence, a Max-SAT solver can be used to perform the synthesis. From a truth assignment that maximises the number of satisfied clauses of the encoding a cost-optimal winning strategy as well as a cost-optimal system can be immediately derived.
1 Introduction
Multi-agent systems for resource allocation (MRAs) have been introduced in [9] as a concept for modelling competitive resource allocation problems in distributed computing. An MRA is composed of a set of agents and a set of resources. Each agent has a goals in terms of allocating certain resources for a time period before a deadline elapses. Resources can be allocated by means of request actions. Further types of actions are release and idle. MRAs run in discrete rounds. In each round each agent selects an action, and the tuple of selected actions gets executed in a simultaneous manner. Since resources are generally shared, the achievement of goals is a competition between agents. For MRAs (or more specifically, for the scenarios that they model) it is typically of importance that they are designed in a way such that there exists a strategy that guarantees that all agents will achieve their goals. In this context, a strategy is a mapping between states of the underlying MRA and actions to be taken by the agents in these states. The corresponding model checking problem is to determine whether such a winning strategy exists or not, and the synthesis problem is to actually build the strategy. In [24] we introduced a SAT-based technique for checking goal-achievability properties of multi-agent systems for resource allocation. The technique does not only decide the model checking problem, it also synthesises a corresponding winning strategy if existent. The approach encodes the problem in propositional logic. Thus, model checking can be performed via satisfiability solving. From a satisfying truth assignment of the encoded problem a winning strategy can be immediately derived.
While winning strategies ensure that all goals will be achieved, following such strategies does not necessarily involve an optimal use of resources. In this paper, we extend our technique such that the outcome of the synthesis is not only a winning strategy but also a cost-optimal MRA solution of a distributed resource allocation problem. We consider a scenario where a distributed system shall be designed that processes a given set of computational tasks. Such a system is a composition of networked computers and shared resources. System components need to be purchased. Hence, it is of interest to determine a cost-minimal system that is still capable of accomplishing all computational tasks. The distributed system to be designed can be straightforwardly modelled as an MRA where agents represent computers and the tasks are defined as goals of the agents. Given a set of tasks resp. goals, we build an initial MRA that consists of sufficiently many agents and resources to achieve all goals. In our new approach, prices can be assigned to agents and to the different types of resources in the system. The extended synthesis will build a cost-optimal winning strategy: Following such a strategy will ensure that all goals will be achieved, and it will additionally minimise the cumulative costs of the agents and resources that are actually used in the run of MRA. Hence, from a cost-optimal winning strategy we can derive a cost-optimal MRA by removing unused agents and resources. The cost-optimal MRA then indicates which components actually need to be purchased for the distributed system to be designed.
The synthesis of cost-optimal strategies and systems is no longer a pure decision problem and therefore it cannot be reduced to standard Boolean satisfiability. However, we show that the synthesis can be reduced to the maximum satisfiability problem (Max-SAT). Our reduction is based on an extension of the existing propositional logic encoding by weighted ‘not in use’ clauses. Each such clause encodes that a particular system component (agent or resource) is never used, and the weight of the clause corresponds to the price of the component. We have proven that from a truth assignment that maximises the sum of weights of satisfied ‘not in use’ clauses a corresponding cost-optimal winning strategy can be immediately derived. This allows us to employ Max-SAT solving for synthesising cost-optimal strategies and MRAs.
We first present our technique based on the case where goals are already assigned to agents and only the costs of the resources in the system need to be minimised. Secondly, we consider the case where goals are initially unassigned and both the costs of agents and resources need to be minimised. We have implemented our approach on top of the Max-SAT solver OPEN-WBO [18]. Experiments show promising results. We demonstrate that optimal winning strategies synthesised via Max-SAT can involve significant cost savings in comparison to bare winning strategies synthesised via standard SAT.
2 Multi-Agent Systems for Resource Allocation
In our approach we focus on synthesising strategies for multi-agent systems for resource allocation (MRAs), originally introduced in [9].
Definition 1 (Multi-Agent System for Resource Allocation).
A multi-agent system for resource allocation is a tuple where
-
•
is a set of agents,
-
•
is a set of resource types,
-
•
is a set of resources partitioned into subsets of resources of type ,
-
•
is a price function that assigns a price to each type of resource; the price function extends to resources such that iff ,
-
•
is a set of goals partitioned into subsets of goals of agent ,
-
•
each goal is a tuple where is the resource composition, is the period, and is the deadline of the goal.
Each agent has the objective to achieve all its goals. A goal has been achieved if a resource of each type in has been allocated by agent for consecutive time steps before the deadline time step is reached.
Example. We will illustrate the synthesis of strategies for achieving goal properties based on the example system where
-
•
,
-
•
,
-
•
,
-
•
, , ,
-
•
, ,
-
•
,
-
•
.
consists of three agents and three different types of resources where two resources of each type are in place. The prices 1, 2 and 3 are associated with the different resource types. Agent has two goals whereas the agents and have one goal each. The first goal of agent is to allocate one resource of type and one resource of type by time step 4. For simplicity, the periods of all goals are 0. That is, once all the required resources for a goal have been allocated they can be released in the next time step.
The actions that agents in MRAs can perform in order to achieve their goals are the following:
Definition 2 (Actions).
Given an MRA , the set of actions is the union of the following types of actions:
-
•
request actions:
-
•
release actions:
-
•
release-all actions:
-
•
idle actions:
Hence, an agent can request a particular resource, release a particular resource that it currently holds, release all resources that it currently holds, or just idle. An MRA runs in discrete rounds where in each round each agent chooses its next action. In a round the tuple of chosen actions, one per agent, gets executed simultaneously. The execution of actions leads to an evolution of the system between different states over time.
Definition 3 (States).
A state of an MRA is a function where and is a dummy agent. If then resource is unallocated in state . If and then is allocated by agent in . We denote by the initial state of , where for each , i.e. initially all resources are unallocated. We denote by the set of all possible states of . If we want to express that resource is currently allocated by agent but the current state is not further specified, then we simply write .
Hence, states describe the current allocation of resources by agents. In each state only a subset of actions may be available for execution by an agent, which we call the protocol:
Definition 4 (Action Availability Protocol).
The action availability protocol is a function defined for each and :
-
•
iff ;
-
•
iff ;
-
•
iff ;
-
•
.
Thus, an agent can request a resource that is currently unallocated, an agent can release one or all resources that it currently holds, and an agent can idle.
Definition 5 (Action Profiles).
An action profile in an MRA is a mapping . denotes the set of all action profiles. We say that a profile is executable in a state if for each we have that .
Based on action profiles we can formally define the evolution of an MRA.
Definition 6 (Evolution).
The evolution of an MRA is a relation where iff is executable in and for each :
-
1.
if then:
-
(a)
if then ;
-
(b)
otherwise ;
-
(a)
-
2.
if for some then:
-
(a)
if then ;
-
(b)
otherwise .
-
(a)
If an action profile is executed in a state of an MRA , this leads to a transition of into a corresponding successor state, i.e. a change in the allocation of resources according to the actions chosen by the agents. According to the evolution, the request of a resource by an agent will be only successful if is the only agent that requests in the current round. If multiple agents request the same resource at the same time, then none of the agents will obtain it.
We are interested in solving strategic model checking problems with regard to MRAs: Do the agents in have a joint uniform strategy that guarantees that all goals of all agents will be achieved?
Definition 7 (Uniform Strategy).
A uniform strategy of an agent in an MRA is an injective function . A strategy can be also denoted by a relation where iff . A joint strategy for all agents in is a tuple of strategies , one for each . We denote by the set of all possible joint strategies of .
A strategy determines which action an agent will choose in which state. A strategy is uniform if the following holds: Each time when the system reaches the same state, the agent will perform the same action according to the strategy. The outcome of a joint strategy in a state is a path.
Definition 8 (Outcome of a Strategy).
Let be an MRA and a state of . Moreover, let be a joint strategy. Then the outcome of in state is a path where and
We denote by the set of all possible paths of .
The MRA model checking problem is to decide whether a joint strategy exists that results in a path on which all goals will be achieved. We call such a strategy a winning strategy.
Definition 9 (MRA Model Checking of Agent Goal Properties).
Let be an MRA, and let be a state of . Then the strategic MRA model checking problem is inductively defined as follows:
where is assumed to be the tuple , and denotes the -th state of the path .
Solving will not only decide the model checking problem but also synthesise a corresponding winning strategy if existent.
For our example system the actions listed in Table 1 characterise a winning strategy. Each action in the table is associated with an agent and a time step. Agent performs action at time step 0, which immediately results in the achievement of the goal . Hence, the agent releases the allocated resource at the next time step. It then consecutively performs the actions and which results in the achievement of . The listed actions also ensure that all goals of the other agents will be achieved.
time step: | 0 | 1 | 2 | 3 | 4 |
---|---|---|---|---|---|
’s actions: | |||||
’s actions: | |||||
’s actions: |
So far, costs of resources are not considered in the synthesis.
2.1 Resource Cost-Optimal Strategy Synthesis
We will now extend MRA model checking such that the outcome is a resource cost-optimal winning strategy. For this, we first define the resource costs of paths.
Definition 10 (Resource Costs of Paths).
Let be an MRA, and let be the latest deadline. The cost of a path with regard to a resource is defined as
and the cost of a path with regard to all resources in is defined as
where denotes the -th state of .
Hence, the resource costs of a path is the sum of prices of the resources that are ever allocated by some agent in the states along . Conversely, resources that are never allocated do not contribute to the costs. We consider MRAs that run until all goals have been achieved where each goal has a deadline. Thus, in the calculation of the costs of a path it is sufficient to only take the -prefix of the path into account where is the latest deadline. Based on path costs we can now define what a resource cost-optimal winning strategy is.
Definition 11 (Resource Cost-Optimal Strategy).
Let be an MRA, let be its initial state, and let be a joint strategy. Then is a cost-optimal winning strategy with regard to resources if the following conditions hold:
-
1.
(winning) -
2.
(resource cost-optimal)
Hence, a winning strategy is cost-optimal with regard to resources if following this strategy results in a path whose costs are less or equal to the costs of the paths resulting from any other winning strategy . We denote the corresponding cost-optimal strategy synthesis problem by .
The actions listed in Table 2 characterise a resource cost-optimal winning strategy for the example system . The strategy makes use of the resources and whereas the resources and are never used. According to the price function of , the cost of the path resulting from this strategy is 7. In contrast, the cost of the path resulting from the non-optimal winning strategy from Table 1 is 10. This strategy additionally uses the resource .
time step: | 0 | 1 | 2 | 3 | 4 |
---|---|---|---|---|---|
’s actions: | |||||
’s actions: | |||||
’s actions: |
Assuming that our example MRA models a resource allocation problem in distributed computing, the resource cost-optimal strategy gives us an indication which types and amounts of resources actually need to be purchased for an agent-based solution that guarantees the achievement of all resource goals. So far, we assumed that the number of agents in the system is fixed and that goals are pre-assigned to agents. In the following we will relax this condition and introduce a generalised cost-optimal strategy synthesis that also considers costs for agents.
2.2 MRA Cost-Optimal Strategy Synthesis
For our generalised cost-optimal strategy synthesis we define agent costs of paths.
Definition 12 (Agent Costs of Paths).
Let be an MRA, and let be the latest deadline. Moreover, let be the price of each agent. The cost of a path with regard to an agent is defined as
and the cost of a path with regard to all agents in is defined as
where denotes the -th state of .
Hence, the agent costs of a path is the sum of the prices of the agents that ever allocate some resources along the path. We can now straightforwardly define the overall costs of paths with regard to resources and agents.
Definition 13 (MRA Costs of Paths).
Let be an MRA, and let be the latest deadline. Moreover, let be the price of each agent. The cost of a path with regard to is defined as
This allows us to consider a generalised scenario where the goals to be achieved are not assigned to particular agents.
Definition 14 (MRA Model Checking of General Goal Properties).
Let be an MRA where the special set consists of goals that are not associated with particular agents. Then the strategic MRA model checking problem is inductively defined as follows:
where is defined according to Definition 9.
Thus, model checking of general goal properties searches for a strategy that ensures that each goal will be achieved by some agent. In this context, a cost-optimal winning strategy is one that minimises the combined costs of required resources and agents.
Definition 15 (MRA Cost-Optimal Strategy).
Let be an MRA where the special set consists of goals that are not associated with particular agents. Moreover, let be the initial state of , let be the price of each agent, and let be a joint strategy. Then is a cost-optimal winning strategy with regard to if the following conditions hold:
-
1.
(winning) -
2.
(MRA cost-optimal)
Hence, a winning strategy is MRA cost-optimal if following this strategy results in a path whose combined resource and agent costs are less or equal to the costs of the paths resulting from any other winning strategy . We denote the corresponding cost-optimal strategy synthesis problem by .
Let us now consider a slight variant of our example system where the goals are no longer pre-assigned to agents. The actions listed in Table 3 characterise an MRA cost-optimal winning strategy for this variant. The resource costs are still the same as in the strategy depicted in Table 2. But the MRA cost-optimal strategy requires just two instead of three agents for achieving all goals. The role of agent is insignificant here. Thus, the strategy indicates that only two agents need to be ‘purchased’.
time step: | 0 | 1 | 2 | 3 | 4 |
---|---|---|---|---|---|
’s actions: | |||||
’s actions: | |||||
’s actions: |
3 Reduction of Cost-Optimal Strategy Synthesis to Weighted Max-SAT
In this section we show how cost-optimal strategy synthesis can be reduced to weighted maximum satisfiability solving.
3.1 Weighted Maximum Satisfiability Problem
The weighted maximum satisfiability problem is a generalisation of the Boolean satisfiability problem of propositional logic formulas in conjunctive normal form.
Definition 16 (Conjunctive Normal Form (CNF)).
Let be a set of Boolean variables. A propositional logic formula over in conjunctive normal form is a conjunction of clauses where each clause is a disjunction of literals , and a literal is either a variable or its negation .
For CNF formulas the satisfiability problem is defined as follows:
Definition 17 (Boolean Satisfiability Problem).
Let over be a formula in conjunctive normal form. The Boolean satisfiability problem with regard to is the problem of determining whether there exists a truth assignment that makes all clauses of true. Boolean satisfiability can be also defined as a function
where is the set of all possible truth assignments over .
Weighted conjunctive normal form extends CNF by assigning non-negative weights to each clause of a formula.
Definition 18 (Weighted Conjunctive Normal Form (WCNF)).
Let be a set of Boolean variables. A propositional logic formula over in weighted conjunctive normal form is a conjunction of weighted clauses where is a standard clause and is its weight. A clause with is called a soft clause and a clause is called a hard clause.
For the sake of simplicity we typically just write for hard clauses . Each WCNF formula can be written as a conjunction where are the hard clauses and are the soft clauses of . For WCNF formulas the following optimisation problem has been defined:
Definition 19 (Weighted Maximum Satisfiability Problem).
Let over be a propositional logic formula in weighted conjunctive normal form where are the hard clauses and are the soft clauses. The weighted maximum satisfiability problem with regard to is the problem of finding a truth assignment that maximises
subject to the condition that holds. Weighted maximum satisfiability can be defined as a function
where is the set of all possible truth assignments over .
Hence, the solution of the weighted maximum satisfiability problem with regard to is a truth assignment that maximises the sum of weights of the satisfied soft clauses, under the condition that all hard clauses are satisfied. If no such assignment exists, then the weighted maximum satisfiability problem has no solution. We will now show how cost-optimal strategy synthesis problems can be encoded as weighted Max-SAT problems.
3.2 Max-SAT Encoding of Resource Cost-Optimal Strategy Synthesis
In [24] we showed how to encode standard MRA strategy synthesis problems as propositional logic formulas such that the following equivalence holds:
Hence, the synthesis of winning strategies can be performed via satisfiability solving. A further property of our encoding is that each truth assignment that satisfies characterises a winning strategy . The overall encoding is a conjunction where encodes that all agents must follow a uniform strategy and adhere to the protocol, encodes the feasible paths of , and restricts the paths to those that satisfy all goals in . In [24] we only considered simple goals, one for each agent and with regard to a single type of resource. Thus, for the more complex goals that we focus on in this work, we introduce the following extended encoding of goals:
Definition 20 (Encoding of Goals).
Let be an MRA. Then the agent goal property is encoded in propositional logic as
Let be an MRA. Then the general goal property is encoded in propositional logic as
where resp. is assumed to be the tuple , and encodes that resource is allocated by agent at time step .
The definition of the sub encoding can be found in [24].
In order to enable the synthesis of resource cost-optimal winning strategies, we further extend our encoding. Solving this optimisation problem involves to find a strategy that minimises the costs of the resources that are actually used. We can equivalently search for a strategy that maximises the costs of the unused resources, which makes the problem compatible with Max-SAT. The first part of the extension introduces auxiliary variables that encode that a resource is never used.
Definition 21 (Auxiliary Encoding – Resource Costs).
Let be an MRA and let be the latest deadline. Then the auxiliary encoding for resource cost optimisation is
where with are the auxiliary variables introduced for the encoding, and encodes that resource is unallocated at time step .
If we conjunctively add the auxiliary encoding to the overall encoding of a strategy synthesis problem, this will not affect the satisfiability. But now we have that a truth assignment will set an auxiliary variable to true if and only if characterises a strategy and the resource will be never used when the strategy is followed. Hence, is a single-variable encoding of never being used. We can now utilise each as a unit clause in the optimisation extension of our encoding:
Definition 22 (Resource Costs Optimisation Encoding).
Let be an MRA. Then the resource costs optimisation encoding is
where with are the Boolean variables introduced in the auxiliary encoding for resource cost optimisation.
Hence, consists of soft clauses , one for each , where encodes that is never used and (the price of the resource ) is the weight of the clause. The overall encoding of the problem of synthesising a resource cost-optimal strategy is where the sub formula consists of hard clauses only. Solving max-sat will return a truth assignment that satisfies all hard clauses and maximises the sum of weights of satisfied soft clauses, if such an assignment exists. Such an assignment characterises a winning strategy that is resource cost-optimal.
Theorem 1 (Resource Cost-Optimal Strategy Synthesis).
Let be a resource cost-optimal strategy synthesis problem and let be its WCNF encoding. Then the following properties hold:
-
1.
If max-sat, then there does not exist a joint winning strategy for achieving all goals in with the resources in .
-
2.
If max-sat, then characterises a resource cost-optimal winning strategy .
Proof.
We have that
where
are the hard clauses and
are the soft clauses of the encoding.
Moreover, the WCNF formula is defined over a set of Boolean variables , and is the set of all possible truth assignments over .
Proof of Property 1:
max-sat implies that sat 0 (Definition 19). The sub formula
only introduces auxiliary variables and sets them equivalent to resource properties (Definition 21). Hence, cannot be the cause of unsatisfiability and we can conclude that sat 0. This implies that does not hold (shown in [24]). We can now immediately conclude that there does not exist a joint winning strategy to achieve .
Proof of Property 2:
max-sat implies that
(Definition 19). Hence, the assignment satisfies all hard clauses of . In particular, 1. We can conclude that holds, and that characterises a corresponding winning strategy (shown in [24]).
Now we still need to prove that is cost-optimal with regard to the use of resources.
According to the definition of max-sat, out of all truth assignments that satisfy all hard clauses, is the assignment that maximises the sum of weights of the satisfied soft clauses. Let be the sum of weights of the soft clauses satisfied by . Then for all other truth assignments that satisfy all hard clauses we have that (Definition 19).
Conversely, let be the sum of weights of the soft clauses not satisfied by . Then for all other truth assignments that satisfy all hard clauses we have that .
Each soft clause is of the form .
For a resource , 1 implies that 1 (Definition 21).
The hard clauses of the encoding, , ensure that 1 if and only if characterises a joint strategy that results in a path where resource is never allocated by any agent at all time steps until where is the latest deadline (shown in [24]).
We can conclude that characterises a strategy that results in a -bounded path where are the cumulative costs of the resources that are never used, and are the cumulative costs of the resources that are actually used. Thus, (Definition 10).
Based on a similar argumentation, we can show that each alternative truth assignment that satisfies all hard clauses characterises a path
with cumulative costs of resources .
We already argued that for all alternative assignments . Hence, we can conclude that characterises a joint winning strategy that is resource cost-optimal (Definition 11).
This theorem can be utilised as follows: Several practically relevant resource allocation problems in distributed computing can be modelled as an MRA where the agents represent the computers of the distributed system. While it is of primary importance that the system will achieve all goals, it is of secondary importance that the costs of the resources that need to be purchased are as low as possible. In the MRA model of the distributed system, we can initialise as a saturated set that contains a resource for each type of each resource composition of each goal. The resource cost-optimal strategy synthesis problem with regard to can then be encoded in propositional logic. Max-SAT-based solving of the encoded problem will not only yield an optimal strategy, it will also indicate which resources of the model are actually dispensable. We can safely remove these resources from , and it is still guaranteed that all goals can be achieved. For the modelled distributed system only the indispensable resources need to be purchased. Hence, our Max-SAT-based technique can be used to synthesize cost-optimal MRA solutions to resource allocation problems.
In the next sub section we show that our Max-SAT approach can be straightforwardly extended to the optimisation of systems where also agents need to be purchased and where goals can be assigned to arbitrary agents.
3.3 Max-SAT Encoding of MRA Cost-Optimal Strategy Synthesis
For the Max-SAT encoding of MRA cost-optimal strategy synthesis problems we need to introduce further auxiliary variables, one for each agent in the system.
Definition 23 (Auxiliary Encoding – Agent Costs).
Let be an MRA and let be the latest deadline. Then the auxiliary encoding for agent cost optimisation is
where with are the auxiliary variables introduced for the encoding, and encodes that resource is allocated by agent at time step .
Hence, each encodes that agent never allocates any resource. We now utilise each as a unit clause in the optimisation of agent costs encoding.
Definition 24 (Agent Costs Optimisation Encoding).
Let be an MRA and let be the price of each agent. Then the agent costs optimisation encoding is
where with are the Boolean variables introduced in the auxiliary encoding for agent cost optimisation.
Hence, consists of soft clauses , one for each , where encodes that is never used and is the weight of the clause. The overall encoding of the problem of synthesising an MRA cost-optimal strategy is . Solving max-sat will return a truth assignment that satisfies all hard clauses and maximises the sum of weights of satisfied soft clauses, if such an assignment exists. Such an assignment characterises a winning strategy that is MRA cost-optimal.
Theorem 2 (MRA Cost-Optimal Strategy Synthesis).
Let be an MRA cost-optimal strategy synthesis problem and let be its WCNF encoding. Then the following properties hold:
-
1.
If max-sat, then there does not exist a joint winning strategy for achieving all goals in with the resources and agents .
-
2.
If max-sat, then characterises an MRA cost-optimal winning strategy .
The proof of Theorem 2 is analogous to the proof of Theorem 1.
Thus, given a set of resource allocation goals this theorem can be exploited to synthesise a winning strategy that does not only minimise the costs of required resources but also results in an optimal assignment of goals to agents. Such an optimal assignment will ensure that the resource allocation problem associated with will be solved with a cost-minimal amount of agents and resources.
4 Implementation and Experiments
We developed the tool SATMAS111available at https://github.com/TuksModelChecking/Satmas/tree/nur_optimization that implements our synthesis approach in Python. SATMAS takes a specification of a multi-agent system for resource allocation as an input. The output is a resource cost-optimal winning strategy and a corresponding cost-optimal set of required resources if existent. Otherwise, the tool outputs ‘no winning strategy exists’. SATMAS encodes the synthesis problem in propositional logic. The maximum-satisfiability solver OPEN-WBO [18] is employed to determine a truth assignment for the encoding that satisfies all hard clauses and maximises the sum of weights of the satisfied soft clauses. From such an assignment the corresponding cost-optimal strategy and the cost-optimal set of required resources can be immediately derived. The extension of our tool to the synthesis of strategies that are additionally optimal with regard to agent costs is in preparation.
In experiments we were able to synthesise resource cost-optimal strategies for MRAs consisting of ten agents and six different types of resources in less than a minute. Table 4 shows our experimental results. The Scenario column indicates the number of agents and the number of resource types in the MRA. As a price function we used . For simplicity, we fixed the number of goals of each agent as well as the period of each goal to one. The resource composition of each goal was randomly selected under the constraint that the total number of resource types associated with a goal is from the interval . Moreover, the deadline of each goal was randomly selected from the interval . The column Costs indicates the total costs of resources associated with the synthesised cost-optimal winning strategy. The column Time shows the overall time that the tool spent on encoding and satisfiability solving. The experiments were conducted on a 2.6 GHz Intel Core i7 system with 16 GB.
Scenario | Costs | Time |
---|---|---|
, , , | 3 | |
, , , | 6 | |
, , , | 6 | |
, , , | 15 | |
, , , | 10 |
Thus, for our randomly generated MRA consisting of ten agents and six types of resources there exists a cost-optimal winning strategy that involves resource costs of 10. We ran the synthesis again for the same MRA but with having the optimisation disabled. This resulted in a winning strategy with resource costs of 21. Hence, our optimisation approach can enable significant savings in terms of resource costs.
5 Related Work
Model checking and strategy synthesis for multi-agent systems has been originally proposed in [2]. The authors introduce the alternating-time logics ATL and ATL∗, which are logics for reasoning about strategic abilities of agents. The general ATL model checking problem is PTIME-complete whereas the ATL∗ model checking problem is 2EXPTIME-complete. Thus, while for ATL model checking BDD-based tools like MCMAS [17] and MOCHA [3] exist, ATL∗ has been rather considered on a theoretical level [23]. An existing tool for synthesising ATL strategies is SMC [22], which operates on a BDD model of the multi-agent system to be verified. It iteratively guesses a strategy, fixes the strategy in the model and checks whether it is a winning strategy, which reduces ATL model checking to CTL model checking [8] in each iteration. The techniques and tools mentioned above focus on synthesising winning strategies for general multi-agent systems and alternating-time properties. In contrast, our approach focusses on systems and properties with regard to resource allocation problems [20]. Moreover, we aim at synthesising winning strategies that are additionally optimal in terms of costs for resources and agents.
Our approach is related to strategy synthesis for systems with combined qualitative and quantitative objectives [7, 6, 13, 12, 4]. In [7, 6] parity games are studied where the objectives combine qualitative -regular requirements and quantitative energy usage requirements. The authors of [13, 12] introduce multi-agent systems in which agents have a primary objective that is qualitative and a secondary objective that is quantitative. In [12] it is shown that if the qualitative objectives are LTL formulas then the problem is 2EXPTIME-complete. Another framework for reasoning about systems where agents have both qualitative and quantitative objectives is proposed in [4]. The authors augment multi-agent systems with transition pay-offs and introduce a quantitative extension of the logic ATL∗. This allows to model check whether agents have the strategic abilities to achieve quantitative pay-off objectives and at the same time qualitative state-based objectives. Our approach is similar to the above in the sense that we consider systems where resource allocation goals are qualitative objectives and cost-optimality is a quantitative objective. However, in [13, 12, 4] it is assumed that each agent has individual quantitative objectives. Hence, these works aim at synthesising Nash equilibrium strategies [21] rather than overall optimal strategies. Moreover, the above works are predominantly of theoretical nature and focus on establishing general complexity results. In contrast, our work considers a more specific resource allocation scenario and we propose a practical approach to solve the synthesis problem, which is based on a Boolean encoding and on maximum satisfiability solving (Max-SAT) [14].
To the best of our knowledge, our technique is the first Max-SAT-based approach to the synthesis of cost-optimal strategies for multi-agent systems. In related fields, Max-SAT has been employed to find optimal coalitions of agents for solving network security problems [16], to synthesise reactive controllers of autonomous systems [10], and to model check quantitative hyper-properties [11].
6 Conclusion and Outlook
In this paper, we presented a Max-SAT-based technique for synthesising winning strategies for multi-agent systems for resource allocation. The synthesised strategies do not only ensure that all resource allocation goals will be achieved, they also result in a cost-optimal use of resources and agents. Our approach can be utilised to model resource allocation problems in distributed systems and to determine optimal agent-based solutions. We showed that from a cost-optimal strategy the system components that actually need to be purchased can be derived. Our technique is based on a propositional logic encoding of the synthesis problem. A truth assignment that maximises the sum of weights of satisfied clauses of the encoding characterises an optimal strategy. This enables us to exploit the power of state-of-the-art Max-SAT tools to solve the synthesis problem. We showed that optimal winning strategies synthesised via Max-SAT can involve significant cost savings in comparison to bare winning strategies synthesised via standard SAT.
As future work we plan to consider enhanced goal properties allowing for goal-dependencies (with regard to the order in which goals have to be achieved) and for periodic goals. For the latter, we intend to combine our synthesis technique with -induction [25] in order to handle strategies that result in a looped run of the system. While our MRAs are an abstract concept for representing resource allocation problems, they can be easily adjusted to model concrete problems in distributed computing. Thus, we plan to apply our approach to real-world scenarios in the fields of distributed operating systems [15], wireless sensor networks [19] or clouds [5]. A further direction of future work is to tune the Max-SAT solver by employing heuristics that exploit the particular structure of our encodings of cost-optimal strategy synthesis problems.
References
- [1]
- [2] Rajeev Alur, Thomas A Henzinger & Orna Kupferman (2002): Alternating-time temporal logic. Journal of the ACM (JACM) 49(5), pp. 672–713, 10.1145/585265.585270.
- [3] Rajeev Alur, Thomas A Henzinger, Freddy YC Mang, Shaz Qadeer, Sriram K Rajamani & Serdar Tasiran (1998): MOCHA: Modularity in model checking. In: CAV, Springer, pp. 521–525, 10.1007/BFb0028774.
- [4] Nils Bulling & Valentin Goranko (2022): Combining quantitative and qualitative reasoning in concurrent multi-player games. Autonomous Agents and Multi-Agent Systems 36(1), pp. 1–33, 10.1007/s10458-021-09531-9.
- [5] Fangzhe Chang, Jennifer Ren & Ramesh Viswanathan (2010): Optimal resource allocation in clouds. In: 2010 IEEE 3rd International Conference on Cloud Computing, IEEE, pp. 418–425, 10.1109/CLOUD.2010.38.
- [6] Krishnendu Chatterjee & Laurent Doyen (2012): Energy parity games. Theoretical Computer Science 458, pp. 49–60, 10.1016/j.tcs.2012.07.038.
- [7] Krishnendu Chatterjee, Thomas A Henzinger & Marcin Jurdzinski (2005): Mean-payoff parity games. In: 20th Annual IEEE Symposium on Logic in Computer Science (LICS’05), IEEE, pp. 178–187, 10.1109/LICS.2005.26.
- [8] Alessandro Cimatti, Edmund Clarke, Fausto Giunchiglia & Marco Roveri (2000): NuSMV: a new symbolic model checker. STTT 2(4), pp. 410–425, 10.1007/s100090050046.
- [9] Riccardo De Masellis, Valentin Goranko, Stefan Gruner & Nils Timm (2018): Generalising the Dining Philosophers problem: competitive dynamic resource allocation in multi-agent systems. In: European Conference on Multi-Agent Systems, Springer, pp. 30–47, 10.1007/978-3-030-14174-5_3.
- [10] Rayna Dimitrova, Mahsa Ghasemi & Ufuk Topcu (2020): Reactive synthesis with maximum realizability of linear temporal logic specifications. Acta Informatica 57(1), pp. 107–135, 10.1007/s00236-019-00348-4.
- [11] Bernd Finkbeiner, Christopher Hahn & Hazem Torfah (2018): Model checking quantitative hyperproperties. In: International Conference on Computer Aided Verification, Springer, pp. 144–163, 10.1007/978-3-319-96145-3_8.
- [12] Julian Gutierrez, Aniello Murano, Giuseppe Perelli, Sasha Rubin, Thomas Steeples & Michael Wooldridge (2021): Equilibria for games with combined qualitative and quantitative objectives. Acta Informatica 58(6), pp. 585–610, 10.1007/s00236-020-00385-4.
- [13] Julian Gutierrez, Aniello Murano, Giuseppe Perelli, Sasha Rubin & Michael Wooldridge (2017): Nash equilibria in concurrent games with lexicographic preferences. 10.24963/ijcai.2017/148.
- [14] Pierre Hansen & Brigitte Jaumard (1990): Algorithms for the maximum satisfiability problem. Computing 44(4), pp. 279–303, 10.1007/BF02241270.
- [15] James F. Kurose & Rahul Simha (1989): A microeconomic approach to optimal resource allocation in distributed computer systems. IEEE Transactions on computers 38(5), pp. 705–717, 10.1109/12.24272.
- [16] Xiaojuan Liao (2014): Maximum Satisfiability Approach to Game Theory and Network Security. Ph.D. thesis, Kyushu University.
- [17] Alessio Lomuscio, Hongyang Qu & Franco Raimondi (2017): MCMAS: an open-source model checker for the verification of multi-agent systems. STTT 19(1), pp. 9–30, 10.1007/s10009-015-0378-x.
- [18] Ruben Martins, Norbert Manthey, Miguel Terra-Neves, Vasco Manquinho & Inês Lynce (2021): Open-WBO@ MaxSAT Evaluation 2020. MaxSAT Evaluation 2020, p. 24.
- [19] Amrit Mukherjee, Pratik Goswami, Ziwei Yan, Lixia Yang & Joel JPC Rodrigues (2019): ADAI and adaptive PSO-based resource allocation for wireless sensor networks. IEEE Access 7, pp. 131163–131171, 10.1109/ACCESS.2019.2940821.
- [20] Arun Sukumaran Nair, Tareq Hossen, Mitch Campion, Daisy Flora Selvaraj, Neena Goveas, Naima Kaabouch & Prakash Ranganathan (2018): Multi-agent systems for resource allocation and scheduling in a smart grid. Technology and Economics of Smart Grids and Sustainable Energy 3(1), pp. 1–15, 10.1007/s40866-018-0052-y.
- [21] John F Nash Jr (1950): Equilibrium points in n-person games. Proceedings of the national academy of sciences 36(1), pp. 48–49, 10.1073/pnas.36.1.48.
- [22] Jerzy Pilecki, Marek A Bednarczyk & Wojciech Jamroga (2017): SMC: synthesis of uniform strategies and verification of strategic ability for multi-agent systems. Journal of Logic and Computation 27(7), pp. 1871–1895, 10.1093/logcom/exw032.
- [23] Sven Schewe (2008): ATL* satisfiability is 2EXPTIME-complete. In: International colloquium on automata, languages, and programming, Springer, pp. 373–385, 10.1007/978-3-540-70583-3_31.
- [24] Nils Timm & Josua Botha (2021): Model Checking and Strategy Synthesis for Multi-agent Systems for Resource Allocation. In: Brazilian Symposium on Formal Methods, Springer, pp. 53–69, 10.1007/978-3-030-92137-8_4.
- [25] Nils Timm, Stefan Gruner, Madoda Nxumalo & Josua Botha (2020): Model checking safety and liveness via k-induction and witness refinement with constraint generation. Science of Computer Programming 200, p. 102532, 10.1016/j.scico.2020.102532.