{'fraction_non_alphanumeric': 0.04469851640125221, 'fraction_numerical': 0.008738260514495713, 'mean_word_length': 4.438341968911917, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Shapley Q-value: A Local Reward Approach to Solve Global Reward Games

Cooperative game is a critical research area in multi-agent reinforcement learning (MARL). Global reward game is a subclass of cooperative games, where all agents aim to maximize cumulative global rewards. Credit assignment is an important problem studied in the global reward game. Most of works stand by the view of non-cooperative-game theoretical framework with the shared reward approach, i.e., each agent being assigned a shared global reward directly. This, however, may give each agent an inaccurate feedback on its contribution to the group. In this paper, we introduce a cooperative-game theoretical framework and extend it to the infinite-horizon case. We show that our proposed framework is a superset of the global reward game. Based on this framework, we propose a local reward approach called Shapley Q-value that can distribute the cumulative global rewards fairly, reflecting each agent's own contribution in contrast to the shared reward approach. Moreover, we derive an MARL algorithm called Shapley Q-value policy gradient (SQPG), using Shapley Q-value as critics. We evaluate SQPG on Cooperative Navigation, Prey-and-Predator and Traffic Junction, compared with MADDPG, COMA, Independent A2C and Independent DDPG. In the experiments, SQPG shows the better performance than the baselines. In addition, we also plot the Shapley Q-value and validate the property of fairly distributing the global rewards.


Introduction
Cooperative game is a critical research area in multi-agent reinforcement learning (MARL). Many real-life tasks can be modeled as cooperative games, e.g., the coordination of autonomous vehicles [1], autonomous distributed logistics [2] and search-and-rescue robots [3,4]. Global reward game [5] is a subclass of cooperative games where agents aim to maximize cumulative global rewards. In a global reward game, credit assignment is an important problem, which targets on finding a method to distribute the global rewards. There are two categories of approaches to solve out this problem, namely shared reward approach (also known as shared reward game or fully cooperative game) [6,7,8] and local reward approach [9]. The shared reward approach directly assigns the global rewards to all agents. The local reward approach, on the other hand, distributes the global rewards according to each agent's contribution, and turns out to have superior performances for many tasks [10,11].
Whatever approach is adopted, a remaining open question is whether there is an underlying theory to explain the credit assignment. Conventionally, a global reward game is built upon non-cooperative game theory, which primarily aims to find Nash equilibrium as the stable solution [12,13]. This formulation can be extended to a dynamic environment with infinite horizons via stochastic game [14]. However, Nash equilibrium focuses on individual rewards and has no explicit incentives for cooperation. As a result, the shared reward function has to be utilized to force cooperation, which can be used as a possible explanation to the shared reward approach, but not the local reward approach.
In our work, we introduce and investigate cooperative game theory (or coalitional game theory) [15] in which the local reward approach becomes rationalized. In cooperative game theory, the objective is dividing coalitions and binding agreements among agents who belong to the same coalition. We focus on the convex game (CG) which is a typical game in cooperative game theory featuring the existence of a stable coalition structure with an efficient payoff distribution scheme, i.e., a local reward approach, called core. This payoff distribution is equivalent to credit assignment, thereby the core rationalizes and well explains the local reward approach [16].
Referring to the concepts from stochastic games [14], we extend CG to infinite-horizon scenarios, namely extended CG (ECG). In addition, we show that a global reward game is equivalent to an ECG with a grand coalition and an efficient payoff distribution scheme. Furthermore, we propose Shapley Q-value (i.e., an efficient payoff distribution scheme), extending Shapley value for credit assignment in an ECG with a grand coalition. Therefore, it is apparent that Shapley Q-value works in a global reward game. Finally, we derive an algorithm called Shapley Q-value policy gradient (SQPG) according to the actor-critic framework [17] to learn decentralized policies with centralized critics (i.e., Shapley Q-value). SQPG is evaluated on the environments such as Cooperative Navigation, Prey-and-Predator [18], and Traffic Junction [6], compared with baselines, e.g., MADDPG [18], COMA [10], Independent DDPG [19] and Independent A2C [20].

Multi-agent Learning
Multi-agent learning refers to a category of methods that tackle the games with multiple agents such as cooperative games. Among these methods, we only focus on using reinforcement learning to deal with a cooperative game, which is called multi-agent reinforcement learning (MARL). Incredible progresses have recently been made on MARL. Some researchers [6,8,21] focus on distributed executions, which allow communications among agents. Others [5,10,11,18,22] consider decentralized executions, where no communication is permitted during the execution. Nevertheless, all of them study on the centralized critic, which means information can be shared on the value function during training. In our work, we pay our attention to the decentralized execution and the centralized critic.

Cooperative Game
As opposed to competing with others, agents in a cooperative game aim to cooperate to solve a joint task or maximize global payoffs [15]. Shapley [14] proposed a non-cooperative game theoretical framework called stochastic game, which models the dynamics of multiple agents in the zero-sum game with infinite horizons. Hu et al. [23] introduced a general-sum stochastic game theoretical framework, which does include the zero-sum game. To force cooperation under this framework, Potential function [24] is applied such that each agent shares the same objective, namely a global reward game [5]. In this paper, we use cooperative game theory whereas the existing cooperative game framework are built under non-cooperative game theory. Our framework gives a new view on global reward games and well explains how the credit assignment is important. We show that the global reward game is a subclass of our framework if we interpret such that the agents in a global reward game forms a grand coalition. Under our framework, it is more rational to use a local reward approach to distribute the global rewards.

Credit Assignment
Credit assignment is a significant problem that has been studied in cooperative games for a long time. There are two sorts of credit assignment schemes, i.e., shared reward approach and local reward approach. The shared reward approach directly assigns each agent the global reward [6,8,21,18]. We show that this is actually equivalent to distributing the global reward equally to individual agents. The global reward game with this credit assignment scheme is also called shared reward game (or fully cooperative game) [9]. However, Wolpert and Tumer [25] claimed that the shared reward approach does not give each agent the accurate contribution. Thus, it may not perform well in difficult problems. This motivates the study on the local reward approach, which distributes the global reward to agents according to their contributions. The existing question is how to quantify the contributions. To investigate the answer to this question, Chang et al. [5] attempted using Kalman filter to infer the contribution of each agent. Recently, Foerster et al. [10] and Nguyen et al. [11] modelled the marginal contributions inspired by the reward difference [25]. Under our proposed framework, we propose a new algorithm to learn a local reward called Shapley value [26], which is guaranteed to distribute the global reward fairly. Although Shapley value can be regarded as the expectation of the marginal contributions, it is different from the previous work: it considers all possible orders of agents to form a grand coalition, which has not been addressed in any of the prior work aforementioned.

Non-cooperative Game Theory
To clarify why we are interested in the framework of cooperative game theory, let us begin with non-cooperative game theory. Non-cooperative game theory aims to solve out the problem in which agents are selfish and intelligent [12]. In other words, each agent merely considers maximizing his own rewards to approach a Nash equilibrium. Consequently, non-cooperative game theory is intuitively not suitable for modelling cooperative scenarios. To model the cooperative scenarios, one possible way is through constructing a global reward function (which is unnecessary to be convex), e.g., Potential [24] that replaces each individual reward function. As a result, each agent's objective is forced to be identical, i.e., fully cooperative game. Even if each agent is still keen on maximizing his own rewards, the coordination can be formed. Nonetheless, this approach has its own limitations. Firstly, it lacks the clear explanations for credit assignments. Secondly, assigning credits to each agent equally may cause the slow learning rate [27,28]. Thirdly, this framework is difficult to be extended to solve out more complex problems such as the competition among different coalitions. However, cooperative game theory (with transferable utility), concentrating on credit assignment and dividing coalitions (or groups) [15] can solve out these problems. This is the reason why we introduce and investigate cooperative game theory.

Convex Game
Convex game (CG) is a typical transferable utility game in cooperative game theory. The definitions below are referred to [15]. A CG is formally represented as Γ = N , v , where N is the set of agents and v is the value function to measure the profits earned by a coalition. N itself is called the grand coalition. The value function v : 2 N → R is a mapping from a coalition C ⊆ N to a real number v(C). In a CG, its value function satisfies two properties, i.e., 1) v(C ∪ D) ≥ v(C) + v(D), ∀C, D ⊂ N , C ∩ D = φ; 2) the coalitions are independent. The solution of a CG is a tuple (CS, x), where CS = {C 1 , C 2 , ..., C m } is a coalition structure and x = (x i ) i∈N indicates the payoffs distributed to each agent, which satisfies two conditions, i.e., 1) x i ≥ 0, ∀i ∈ N ; 2) x(C) ≤ v(C), ∀C ⊆ CS, where x(C) = i∈C x i . CS N denotes the set of all possible coalition structures. A core is the stable solution set of a CG, which can be defined mathematically as core(Γ) = {(C, x)|x(C) ≥ v(C), ∀C ⊆ N }. The core of a CG ensures reasonable payoff distribution and inspires our work on credit assignment in MARL.

Shapley Value
Shapley value [26] is one of the most popular methods to solve the payoff distribution problem for a grand coalition [29,30,31]. Given a cooperative game Γ = (N , v), for any C ⊆ N \{i} let δ i (C) = v(C ∪ {i}) − v(C), then the Shapley value of each agent i can be written as: Literally, Shapley value takes the average of the marginal contribution δ i (C) of possible coalitions, so that it satisfies: 1) efficiency: x(N ) = v(N ); 2) fairness: if an agent i has no contribution, then x i = 0; if i-th and j-th agents have the same contribution, then x i = x j [15]. As we can see from Eq.1, if we calculate the Shapley value for an agent, we have to consider 2 |N | − 1 possible coalitions that the agent could join in to form a grand coalition, which causes the computational catastrophe. We purpose mitigating this issue in the scenarios with infinite horizons.

Multi-agent Actor-Critic
Different from the value based method, i.e., Q-learning [32], Policy gradient [33] directly learns the policy by maximizing J(θ) = E s∼ρ π ,a∼π θ [r(s, a)], where r(s, a) is the reward of an arbitrary state-action pair. Since the gradient of J(θ) w.r.t. θ cannot be directly calculated, the policy gradient theorem [20] is used to approximate the gradient such that ∇ θ J(θ) = E s∼ρ π ,a∼π θ [Q π (s, a)∇ θ log π θ (a|s)]. In the actor-critic framework [17], based on the policy gradient theorem, π θ (a|s) is called actor and Q π (s, a) is called critic. Additionally, Extending to the multi-agent scenarios, the gradient of each agent i can be represented as ∇ θi J(θ i ) = E s∼ρ π ,a∼π θ [Q π i (s, a i )∇ θi log π i θi (a i |s)]. Q π i (s, a i ) can be regarded as the estimation of the contribution of each agent i. If the deterministic policy [19] need to be learned in MARL problems, we can reformulate the approximated gradient of each agent

Our Work
In this section, we (i) extend convex game (CG) with the infinite horizons and decisions, namely extended convex game (ECG) and show that a global reward game is equivalent to an ECG with a grand coalition and an efficient distribution scheme, (ii) show that shared reward approach is an efficient distribution scheme in an ECG with a grand coalition, (iii) propose Shapley Q-value by extending and approximating Shapley value to distribute credits in a global reward game, because it can accelerate the convergence rate compared with shared reward approach, (iv) and derive an MARL algorithm called Shapley Q-value policy gradient (SQPG), using Shapley Q-value as each agent's critic.

Extended Convex Game
We now extend CG to the scenarios with infinite horizons and decisions, namely extended CG (ECG). The set of joint actions of agents is defined as A = × i∈N A i , where A i is the feasible action set for each agent i. S is the set of possible states in the environment. The dynamics of the environment is defined as P r(s |s, a), where s, s ∈ S and a ∈ A. Inspired by Nash [34], we construct ECG by two stages. In stage 1, an oracle arranges the coalition structure and contracts the cooperation agreements, i.e., the credit assigned to an agent for his optimal long-term contribution if he joins in some coalition. We assume that this oracle can observe the whole environment and be familiar with each agent's feature. In stage 2, after joining in the allocated coalition, each agent will further make a decision by π i (a i |s) to maximize the social value of its coalition, so that the optimal social value of each coalition and individual credit assignment can be obtained, where a i ∈ A i and s ∈ S. Mathematically, the optimal value of a coalition C ∈ CS can be written as is the reward gained by coalition C at each time step. According to the property (1) of CG aforementioned, the formula In this paper, we denote the joint policy of the whole agents as π = × i∈N π i (a i |s) and assume that each agent can observe the global state. Lemma 1 (Shapley [35], Chalkiadakis et al. [15]). 1) Every convex game has a non-empty core. 2) If a solution (CS, x) is in the core of a characteristic function game N , v and a payoff distribution scheme is efficient, then v(CS) ≥ v(CS ) for every coalition structure CS ∈ CS N . Theorem 1. By the efficient payoff distribution scheme, for an extended convex game (ECG), one solution in the core must exist with the grand coalition and the objective is max π v π ({N }), which can lead to the maximal social welfare, i.e., max π v π ({N }) ≥ max π v π (CS ) for every coalition structure CS ∈ CS N .
Proof. This theorem is proved based on Lemma 1. See Appendix for the complete proofs.
Corollary 1. For a extended convex game (ECG) with a grand coalition, Shapley value must be in the core.
Proof. Since Shapley value must be in the core for a CG with a grand coalition [35] and ESG still conserves the property of CG, this statement holds.

Comparing ECG with Global Reward Game
As seen from Theorem 1, by an efficient payoff distribution scheme, an ECG with a grand coalition is actually equivalent to a global reward game. Both of them aim to maximize the global value (i.e., global cumulative rewards). Here, we assume that the agents in a global reward game are regarded as a grand coalition. Consequently, the local reward approach in the context of ESG can be used in a global reward game.

Looking into Shared Reward Approach by the View of ECG
Shared reward approach assigns each agent the global reward directly in a global reward game. Each agent unilaterally maximizes the cumulative global rewards to seek his optimal policy such that where r t (N ) is the global reward and π = × i∈N π i [9]. If v π ({N }) is multiplied by a normalizing factor, i.e., 1/|N |, then the objective of the new optimization problem for each agent i should be equivalent to Eq.2. We can express it mathematically as Then, the credit assigned to each agent in shared reward approach is actually x i = v π ({N })/|N |, and the sum of the whole agents' credits is equal to the cumulative global rewards. It suffices the condition of the efficient payoff distribution scheme. Therefore, we show that shared reward approach is an efficient payoff distribution scheme in an ECG with a grand coalition, i.e., a global reward game. Nevertheless, from the view of ECG, shared reward approach cannot be guaranteed to find the optimal solution. By Corollary 1 and Theorem 1, we know that Shapley value can theoretically promise the convergence to the maximal global value. This is one of the reasons why we are interested in this local reward approach. To clarify the concepts we mentioned before, we draw a Venn diagram shown as Fig.1.

Shapley Q-value
Although shared reward approach successfully solves out a global reward game in practice, it has been shown that local reward approach gives faster convergence rates [27,28]. For the two aforementioned reasons, we use Shapley value, i.e., a local reward approach for the credit assignment to each agent. Because v π C (C ) represents the cumulative global rewards earned by coalition C in an ECG, we can model it as a Q-value, i.e., Q π C (s, a C ), where s represents the state and a C = (a i ) i∈C . According to Eq.1, the Shapley Q-value of each agent i, i.e., Q Φi (s, a i ) can be written as

Approximate Marginal Contribution
As seen from Eq.4, it is difficult and unstable to learn two Q-value functions (where one is for representing the Q-value of C ∪ {i} and the other is for representing the Q-value of C) to estimate the marginal contributions (i.e., making the difference between two Q-values) for different coalitions.
To mitigate this problem, we propose a method called Approximate Marginal Contribution (AMC) to directly estimate the marginal contribution of each coalition, i.e., Φ i (C).
In cooperative game theory, each agent is assumed to join the grand coalition sequentially. |C|!(|N |− |C| − 1)!/|N |! in Eq.1, denoted as P r(C|N \{i}), is interpreted as that an agent randomly joins in an existing coalition (which could be empty) C to form a complete grand coalition with subsequent agents [15]. According to this interpretation, we model a function to approximate the marginal contribution directly such thatΦ where S is the state space; C is the ordered coalition that agent i would like to join in; A C∪{i} = (A j ) j∈C∪{i} , and the actions are ordered. For example, if the order of a coalition is (0, 2), then a C∪{1} = (a 0 , a 2 , a 1 ). By such a formulation, we believe that the property of marginal contribution (i.e., mapping from every possible combination of coalition C and agent i to a numerical value) can be maintained. Hence, AMC is reasonable to replace the actual marginal contribution. In practice, we represent a C∪{i} by the concatenation of each agent's action vector. To keep the input size of Φ i (s, a C∪{i} ) constant in different cases, we fix the actions as the concatenation of all agents' actions and mask the actions of irrelevant agents (i.e., the agents who are not in the coalition) with zeros.

Approximate Shapley Q-value
Followed by the interpretation above, Shapley Q-value can be rewritten as To enable Eq.7 to be tractable in realization, we can sample Q Φi (s, a i ) here. Combined with AMC, i.e.,Φ i (s, a C∪{i} ) in Eq.6, we can write the equation of the approximate Shapley Q-value (ASQ) aŝ

Shapley Q-value Policy Gradient
In an ECG with a grand coalition, each agent only needs to maximize his own creditQ Φi (s, a i ) by an efficient payoff distribution scheme so that max π v π (N ) can be achieved such that Therefore, if we show that max πiQ Φi (s, a i ) for each agent i is approached, then we can show that the maximal global value max π v π (N ) can be met. Now, the problem transfers to solving max πiQ Φi (s, a i ) for each agent i. Aforementioned, a global reward game is identical to a potential game 2 . Additionally, Monderer and Shapley [24] showed that in a potential game there exists a pure Nash equilibrium, i.e., a deterministic optimal policy solution. For these reasons, we apply deterministic policy gradient (DPG) [36] to search out a deterministic optimal policy. If we substitute Shapley Q-value for Q π i (s, a i ) in DPG, we can directly write the policy gradient of each agent i such that whereQ Φi (s, a i ) is the ASQ for agent i and µ θi is agent i's deterministic policy, parameterized by θ i . A global reward is received each time step in a global reward game. Since each ASQ is correlated to the cumulative local rewards, we cannot update eachQ Φi (s, a i ) directly by the global reward. However, benefited by the property of efficiency, we can solve it out according to the minimization problem such that min ω1,ω2,...,ω |N | where r(N ) is the global reward received from the environment each time step andQ Φi ωi (s, a i ) for each agent i (i.e., a linear combination ofΦ ωi (s, a C∪{i} )) is parameterized by ω i . Constrained by this objective function, the approximate Shapley Q-value suffices the property of efficiency. Accordingly, the condition of efficient payoff distribution scheme stated in Theorem 1 is promised. Because Shapley Q-value takes all of feasible agents' actions and states as input, our algorithm actually uses the centralized critic. Nevertheless, the policies are decentralized in execution.
Silver et al. [36] showed that DPG has the familiar machinery of policy gradient. Besides, Sutton et al. [20] emphasized that with a small learning rate, policy gradient algorithm can converge to a local optimum. Consequently, we can conclude that with a small learning rate, each agent can find a local maximizer and the global value v π (N ) converges to a local maximum. The convexity of v π (N ) is impossible to be guaranteed in applications, so the global maximum stated in Theorem 1 may not be fulfilled always. Since our algorithm aims to find optimal policies by Shapley Q-values, we call it Shapley Q-value policy gradient (SQPG).

Implementation
In implementation, for the sake of better approximation on policy gradients by off-policy and the powerful function approximation by deep neural networks, we use the deep deterministic policy gradient (DDPG) method [19]. Additionally, we apply the reparameterization technique called gumbelsoftmax trick [37] to deal with discrete action space. The pseudo code for the algorithm SQPG is given in Appendix.

Experiments
We evaluate SQPG on Cooperative Navigation, Prey and Predator and Traffic Junction. The environments of Cooperative Navigation and Prey-and-Predator are from Mordatch and Abbeel [38], and Traffic Junction from Sukhbaatar et al. [6]. In the experiments, we compare SQPG with two Independent algorithms (with decentralised critics), such as DDPG [19] and A2C [20], as well as two methods with centralised critics, such as MADDPG [18] and COMA [10]. In the experiments, policy and critic networks for all of MARL algorithms are parameterized by MLPs, except for COMA whose policy is parameterized by GRUs [39] following the original paper. The details of experimental setups are given in Appendix. All models are trained by Adam Optimizer [40] with the same learning rate for each task. The code for experiments is published on: https://github.com/hsvgbkhgbv/multi-agent-rl.

Environment Settings
In this task, there are 3 agents and 3 targets. Each agent aims to move to a target, with no prior allocation of targets to each agent. The state of each agent in this environment includes its current position and velocity, the displacement to three targets, and the displacement to other agents. The action space of each agent is move up, move down, move right, move left and stay. The global reward of this environment is the negative sum of the distance between each target and the nearest agent to it. Besides, if a collision happens, then the global reward will be reduced by 1.

Results
As seen from Fig.2a, SQPGs with variant sample sizes (i.e., M in Eq.8) outperform the baselines, in terms of either the final convergence performance or the convergence rate. As the sample size grows, the approximate Shapley Q-value estimation in Eq.7 could be more accurate and easier to converge to the optimal value. This explains the reason why the convergence rate of SQPG becomes faster when the sample size increases. Moreover, our result supports the previous argument that the local reward approach converges faster than the global reward approach [27,28]. Since we show that SQPG with the sample size of 1 can finally obtain nearly the same performance as other variants, we just run it in the rest of experiments to reduce the computational complexity.

Environment Settings
In this task, we can only control three predators and the prey is a random agent. The aim of predators is coordinating to capture the prey by as less steps as possible. The state of each predator contains its current position and velocity, the respective displacement to the prey and other predators, and the velocity of the prey. The action space is the same as that defined in Cooperative Navigation. The global reward is the negative minimal distance between any predator and the prey. In addition, if the prey is caught by any predator, then the global reward is added by 10 and the game terminates.

Results
As Fig.2b shows, SQPG with sample size of 1 leads the board with about 30 turns to capture the prey finally, followed by MADDPG and Independent DDPG. To study and understand the credit assignment, we visualize the Q-values of each MARL algorithm by one randomly selected trajectory of states and actions from an expert policy. For convenient visualization, we normalize the Q-values by min-max normalization [41] for each MARL algorithm. We can see from Fig.3 that the credit assignment of SQPG is more explainable than that of baselines. Specifically, it is intuitive that the credit assigned to each agent by SQPG is negatively correlated to its distance to the prey. However, other MARL algorithms do not explicitly display such a property. To confirm this intuition, we also evaluate it quantitatively through the negative Pearson correlation coefficient (NPCC) on 1000 randomly selected transition samples. The value is greater and the credit assignment and distance are more negatively correlated. As Tab.1 shows, SQPG expresses the negative correlation significantly, with NPCC of 0.3403 and the two-tailed p-value of 1.4423e-9. The contribution distribution of Shapley Q-value is fair, since it is more likely to catch the prey and the contribution is more significant, if the predator is closer to it.

Environment Settings
In this task, cars move along the predefined routes which intersect on one or more traffic junctions. At each time step, new cars are added to the environment with probability p arrive , and the total number of cars is limited below N max . After a car finishes its mission, it will be removed from the environment and possibly sampled back to a new route. Each car has a limited vision of 1, which means it can only observe the circumstance within the 3x3 region surrounding it. No communication between cars is permitted in our experiment, in contrast to the others' experiments on the same task [6,21]. The action space of each car is gas and brake, and global reward function is N i=1 -0.01t i , where t i is the time steps that car i is continuously active on the road in one mission and N is the total number of cars. Additionally, if a collision occurs, the global reward will be reduced by 10. We evaluate the performance by the success rate, i.e., the episode that no collisions happen.

Results
We compare our method with baselines on the easy, medium and hard version of Traffic Junction. The easy version is constituted of one traffic junction of two one-way roads on a 7 × 7 grid with N max = 5 and p arrive = 0.3. The medium version is constituted of one traffic junction of two-way roads on a 14 × 14 grid with N max = 10 and p arrive = 0.2. The hard version is constituted of four connected traffic junctions of two-way roads on a 18 × 18 grid with N max = 20 and p arrive = 0.05. From Tab.2, we can see that on the easy version, except for Independent AC, other algorithms can get a success rate over 93%, since this scenario is too easy. On the medium and hard version, SQPG outperforms the other baselines with the success rate of 88.98% on the medium version and 87.04% on the hard version. Moreover, the performance of SQPG significantly exceeds that of nocommunication algorithms reported as 84.9% and 74.1% in [21]. We demonstrate that SQPG can solve out large scale problems.

Discussion
In the experimental results, it is surprising that Independent DDPG achieves a good performance. The possible reason could be that a potential game (i.e., a global reward game) can be solved by fictitious play [24] and DDPG is analogous to it, finding an optimal deterministic policy by attempting to fit the other agents' behaviours. However, the convergence rate is not guaranteed when the number of agents becomes large, such as the result shown in the hard version of Traffic Junction. The bad performance of COMA could be due to the so complicated model it has so that the convergence in a continuous control problem, e.g., Cooperative Navigation and Prey-and-Predator, becomes difficult. To deal with both of competitive and cooperative games, MADDPG assigns each agent a centralised critic to estimate the global value. Theoretically the credits assigned to agents are identical, though in experiment it does not always display. The possible reason could be the bias existing in Q-values.

Conclusion
We introduce cooperative game theory to extend the existing global reward game to a broader framework called extended convex game (ECG). Under this framework, we propose an algorithm namely Shapley Q-value policy gradient (SQPG), leveraging a local reward approach called Shapley Qvalue, which is theoretically guaranteed to find out the optimal solution in an ESG with a grand coalition (i.e., a global reward game). We evaluate SQPG on three global reward games and show the promising performance compared with baselines. In the future work, we plan to dynamically group the agents at each time step with theoretical guarantees and jump out of the restriction of the global reward game.
As we defined before, in an ECG, after allocating coalitions each agent will further maximize the cumulative rewards of his coalition by the optimal policy. Now, we denote the optimal value of an arbitrary coalition C as v * (C ) = max π C v π C (C ), where π C = × i∈C π i . Similarly, we can define the optimal value given an arbitrary coalition structure CS as v * (CS) = C∈CS v * (C). If we re-write the value function defined above, ECG can be reformulated to CG. For this reason, we can directly use the results in Lemma 1 here to complete the proof.
First, we aim to show that (i) In an ECG, by an efficient payoff distribution scheme x, v * ({N }) ≥ v * (CS ) for any CS ∈ CS N , and ({N }, x) is a solution in the core.
Suppose for the sake of contradiction that ({N }, x) is not in the core, but due to statement (1) in Lemma 1, there must exist a coalition structure CS other than {N } satisfies the result that (CS,x) is in the core. According to statement (2) in Lemma 1, since CG is a subclass of characteristic function games, by an efficient payoff distribution scheme we can get that On the other hand, because of the property of ECG, i.e., By Eq.12 and 14, we can get that v * ({N }) = v * (CS).
According to the condition of efficient payoff distribution scheme, we can write: By Eq.15, we can get that By Eq.18, it is obvious that we can always find out a payoff distribution scheme x =x for the grand coalition {N }. Since (CS,x) is presumed to be in the core, ({N },x) must satisfy the conditions of core. As a result, we derive that ({N }, x) (where x =x) is a solution in the core which contradicts the presumption we made and we show that proposition (i) holds.
Then, we aim to show that (ii) In an ECG, by an efficient payoff distribution scheme, the objective is max π v π ({N }).
The objective of a CG is finding a solution in the core. According to (i), max CS∈CS N v * (CS) is equivalent to finding a solution in the core corresponding to the grand coalition {N }. For this reason, we can write max Therefore, we prove (ii).
According to (ii), we can conclude that in an ECG, the objective is maximizing v π ({N }), i.e., the cumulative global rewards. However, an efficient payoff distribution scheme, e.g. Shapley value should be a precondition, otherwise, max π v π ({N }) <v({N }), wherev({N }) is the theoretically optimal value that can be found with an efficient payoff distribution scheme.

C Experimental Setups
As for the setups of experiments, because different environments may involve variant complexity and dynamics, we give different hyperparameters for each task. Except that COMA claims to use GRUs as hidden layer, any other algorithms use MLPs as hidden layer for the policy networks.
All of policy networks only use one hidden layer. About critic networks, every algorithm uses MLPs with one hidden layer. For each experiment, we keep the learning rate, entropy regularization coefficient, update frequency, batch size and the number of hidden units identical on each algorithm. In experiments, each agent has its own state in execution, while in training agents share the states. The rest details of experimental setups are introduced as below. All of models are trained by Adam Optimizer [40] with default hyperparameters.

C.1 Additional Details of Cooperative Navigation
The specific hyperparameters of each algorithm used in Cooperative Navigation are shown as Tab.3.

C.2 Additional Details of Prey-and-Predator
The specific hyperparameters of each algorithm used in Prey-and-Predator are shown as Tab.4. Also, we provide more evidences to support the conclusion that the credit assignment of SQPG is negatively correlated to the distance to the prey, shown as Fig.4∼6.

C.3 Additional Details of Traffic Junction
To give the reader an intuitive understanding of the environment, we list the experimental settings of different difficulty levels as Tab.5 shows and give the illustrations shown as Fig.9. The specific hyperparameters of each algorithm used in Traffic Junction are shown as Tab.6. To exhibit the training procedure in more details, we also display the figures of mean rewards, e.g., Fig.7a∼7c and the figures of success rate, e.g., Fig.8a∼8c.

D Limitations of Extended Convex Game
In this paper, we propose a framework built on cooperative game theory called extended convex game (ECG). Although ECG has extended the framework of global reward game defined upon noncooperative game theory to a broader scope, there exist some limitations to this model. Firstly, we have to assume that there is an oracle scheduling the coalition initially, however, this oracle is difficult to realize in implementation. Even if the oracle can be implemented, this model still cannot solve out some problems with random perturbations. This is due to the fact that the oracle has assigned each agent to a coalition with the environment that it knows. Obviously, the perturbation exceeds its knowledge. To deal with this problem, we may investigate how to enable the coalition construction dynamically in the future work. The intuitive idea is enabling the oracle to learn a policy for scheduling the coalition from the history information. At each step, it uses the learned policy to divide the coalitions. Then, each agent act within the coalition to maximize the social value of the coalition. This process can be repeated infinitely. Nonetheless, the promising convergence under the cooperative game theoretical framework for this complicated process could be a challenge.