The DDP algorithm is split into three main functions for clarity. The first function, named
Communicate(detailed in Algorithm7), shows how the agents divide the parts of the original DP algorithm (see Section2.4.2) up between themselves and how the agents decide what to communicate to the others. The second function, nameddecodeDDP(detailed in Algorithm9), shows how each agent takes the communicated information from every other agent and uses this information to update its own knowledge base. Finally the fullDDPalgorithm is detailed in Algorithm 10. Through the DDP algorithm, the v table stores the values of the original characteristic function game, the values of the superadditive cover is stored in the f2 table, while thef1table stores the partition of each coalition that maximises its superadditive cover.
In more detail3, theCommunicatefunction of Algorithm7describes to each agentiwhat information it should communicate to the others (in the vector Γ), regarding the coalitions in
3
The following description does not take into account the issue of communication costs. This issue is dealt with in Section5.3.
Algorithm 8: The Single sized variant of the Distributed Coalition Generation (DCG) method.
1: functionDCGSingleSize(inti, s, n, bal)
2: Input:hi, s, n, bali(1≤i≤n); whereithe agent ID,sis the size of the coalitions,nis the number of agents, andbalis the balance pointer.
3: Ouput:hCVi,si; whereCVi,sis the ordered set of coalitions of sizesassigned to agenti, denotedCVi,s=hC1, C2, ..., Cki.
4: begin
5: ifs < nthen 6: intcount := 1;
7: booleancompleted := f alse;
8: intmsd := 0;
9: int[]t := h0,0, ..., n−si; // Get the first canonical representative IA
10: while(complete==f alse)do
11: p := π(t);
12: r := (n×p)/s;
13: if(bal≤i < bal+r)or(bal+r > nand1≤i < bal+r−n)then
14: C(i, t) =Ccount ∈CVi,s; // Add the coalition to the set of coalitions to return
15: count+ +;
16: end if
17: bal := (bal+r) modn;
18: t=build(t); // Get the next canonical representative IA
19: end while
20: else if(s==n)and(i==bal)then
21: CVi,n={N};
22: end if
23: end
CVi that are of sizes. These coalitions are found using theDCGSingleSizefunction, which is a single sized variant of the DCG algorithm displayed in algorithm8(that uses the function
buildfrom the previous chapter).
In the Communicatefunction, ifs= 1then each agent should simply communicate the value of the singleton coalition of itself and represent this coalition explicitly within theSCG representation (lines 5 to 7). If s > 1 then the Communicate function assigns each agent a coalition value calculation share via the DCGSingleSizefunction. For each coalition of sizesini’s coalition value calculation share, agentichecks if the value ofCadds any synergy for the agents of C. If thereis some additional synergy found (lines 12 to 15) then f1 is set equal toCandf2 is set equal tov(C), indicating that the agents ofC cannotgain any payoff from splitting into smaller coalitions, meaningC should be in the SCG representation. In this situation the agentishould add the value ofv(C)toΓi. Alternatively, if there isnoadditional synergy found (lines 16 to 18)f1is set equal toC∗andf2is set equal tov(C∗), indicating that the agents ofCcan maximise their value by splitting into the smaller coalitions detailed in the setC∗ ={C1∗, ..., Ck∗}, where:
1. Sk
p=1Cp∗=C
Algorithm 9:An function showing how the agents should decode the information com- municated to them within the DDP algorithm.
1: functiondecodeDDP(i, s, n, bal)
2: Input:hi, s, n, bali; whereiis the agent ID,sthe size of the coalitions to evaluate,nis the total number of agents andbalthe variable used to balance the agents’ coalition value calculation shares.
3: ifs== 1then
4: forj:= 1tonwherej6=ido
5: setf1[{j}] :={j}andf2[{j}] :=v(Γj0); // Set the value of the singleton coalitions to the communicated values
6: add({j}, v({j}))toW; // Add all the communicated coalitions of size 1 to the SCG
7: end for
8: else
9: int[n]counter:= [0, ...,0];
10: intm:= 0;
11: tm :=h0,0, ..., n−si; // Generate the first canonical representative IA
12: whiletm6=nulldo
13: p:=π(tm); // Find the period of the IA
14: r:= (n∗p)/s; // Find the number of agents to use the IA
15: foreachj∈N wherej 6=ido
16: ifbal≤j < bal+ror(bal+r > nand1≤j < bal+r−n)then
17: C:=C(j, tm); // Get the coalition forjifjwas one of the nextragents
18: ifΓjcounterj−1 ==v(C)then
19: f1[C] := [C]andf2[C] :=v(C); // Parsej’s communicated data correctly
20: add(C, v(C))toW; // AddCto the SCG
21: else
22: f1[C] := Γjcounterj−1 andf2[C] :=f2[v(Γ
j
counterj−1)]; // Parsej’s
communicated data correctly
23: end if
24: counterj−1+ +; // Increment agentj’s counter
25: end if
26: end for
27: bal:=bal+r; // Increment pointer 28: ifbal > nthen
29: bal:=bal−n; // Correct the pointer
30: end if
31: tm=build(tm); // Get next canonical representative IA
32: end while
33: end if
In this situation the agentishould add the collection of coalitionsC∗toΓi. TheCommunicate
function then returnsΓi for agentito communicate. Later in Section5.3, it is shown how the cost of communicatingΓcan be significantly reduced.
Now given the communicated data on all coalitions of size s, in the form Γj for all j ∈ N, each agentineeds a method to decode the data, detailed in the decodeDDP function of Algorithm 9. Ifs = 1then each agent knows that only the value of each singleton coalition was communicated, which is straightforward to decode (lines 4 to 7). Ifs >1then this is more
Algorithm 10:Agenti’s section of the decentralised DDP algorithm to find a stable char- acteristic function game outcome given distributed knowledge on the coalition values.
1: functionDDP(i, N)
2: Input:hi, Ni; whereiis the agent ID andN is the set of agent IDs.
3: Output: hCS∗, xkiwhereCS∗is the optimal coalition structure andxkis a weak least core+stable payoff vector.
4: intbal:= 1;
5: setW :={};
6: for ints:= 1tondo
7: inttempBal:=bal;
8: sendCommunicate(i, s, n, bal)to all agents;
9: waituntilΓj received from all agentsj∈N\{i};
10: decodeDDP(i, s, n, tempBal); // Decode all data received from the other agents
11: end for
12: SetCS∗ :={N};
13: Booleanedits:=true;
14: whileedits==truedo
15: edits:=f alse; 16: foreachC ∈CS∗do
17: iff1[C]6=Cthen
18: setCS∗:= (CS∗\{C})∪ {f1[C]}; // ReplaceCin the coalition structure, with its best two-set partition
19: edits:=true; // This is set to true so the agents will look again throughCS∗to see if any other coalitions inCS∗can be broken down further into two-set partitions
20: end if
21: end for
22: end while
23: xi:=StablePayoff(CS∗);
24: Collaboratively chooseanxkto implement;
25: returnhCS∗, xki;
26: end;
complicated to decode as: (i) each agent may have calculated the value of multiple coalitions; (ii) each agent may have searched for the optimal two-set partition of multiple coalitions; and (iii) not all agents may have used the same increment arrayst’s to generate their coalitions (due to the use of thebalpointer in theDCGSingleSizefunction).
Whens >2, thedecodeDDPproceeds by using every canonical representative increment array (lines 11 and 31), to generate the coalitions that the agentsN\{i}calculated the value for (line 17). As not all of the agents may have used every increment array due to the repeating sequences (line 13 and 14), the following are used: (a) thebalpointer (line 16 and 27 to 29); (b) thervalue (line 14); and (c) thecounterarray (line 9, 18 and 22). Both (a) and (b) are used for the same reasons as in theDCGalgorithm; to work out which agents use which increment array, while (c) is used so the agent can keep track of what position of eachΓj is to be used next.
When agenti, using thedecodeDDPfunction, finds that another agent generated a coalition C(at line 17), ififinds the next element ofΓjto be a coalition value, then this indicates to agent ithatC is more valuable than any possible partition ofC. To indicate this synergy: f1[C]is
set to equalC;f2[C]is set equal tov(C) to indicate the value of this synergy; and(C, v(C)) is to added to the list of coalitions explicitly represented in the SCG representation. If the next element ofΓjis instead set to a partition ofCthat has the maximum value, then (just like the DP algorithm [138]): f1[C]is set equal to this partition; andf2is set equal to the partition’s value. Once all possible increment arrays have been generated, then the decoding of the different data sent by the agents is complete.
Finally, the full DDP algorithm can be introduced in Algorithm10, which takes an agent IDifrom the setN as input and outputs a characteristic function game outcome of an optimal coalition structure CS∗ (representing the coalition structure that maximises the superadditive cover of the grand coalition) and a weak least core+stable payoff vectorxk.
TheDDPalgorithm begins with the agents sharing the required coalition values and/or coali- tion partitions and decoding this communication for every potential size of a coalition (lines 6 to 11). The same pointer value is used for both theCommunicateanddecodeDDPfunctions to keep them synchronised. Next all the agents find an optimal coalition structure using the method first detailed in the DP algorithm of [138] (lines 16 to 21). Lastly all the agents find a stable payoff vector using the linear program detailed in theStablePayofffunction described in Section5.2.1, which only includes the coalitions in the SCG representation as constraints. To- gether the agents should choose the final single payoff vector in accordance to some agreed criteria as the least-weak-CS core+may contain multiple different payoff vectors. For example, the payoff vector chosen could be: from an agent, picked according to some form of lottery; or the most commonly suggested payoff vector; or the one that satisfies the majority of agents to some degree; or the one that has the smallest deficit vector4. In the next section, modifications to the DDP algorithm are detailed that significantly reduce the communication costs.