I NFLUENCING L ONG -T ERM B EHAVIOR IN M ULTIAGENT R EINFORCEMENT L EARNING
A BSTRACT
The main challenge of multiagent reinforcement learning is the difficulty of learning useful policies in the presence of other simultaneously learning agents whose changing behaviors jointly affect the environment’s transition and reward dynamics.
An effective approach that has recently emerged for addressing this non-stationarity is for each agent to anticipate the learning of other interacting agents and influence the evolution of their future policies towards desirable behavior for its own benefit.
Unfortunately, all previous approaches for achieving this suffer from myopic evaluation, considering only a few or a finite number of updates to the policies of other agents.
In this paper, we propose a principled framework for considering the limiting policies of other agents as the time approaches infinity.
Specifically, we develop a new optimization objective that maximizes each agent’s average reward by directly accounting for the impact of its behavior on the limiting set of policies that other agents will take on.
Thanks to our farsighted evaluation, we demonstrate better long-term performance than state-of-the-art baselines in various domains, including the full spectrum of general-sum, competitive, and cooperative settings.
I NTRODUCTION
Learning in multiagent reinforcement learning (MARL) is fundamentally difficult because an agent interacts with other simultaneously learning agents in a shared environment (Bus¸oniu et al., 2010).
The joint learning of agents induces non-stationary environment dynamics from the perspective of each agent, requiring an agent to adapt its behavior with respect to potentially unknown changes in the policies of other interacting agents (Papoudakis et al., 2019).
Notably, non-stationary policies will converge to steady-state behaviors by the end of learning in which agents alternate through a recurrent set of joint policies.
In practice, this converged joint policy can correspond to a game-theoretic solution concept, such as a Nash equilibrium (Nash, 1950) or more generally a cyclic correlated equilibrium (Zinkevich et al., 2006), but this convergence relies on all agents behaving and updating their policies rationally.
Indeed, even when agents do act rationally, multiple equilibria can exist for a single game with some of these Pareto dominating others (Now´e et al., 2012).
Hence, a critical question in addressing this non-stationarity is how individual agents should behave to influence convergence of the recurrent set of joint policies towards desirable steady-state behavior.
Our key idea in answering this question is to consider the limiting policies of other agents as time approaches infinity.
Specifically, the converged behavior of this dynamic multiagent system is not due to some arbitrary stochastic processes, but rather each agent’s underlying learning process, which also depends on behaviors of other interacting agents.
As such, effective agents should model how their actions affect each other’s limiting behaviors and leverage these dependencies to converge jointly to a preferred equilibrium.
This farsighted perspective contrasts with other related works that also consider the learning of other agents (Foerster et al., 2018a;
Letcher et al., 2019; Xie et al., 2020; Kim et al., 2021; Wang et al., 2021).
While those frameworks show improved adaptation performance over methods that neglect the learning of other agents (Lowe et al., 2017; Foerster et al., 2018b; Iqbal & Sha, 2019), they suffer from myopic evaluation : an agent only considers a few anticipated updates to the policies of other agents or optimizes for the discounted return, which only can consider a finite horizon time of 1 / (1 − γ ) with the discount factor γ (Kearns & Singh, 2002).
As a result of this myopic view, we find that these methods often converge to an undesirable joint policy.
However, it is non-trivial to achieve farsighted evaluation in practice as increasing the number of anticipated updates to the limit or mixing time is computationally intractable and setting the discount factor γ → 1 results in unstable learning (Naik et al., 2019).
Our contribution.
With this insight, we provide a principled MARL framework, FUlly Reinforcing acTive influence witH averagE Reward (FURTHER), that considers an agent’s impact on limiting policies of other agents for improved converged performance.
Specifically, we first introduce an active Markov game formulation that extends the standard Markov game (Littman, 1994) by modeling each agent’s impact on the future policies of other agents.
Indeed, this setting is more general than the standard formulation and addresses a large portion of realistic settings where it is unreasonable to assume that other agents will keep their policies fixed or even ever truly stop updating their policies in the presence of new information.
We then develop a novel optimization objective that for the first time maximizes an agent’s average reward per step within this new active Markov game setting.
By having each agent optimize this objective, we demonstrate the following benefits of our framework:
• Converged performance.
We evaluate FURTHER across various general-sum, competitive, and cooperative domains and settings, including self-play.
We demonstrate that our method consistently converges to a more desirable equilibrium than baseline methods that either neglect the learning of others (Iqbal & Sha, 2019) or consider their learning with a myopic perspective (Xie et al., 2020).
• Decentralized learning.
Several prior methods require white-box access to the learning algorithm of other agents for adaptation (Foerster et al., 2018a;
Letcher et al., 2019; Kim et al., 2021).
Instead, FURTHER employs variational inference for predicting both the unknown policies and learning dynamics of other agents, providing a practical method for learning policies in a decentralized manner.
P ROBLEM S TATEMENT : A CTIVE M ARKOV G AME
This work studies a general-sum and decentralized multiagent learning setting, where each agent interacts with other independently learning agents in a shared environment.
In MARL, each agent updates its policy from recent experiences affected by the joint actions.
As such, while an agent cannot directly modify the future policies of other interacting agents, the agent can actively impact them by changing its own actions.
We formalize the presence of this causal influence in multiagent interactions by introducing a new framework that formalizes the notion of an active Markov game.
[Figure]
Active Markov game definition.
We define an active Markov game as a tuple ⟨
I , S , A , T , R , Θ , U ⟩ ; I = { 1 , ... , n } is the set of n agents; S is the state space;
A = × i ∈I A i is the set of action spaces for each agent;
T : S × A (cid:55)→ S is the state transition function; R = × i ∈I R i is the set of reward functions; Θ = × i ∈I
Θ i is the set of policy parameter spaces for each agent; and U = × i ∈I
U
i is the set of policy update functions for each agent.
We typeset sets in bold for clarity.
Compared to the stationary Markov game that effectively represents MARL with a stationary opponent assumption, the active Markov game considers how other agents’ underlying policies change over time (see Figure 1).
Specifically, at each timestep t , each agent i executes an action at a current state s t ∈ S and current policy parameters of other agents θ (cid:57)
it ∈ Θ (cid:57) i according to its stochastic policy a it ∼ π i ( ·| s t , θ (cid:57) it ; θ it ) parameterized by θ it , where the notation (cid:57) i indicates all other agents except i .
A joint action a t = { a it , a (cid:57) it } yields a transition from s t to s t +1 with probability T ( s t +1 | s t , a it , a (cid:57) it ) .
Agent i then obtains a reward according to its reward function r it
=
R i ( s t , a it , a (cid:57) it ) and considers how policy parameters of other agents will be updated according to probability U (cid:57) i ( θ (cid:57) it +1 | θ (cid:57) it , s t , a it , a (cid:57) it , r (cid:57) it , s t +1 ) .
Importantly, U (cid:57) i are a function of a it , which affects the state transition and rewards of other agents.
Therefore, i can actively influence their future policies by changing its own behavior.
Modeling this influence rather than ignoring it is the main advantage compared to the stationary Markov game formalism.
A CTIVE A VERAGE R EWARD MARL
The active Markov game provides a principled framework for each agent to model its impact on future policies of other agents.
In this section, we develop a new multiagent optimization objective by integrating the average reward formulation (Puterman, 1994; Sutton & Barto, 2018) with the active Markov game framework to maximize the agent’s average reward per step while considering its influence on the limiting behaviors of others.
We first outline our new objective and derive its policy gradient.
We then detail our model-free implementation that builds on top of soft actorcritic (Haarnoja et al., 2018) to learn policies that efficiently optimize for the average reward objective.
Our implementation also employs variational inference (Blei et al., 2017) to predict the hidden policies and policy dynamics of other agents for partially observable settings, enabling each agent to select actions and learn its policy in a decentralized manner.
3. F ORMULATION OF A CTIVE A VERAGE R EWARD MARL
Our key finding is that the average reward formulation, developed for single-agent learning (Puterman, 1994), synergizes with our goal of considering limiting behaviors of other interacting agents in multiagent learning.
In particular, the average reward formulation maximizes the agent’s average reward per step with equal weight given to immediate and delayed rewards, unlike the discounted return objective.
In MARL, once the joint policy arrives at a steady-state behavior, rewards experienced by this recurrent set of policies govern each agent’s average reward under the limit of time.
Thus, optimizing the average reward in an active Markov game encourages agents to consider their impact on the limiting policies of other agents, as we detail below.
Definition.
(Active Average Reward Objective).
Each agent i optimizes its policy parameters θ i to maximize its expected long-term average reward ρ iθ i ∈ R at a state s and policy parameters of other agents θ (cid:57) i by considering their Markovian policy update functions U
[Equation]
i :
[Equation]
where T denotes the time horizon.
As T →∞ , agent i maximizes its average reward while accounting for the limiting behavior of others θ (cid:57) i ∞ .
We represent θ (cid:57) i ∞ as steady-state behavior of other agents under the limit of time, in which they alternate through a recurrent set of policies.
As such, the combination of policies and update functions induces a particular type of non-stationary policy, called a cyclic policy (Zinkevich et al., 2006).
As a result, our average reward objective effectively considers the converged behaviors of others at a cyclic correlated equilibrium (Zinkevich et al., 2006) under the assumption that agents behave and update their policies rationally.
It is important to note that this is a strict generalization of the standard view of MARL: convergence to a fixed point is indeed a recurrent set of size one and Nash equilibria convergence is a special case of a cyclic correlated equilibria.
The active average reward objective in Equation (1) contrasts with an alternative objective of maximizing the discounted return v i
θ i in the active Markov game:
[Equation]
As pointed out in Naik et al.
(2019), the discounted return objective is bounded by γ , and a learned policy by optimizing the discounted value generally does not correspond to a policy that maximizes the average reward.
Further, γ → 1 causes increasingly unstable learning (see Section 5), resulting in the average reward formulation being a more desirable objective to optimize (Nota & Thomas, 2020).
To derive a policy gradient that optimizes Equation (1), we must account for the underlying structure of the state transition T and policy dynamics U because the average reward generally depends on the initial state and joint policy.
Regarding the state transition T , we follow the single-agent average reward literature (Mahadevan, 1996; Wei et al., 2019; Wan et al., 2021) and assume communicating states: for every pair of states, there exists a joint policy that transitions from one state to the other state in a finite number of steps with non-zero probability.
Regarding the policy dynamics U , which is a unique factor for multiagent learning settings, we focus on the unichain interactions:
Assumption.
(Unichain policy dynamics).
The policy dynamics of other agents U (cid:57) i corresponding to every agent i ’s policy contain a single recurrent class of policies (i.e., policies of other agents that are visited infinitely often) and a possibly empty set of transient policies (i.e., policies of other agents that are visited only finitely often).
We note that this unichain assumption is valid for many cases of interest to MARL, including when the policies of other agents satisfy the Greedy in the Limit with Infinite Exploration (GLIE) property generally needed for RL algorithms to provably converge (Sutton & Barto, 2018): 1) all state-action pairs are visited infinitely often and 2) as t → ∞ , the behavior policy converges to the greedy policy.
More generally, a broad class of noisy update functions can lead to a notion of stochastic stability (Foster & Young, 1990; Freidlin et al., 2012; Chasparis, 2019), where multiagent learning with the perturbed learning dynamics has a unique stationary distribution.
We refer to Appendix A for a more in-depth discussion of this assumption as well as an analysis of a multi-chain case.
A convenient result under these assumptions is that the average reward becomes independent of the initial state and latent strategies (Puterman, 1994):
[Equation]
Having defined the underlying structure of T and U
[Equation]
we now derive the Bellman equation in the active Markov game that defines the relationship between the value function and average reward.
Proposition 1.
(Active Differential Bellman Equation).
The differential value function v iθ i (Sutton &
Barto, 2018) represents the expected total difference between the accumulated rewards from s and θ (cid:57) i and the average reward
ρ iθ i .
The differential value function inherently includes the recursive relationship with respect to v iθ i at the next state s ′ and the updated policies of other agents θ
[Equation]
i ′ :
[Equation]
Proof.
See Appendix B for a derivation.
□
Finally, we derive the policy gradient based on the differential Bellman equation in Equation (4):
Proposition 2.
(Active Average Reward Policy Gradient Theorem).
The gradient of active average reward objective in Equation (1) with respect to agent i ’s policy parameters θ i is:
[Equation]
with q i θ i ( s, θ (cid:57) i , a i , a (cid:57) i ) =
(cid:80)
[Equation]
(5) where µ iθ i denotes i ’s steady distribution under θ i with respect to s and θ (cid:57) i .
Proof.
See Appendix C for a derivation.
□
Decentralized Execution 𝜙 𝝓 𝒆𝒏𝒄−𝒊
Encoder 𝝉 𝟎:𝒕−𝒊 𝝅(⋅|𝑠 𝑡 , Ƹ𝓏 𝑡 𝑖 ;𝜽 −𝒊 )
Policy 𝒂 𝒕−𝒊 Ƹ𝓏 𝑡𝑖 𝜙 𝜙 𝑒𝑛𝑐𝑖 𝜏 0:𝑡𝑖 ෝ𝔃 𝒕−𝒊 𝜋(⋅|𝑠 𝑡 ,ෝ𝔃 𝒕−𝒊 ;𝜃 𝑖 ) 𝑎 𝑡𝑖
Decentralized Training 𝜋(⋅|𝑠 𝑡 ,ෝ𝔃 𝒕 −𝒊 ;𝜃 𝑖 ) 𝑠 𝑡 ,ෝ𝔃 𝒕−𝒊 𝐽 𝜋𝑖 𝒂 𝒕𝒊
Policy 𝝆 𝜽 𝒊 𝒊 𝒒 -functions 𝝍 𝟏,𝟐𝒊 𝒔 𝒕 ,ෝ𝔃 𝒕 −𝒊 ,𝑎 𝑡 𝑖 ,𝒂 𝒕 −𝒊 𝐽 𝑞 𝑖
[Figure]
0:𝑡 𝑖 ෝ𝔃
[Figure]
3. P RACTICAL I MPLEMENTATION OF A CTIVE A VERAGE R EWARD MARL
Algorithm overview.
FURTHER broadly consists of inference and reinforcement learning modules (see Figure 2).
In practice, each agent has partial observations about others and cannot directly observe their true policy parameters θ (cid:57) i and policy dynamics U (cid:57) i .
The inference learning module predicts this hidden information about other agents via the variational inference (Blei et al., 2017) modified for sequential prediction.
The inferred information becomes the input to the reinforcement learning module, which extends the policy gradient theorem in Equation (5) and learns active average reward policies sample efficiently by building on the multiagent soft actor-critic (MASAC) framework for discrete action spaces (Haarnoja et al., 2018; Christodoulou, 2019; Iqbal & Sha, 2019).
We note that each agent interacts and learns these modules by only observing the actions of other agents, so our implementation supports decentralized execution and training.
We provide further implementation details and psuedocode in Appendix D.
Inference learning module.
This module aims to infer the current policies of other agents and their learning dynamics.
One approach to achieve this is model-based, where an agent fits an explicit model of the learning strategies of other agents based on the observed data (Kim et al., 2021).
However, a model-based approach has difficulties in addressing the infinite recursion problem: if an agent attempts to take into account its opponent’s model of the agent itself (Tesauro, 2004).
As a result, we study a model-free approach to predict the hidden information of other agents based on an approximate variational inference (Blei et al., 2017).
Specifically, we optimise a tractable evidence lower bound (ELBO), defined together with an encoder p ( ˆ z (cid:57) it | τ i 0: t ; ϕ i enc ) and a decoder p ( a (cid:57) it | s t , ˆ z (cid:57) it ; ϕ i dec ) , parameterised by ϕ i enc and ϕ i dec , respectively:
[Equation]
where latent strategies ˆ z (cid:57) it represents inferred policy parameters of other agents θ (cid:57) it and τ i 0:
t = { s 0 , a i 0 , a (cid:57) i 0 , r i 0 , ..., s t } denotes i ’s trajectories up to timestep t .
We refer to Appendix E for a detailed
ELBO derivation.
By optimizing the reconstruction term, the encoder aims to infer accurate latent strategies of others.
Further, by imposing the prior through the KL divergence, where we set the prior to the previous posterior with initial prior p ( ˆ z (cid:57) i 0 )=
N (0 , I ) , the inferred policies from the encoder are encouraged to be sequentially consistent across time (i.e., no abrupt changes in policies of others).
Reinforcement learning module.
This module aims to learn a policy that can maximize the agent’s average reward based on the inferred information about other agents.
Each agent maintains its policy π ( ·| s, ˆ z (cid:57) i ; θ i ) parameterized by θ i , two q -functions q iθ i ( s, ˆ z (cid:57) i , a i , a (cid:57) i ; ψ i 1 ) and q i θ i ( s, ˆ z (cid:57) i , a i , a (cid:57) i ; ψ i 2 ) parameterized by ψ i 1 , ψ i 2 , and learnable average reward ρ i θ i ∈ R .
We train the q-functions and ρ iθ i by minimizing the soft Bellman residual:
[Equation]
with y = r
i
[Equation]
where β =1 , 2 , D i denotes i ’s replay buffer, and ¯ ψ iβ denotes the target q -network parameters.
The soft value function v iθ i calculates the state value with the policy entropy H and entropy weight α :
[Equation]
Finally, the policy is trained to maximize:
[Equation]
R ELATED W ORK
Stationary MARL.
The standard approach for addressing the non-stationarity problem in MARL is to consider information about other agents and reason about joint action effects (Hernandez-Leal et al., 2017).
Example frameworks include the studies regarding centralized training with decentralized execution, which account for other agents’ actions through centralized critics (Lowe et al., 2017;
Foerster et al., 2018b; Yang et al., 2018; Omidshafiei et al., 2019; Iqbal & Sha, 2019; Kim et al., 2020).
Other related works are the opponent modeling frameworks that infer opponents’ policies and condition an agent’s policy on the inferred information about others (He et al., 2016; Raileanu et al., 2018;
Grover et al., 2018; Wen et al., 2019).
While these works alleviate non-stationarity, each agent learns its policy by assuming that other agents will have stationary policies in the future.
This assumption is incorrect because other agents can have different behaviors in the future due to their learning (Foerster et al., 2018a), resulting in improper adaptation with respect to their changing behaviors.
In contrast, FURTHER models the learning processes of other agents and considers how to actively influence their limiting behaviors.
Learning-aware MARL.
Our framework is closely related to prior works that consider the learning of other agents in the environment.
The framework by Zhang & Lesser (2010), for instance, learns the best response adaptation to the other agent’s anticipated updated policy.
Notably, LOLA (Foerster et al., 2018a) and its more recent improvements (Foerster et al., 2018c;
Letcher et al., 2019) study the impact of behavior on one or a few of another agent’s policy updates.
Our work is also related to frameworks that leverage the inferred policy dynamics of other agents to impact their future policies by maximizing the discounted return objective (Jaques et al., 2019; Xie et al., 2020; Wang et al., 2021).
Lastly, meta-learning frameworks are related that directly account for the non-stationary policy dynamics in multiagent settings based on the inner-loop and outer-loop optimization (Al-Shedivat et al., 2018;
Kim et al., 2021; Balaguer et al., 2022).
However, all of these approaches only account for a finite number of updates to the policies of other agents, so we observe that these methods can converge to a less desirable equilibrium.
FURTHER addresses this issue in these related methods by optimizing for the average reward objective in a novel active Markov game setting.
Game-theoretic MARL.
Another effective approach to addressing the non-stationarity is learning equilibrium policies that correspond to game-theoretic solution concepts (Littman, 1994; 2001; Wang & Sandholm, 2002; Greenwald & Hall, 2003; Zinkevich et al., 2006).
These frameworks predict stationary joint action values by the end of learning and can guarantee convergence to Nash (Nash, 1950) or correlated (Aumann, 1987) equilibrium values under certain assumptions.
However, as noted in Bowling (2005), this convergence is guaranteed only while ignoring the actual learning dynamics of other agents, and each agent assumes all agents will play the same joint equilibrium strategy.
As such, equilibrium learners can fail to learn best-response policies when other agents choose to play different equilibrium strategies in the future as a result of their learning.
By contrast, FURTHER considers convergence to a recurrent set of joint policies by inferring the true policy dynamics of other agents.
We note that this recurrent set of joint policies can arrive at more general game theoretic concepts than Nash equilibria such as cyclic correlated equilibria (Zinkevich et al., 2006) in the case that all agents behave and update their policies rationally.
E VALUATION
We demonstrate FURTHER’s efficacy on a diverse suite of domains, including general-sum, competitive, and cooperative settings.
We refer to appendix F for hyperparameters used in experiments.
Each figure shows the mean and 95% confidence interval computed across 20 random seeds.
[Figure]
A v e r a g
e R e w a r d f o r i
[Figure]
• LILI (Xie et al., 2020): An approach that considers the learning dynamics of other agents but suffers from myopic evaluation bias by optimizing the discounted return objective in Equation (2).
• MASAC (Iqbal & Sha, 2019):
An approach that extends SAC (Haarnoja et al., 2018) to a multiagent learning setting by having centralized critics (Lowe et al., 2017).
This baseline assumes other agents will have stationary policies in the future and thus neglects their learning.
Question 1.
How do methods perform when playing against a q -learning agent?
[Equation]
j
[Equation] [Equation]
We consider playing the iterated Bach or Stravinsky game (IBS; see Table 1).
This general-sum game involves conflicting elements with two pure strategy Nash equilibria, where convergence to (A,A) and (B,B) equilibrium are more preferable from i ’s and j ’s perspective, respectively.
Suppose agent i plays against a naive learner j , such as q -learner (Watkins & Dayan, 1992), whose initial q -values are set to prefer action (B).
In this experimental setting, it is ideal for agent i to change j ’s influence behavior to select (A) such that they converge to i ’s optimal pure strategy Nash equilibrium of (A,A).
As in Foerster et al.
(2018a)
, we model the state space as s 0 = ∅ and s t = a t − 1 for t ≥ 1 .
The average reward performance when an agent i , trained with either FURTHER or the baseline methods, interacts with the q -learner j is shown in Figure 3a.
There are two notable observations.
First, the FURTHER agent i consistently converges to its optimal equilibrium of (A,A), while the
LILI agent often converges to the sub-optimal equilibrium of (B,B).
The FURTHER agent i learns to select (A) while j selects (B), receive the worst rewards of zero, and wait until j ’s q -value for (B) is updated to be lower than the q -value for (A).
With the limiting view, i learns that the waiting process is only temporary, and receiving the eventual rewards of two by converging to (A,A) is optimal.
By contrast, LILI suffers from myopic evaluation and shows decreased convergence performance because the agent prefers simply converging to the sub-optimal equilibrium rather than waiting indefinitely.
Second, FURTHER and LILI outperform the other approach of MASAC, showing the benefit of considering active influence on future policies of other agents.
Question 2.
Which equilibrium do methods converge to when there are multiple equilibria in a self-play setting?
Agent j
[Equation]
We now experiment with a self-play setting, where all agents learn with the same algorithm.
We consider evaluation in an iterated cooperative (IC) game with identical payoffs (see Table 2).
Note that this game has two pure strategy Nash equilibria of (A,A) and (B,B), in which the (B,B) equilibrium Pareto dominates the other.
For the experimental setting, we compare when both agents are trained with either ours or the baseline methods.
Figure 3b shows the average reward performance as the train iteration increases.
Similar to the IBS results, we observe that FURTHER consistently converges to the best equilibrium of (B,B) while the baseline methods can converge to the sub-optimal equilibrium, and LILI performs better than MASAC.
Question 3.
How does FURTHER’s limiting optimization perform against LILI’s myopic discounted optimization?
Agent j
A g e n t i
H
T
H (1 , (cid:57) 1) ( (cid:57) 1 , 1)
T ( (cid:57) 1 , 1) (1 , (cid:57) 1)
To answer this question, we consider the FURTHER agent i directly competing against the LILI opponent j in the iterated matching pennies (IMP) game (see Table 3).
We observe that showing the average reward is noisy and hard to interpret in this zero-sum game, so we show an alternative metric of i
’s accumulated reward summed up to the current timestep.
Figure 3c shows that the accumulated reward for i is positive, meaning that FURTHER achieves higher rewards than LILI over time.
This result concludes that FURTHER is more effective than LILI by employing the limiting view via the average reward formulation.
Question 4.
Is it beneficial to set the discount factor γ close to one?
In Section 3, we noted that the discounted return objective does not maximize the average reward and has unstable learning when γ → 1 (Naik et al., 2019).
We empirically validate this statement in this question.
In particular, we evaluate with varying discount factors γ ∈{ 0 . 9 , 0 .
95 , 0 . 99 , 0 . 9999 } for
LILI in the IBS scenario (see Question 1).
Figure 4 shows the converged performance at the end of learning and corresponding temporal different (TD) errors in the q updates, respectively.
We observe a slight increase in the converged performance when γ increases from 0 .
9 to higher values, but the performance with the discounted return is still much less than the performance by the average reward objective.
Notably, the TD error increases exponentially with higher γ and causes unstable learning, which makes optimizing the average reward objective more desirable than the discounted return.
C ONCLUSION
In this paper, we have introduced FURTHER, a principled algorithm to address non-stationarity by considering each agent’s impact on the converged policies of other agents.
The key idea is to consider the limiting policies of other agents through the average reward formulation in a newly proposed active Markov game framework, and we have developed a practical model-free and decentralized approach to address this setting.
We evaluated our method on various multiagent settings and showed that FURTHER consistently converges to more desirable long-term behavior for agents that use it than state-of-the-art baseline approaches.
A CKNOWLEDGMENTS
Research funded by IBM (as part of the MIT-IBM Watson AI Lab initiative).
A D ISCUSSION : U NICHAIN P OLICY D YNAMICS A SSUMPTION
[Figure]
IPD Analysis
[Figure]
GLIE
[Figure]
In Section 3, we assumed the unichain assumption on policy dynamics, resulting in the average reward independent of initial policies of other agents.
We note that this unichain assumption is valid for many cases of interest to MARL, including when the policies of other agents satisfy the Greedy in the Limit with Infinite Exploration (GLIE) property (Sutton & Barto, 2018): 1) all state-action pairs are visited infinitely often and 2) as t →∞ , the behavior policy converges to the greedy policy.
In particular, the exploration in GLIE adds noise to the learning dynamics of agents, and agents arrive at the concept of stochastic stability (Foster & Young, 1990; Freidlin et al., 2012; Chasparis, 2019), where multiagent learning with the perturbed learning dynamics has a unique stationary distribution.
Because most MARL algorithms have exploration in choosing actions, GLIE is satisfied in many practical settings, so the unichain assumption is a reasonable assumption to make.
Agent j
A g e n t i
C
D
C ( (cid:57) 1 , (cid:57) 1) ( (cid:57) 3 , 0)
D (0 , (cid:57) 3) ( (cid:57) 2 , (cid:57) 2)
For example, consider playing the iterated prisoner’s dilemma (IPD) game (see Table 4), where agent i plays against a q -learning agent j .
We perform a policy iteration analysis (Puterman, 1994) with respect to j ’s varying initial q -values for each action θ (cid:57) i 0 .
Figure 5a and Figure 5b show i ’s maximum average reward with respect to θ (cid:57) i 0 when j trains with a greedy and GLIE algorithm, respectively.
Interestingly, the analysis with the greedy algorithm shows that i ’s average reward depends on θ (cid:57) i 0 in IPD, where there is a set of j ’s initial policies that i can achieve the high average reward, but there is the other set of initial policies that can result in the worst average reward of (cid:57) 2 .
By contrast, Figure 5b shows that i ’s average reward is independent of θ (cid:57) i 0 when j ’s learning satisfies GLIE.
B D ERIVATION OF A CTIVE D IFFERENTIAL B ELLMAN E QUATION
Proposition 1.
(Active Differential Bellman Equation).
The differential value function v iθ i (Sutton &
Barto, 2018) represents the expected total difference between the accumulated rewards from s and θ (cid:57) i and the average reward
ρ iθ i .
The differential value function inherently includes the recursive relationship with respect to v iθ i at the next state s ′ and the updated policies of other agents θ
[Equation]
i
[Equation] [Equation]
Proof.
We seek to derive the recursive relationship between v iθ i ( s, θ (cid:57) i ) and v iθ i ( s ′ , θ (cid:57) i ′ ) .
We leverage the general derivation outlined in Sutton & Barto (2018) (page 59) and extend it to our active Markov
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
(10) □
C D ERIVATION OF A CTIVE A VERAGE R EWARD P OLICY G RADIENT
Proposition 2.
(Active Average Reward Policy Gradient Theorem).
The gradient of active average reward objective in Equation (1) with respect to agent i ’s policy parameters θ i is:
[Equation]
with q
[Equation]
where µ iθ i denotes i ’s steady distribution under θ i with respect to s and θ (cid:57) i .
Proof.
We seek to derive an expression for optimizing the active average reward objective in Equation (1) with respect to agent i ’s policy parameters θ i .
Our derivation leverages the general policy gradient theorem proof for the continuing case in Sutton & Barto (2018) (page 334).
We begin by expressing the gradient of the differential value function v iθ i ( s, θ (cid:57) i ) for any s and θ (cid:57) i :
[Equation]
We continue to derive the Term A in Equation (11):
[Equation]
Then
[Equation]
we summarize Equation (11) and Equation (12) together and re-arrange terms to obtain:
[Equation]
where ∇ θ i ρ iθ i = ∇ θ i J iπ ( θ i )
[Equation]
We define agent i ’s steady distribution µ iθ i under θ i with respect to s and θ (cid:57) i as the special distribution that satisfies:
[Equation]
which exists under the communicating and unichain assumptions on T and U
[Equation]
respectively (Puterman, 1994)
[Equation]
We now apply the steady distribution to Equation (13) and derive the final expression for policy gradient:
[Equation]
[Table] [Equation] [Table] [Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table] [Equation] [Table] [Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation] [Table] [Equation] [Table]
[Equation]
[Table]
(15) □
D A DDITIONAL I MPLEMENTATION D ETAILS
Our neural networks for the policy, q -functions consist of 3 fully-connected (FC) layers.
Regarding the inference module, the encoder consists of a FC input layer followed by a single-layer LSTM and a
FC output layer.
The encoder outputs the mean and standard deviation for the Gaussian distribution of p ( ˆ z (cid:57) it | τ i 0: t − 1 ; ϕ i enc ) , in which we sample ˆ z (cid:57) it .
Because it is impractical to input the entire interactions from the beginning of the game to the encoder, we limit τ i 0:
t − 1 to be recent 100 interactions.
The decoder consists of 3 FC layers and outputs a probability for the categorical distribution of another agent.
Pseudocode.
Algorithm for FURTHER is provided below:
Require:
Learning rates α q , α π , α ϕ , Soft q-target update rate τ q 1: # Agent initialization 2: for each agent i do 3:
Initialize RL module θ i , ψ i 1 , ψ i 2 , ¯ ψ i 1 , ¯ ψ i 2 , ρ iθ i , D i 4:
Initialize inference module ϕ i enc , ϕ i dec 5:
Initialize other agents’ latent strategies ˆ z (cid:57) i6: end for 7: for each timestep t do 8: # Decentralized execution 9:
For each agent i , select a it ∼ π ( ·| s t , ˆ z (cid:57) it ; θ i ) 10:
Execute joint action a t and receive next state s t
+1 and joint rewards r t 11:
For each agent i , infer next updated policies of other agents
ˆ z (cid:57) it +1 ∼ p ( ·| τ i 0:
t +1 ; ϕ i enc ) 12:
For each agent i , add a transition to its replay memory D
i ←D i ∪{ s t , ˆ z (cid:57) it , a it , a (cid:57) it , r it , s t +1 , ˆ z (cid:57) it +1 } 13: # Decentralized training 14: for each agent i do 15: { ψ iβ , ρ iθ i } ← { ψ iβ , ρ iθ i } − α q J iq ( ψ iβ , ρ iθ i ) for β = 1 ,16: θ i ← θ i
+ α π J iπ ( θ i ) 17: { ϕ i enc , ϕ
i dec } ← { ϕ i enc , ϕ i dec } − α ϕ J i elbo ( ϕ i enc , ϕ i dec ) 18: ¯ ψ iβ ← τ q ψ iβ + (1 − τ q ) ¯ ψ iβ for β = 1 ,19: end for 20: end for
E ELBO D ERIVATION
We derive our ELBO optimization in Equation (6) for the inference module.
In particular
[Equation]
we follow the ELBO derivation in Zintgraf et al.
(2020) (Appendix A)
and modify it for our multiagent setting:
[Equation]
Finally
[Equation]
we summarize terms to obtain Equation (6):
[Equation]
F H YPERPARAMETER D ETAILS
[Table]
[Table] [Table]