When Can We Learn General-Sum Markov Games with a Large Number of Players Sample-Efficiently?
Ziang Song, Song Mei, Yu Bai
Introduction
Multi-agent reinforcement learning (RL) has achieved substantial recent successes in solving artificial intelligence challenges such as GO (Silver et al., 2016, 2018), multi-player games with team play such as Starcraft (Vinyals et al., 2019) and Dota2 (Berner et al., 2019), behavior learning in social interactions (Baker et al., 2019), and economic simulation (Zheng et al., 2020; Trott et al., 2021). In many applications, multi-agent RL is able to yield high quality policies for multi-player games with a large number of players (Wang et al., 2016; Yang et al., 2018).
Despite these empirical progresses, theoretical understanding of when we can sample-efficiently solve multi-player games with a large number of players remains elusive, especially in the setting of multi-player Markov games. A main bottleneck here is the exponential blow-up of the joint action space—The total number of joint actions in a generic game with simultaneous plays is equal to the product of the number of actions for each player, which scales exponentially in the number of players. Such an exponential dependence is indeed known to be unavoidable in the worst-case for certain standard problems. For example, for learning an approximate Nash equilibrium from payoff queries in an one-step multi-player general-sum game, the query complexity lower bound of Chen et al. (2015) and Rubinstein (2016) shows that at least exponentially many queries (samples) is required, even when each player only has two possible actions and the query is noiseless. Moreover, for learning Nash equilibrium in Markov games, the best existing sample complexity upper bound also scales with the size of the joint action space (Liu et al., 2021).
Nevertheless, these exponential lower bounds do not completely rule out interesting theoretical inquiries—there may well be other notions of equilibria or additional structures within the game that allow us to learn with a better sample complexity. This motivates us to ask the following
Question: When can we solve general-sum Markov games with sample complexity milder than exponential in the number of players?
This paper makes steps towards answering the above question by considering multi-player general-sum Markov games (MGs) with players, steps, states, and actions per player. We make two lines of investigations: (1) Can we learn alternative notions of equilibria with better sample complexity than learning Nash; (2) Can the Nash equilibrium be learned with better sample complexity under additional structural assumptions on the game. This paper makes contributions on both ends, which we summarize as follows.
We first design an algorithm that learns the -approximate Coarse Correlated Equilibrium (CCE) with episodes of play (Section 3). Our algorithm CCE-V-Learning is a multi-player adaptation of the Nash V-Learning algorithm of Bai et al. (2020).
We design an algorithm CE-V-Learning which learns the stricter notion of -approximate Correlated Equilibrium (CE) with episodes of play (Section 4). For Markov games, these are the first line of sample complexity results for learning CE and CCE that only scales polynomially with , and improves significantly in the dependency over the current best algorithm which scales with .
Technically, our algorithm CE-V-Learning makes several major modifications over CCE-V-Learning in order to learn the CE (Section 4.2). Notably, inspired by the connection between CE and low swap-regret learning, we use a mixed-expert Follow-The-Regularized Leader algorithm within its inner loop to achieve low swap-regret for a particular adversarial bandit problem. Our analysis also contains new results for adversarial bandits on weighted swap regret and weighted regret with predicable weights, which may be of independent interest.
Finally, we consider learning Nash equilibrium in Markov Potential Games (MPGs), an important subclass of general-sum Markov games. By a reduction to single-agent RL, we design an algorithm Nash-CA that achieves sample complexity, where is the bound on the potential function (Section 5). Compared with the recent result of Leonardos et al. (2021), we significantly improves the dependence from their .
The sample (query) complexity of learning Nash, CE, and CCE from samples in one-step (i.e. normal form) general-sum games with players and actions per player has been studied extensively in literature (Hart and Mas-Colell, 2000; Hart, 2005; Stoltz, 2005; Cesa-Bianchi and Lugosi, 2006; Blum and Mansour, 2007; Fearnley et al., 2015; Babichenko and Barman, 2015; Chen et al., 2015; Fearnley and Savani, 2016; Goldberg and Roth, 2016; Babichenko, 2016; Rubinstein, 2016; Hart and Nisan, 2018). It is known that learning Nash equilibrium requires exponential in samples in the worst case (Rubinstein, 2016), whereas CE and CCE admit efficient -sample complexity algorithms by independent no-regret learning (Hart and Mas-Colell, 2000; Hart, 2005; Syrgkanis et al., 2015; Goldberg and Roth, 2016; Chen and Peng, 2020; Daskalakis et al., 2021). Our results for learning CE and CCE can be seen as extension of these works into Markov games. We remark that even when the game is fully known, the computational complexity for finding Nash in general-sum games is PPAD-hard (Daskalakis, 2013).
Markov games (Shapley, 1953; Littman, 1994) is a widely used framework for game playing with sequential decision making, e.g. in multi-agent reinforcement learning. Algorithms with asymptotic convergence have been proposed in the early works of Hu and Wellman (2003); Littman (2001); Hansen et al. (2013). A recent line of work studies the non-asymptotic sample complexity for learning Nash in two-player zero-sum Markov games (Bai and Jin, 2020; Xie et al., 2020; Bai et al., 2020; Zhang et al., 2020; Liu et al., 2021; Chen et al., 2021; Jin et al., 2021b; Huang et al., 2021) and learning various equilibria in general-sum Markov games (Liu et al., 2021; Bai et al., 2021), building on techniques for learning single-agent Markov Decision Processes sample-efficiently (Azar et al., 2017; Jin et al., 2018). Learning the Nash equilibrium in general-sum Markov games are much harder than that in zero-sum Markov games. Liu et al. (2021) present the first line of results for learning Nash, CE, and CCE in general-sum Markov games; however their sample complexity scales with due to the model-based nature of their algorithm. Algorithms for computing CE in extensive-form games has been widely studied (Von Stengel and Forges, 2008; Celli et al., 2020; Farina et al., 2021; Morrill et al., 2021), though we remark Markov games and extensive-form games are different frameworks and our results do not imply each other.
Concurrent to our work, Jin et al. (2021a); Mao and Başar (2022) also present results for learning CE/CCE in general-sum Markov games, both using variants of the V-Learning algorithm similar as ours. Mao and Başar (2022) provide an sample complexity for learning -CCE, which has one additional factor than our Theorem 2. Jin et al. (2021a) provide an sample complexity for learning -CCE similar as our Theorem 2, and sample complexity for learning -CE; the latter result is an factor better than our Theorem 5, which we remark is due to their use of a slightly different swap regret minimization algorithm from ours. Also, both works above only consider CE/CCE for general-sum Markov games, and do not present results for learning Nash equilibria for Markov potential games.
Lastly, a recent line of works considers Markov potential games (Macua et al., 2018; Leonardos et al., 2021; Zhang et al., 2021), a subset of general-sum Markov games in which the Nash equilibrium admits more efficient algorithms. Leonardos et al. (2021) gives a sample-efficient algorithm based on the policy gradient method (Agarwal et al., 2021). The special case of Markov cooperative games is studied empirically in e.g. Lowe et al. (2017); Yu et al. (2021). For one step potential games, Kleinberg et al. (2009); Palaiopanos et al. (2017); Cohen et al. (2017a) show the convergence to Nash equilibria of no-regret dynamics.
Preliminaries
We present preliminaries for multi-player general-sum Markov games as well as the solution concept of (approximate) Nash equilibrium. Alternative solution concepts and other concrete subclasses of Markov games considered in this paper will be defined in the later sections.
For any product policy , the best response for the player against is defined as any policy such that . For any Markov product policy, this best response is guaranteed to exist (and be Markov) as the above maximization problem is equivalent to solving a Markov Decision Process (MDP) for the player. We will also use the notation to denote the above value function .
We say is a Nash equilibrium (e.g. Nash (1951); Pérolat et al. (2017)) if all players play the best response against other players, i.e., for all ,
Note that in general-sum MGs, there may exist multiple Nash equilibrium policies with different value functions, unlike in two-player zero-sum MGs (Shapley, 1953). To measure the suboptimality of any policy , we define the NE-gap as
For any , we say is -approximate Nash equilibrium (-Nash) if .
A general correlated policy is a set of maps . The first argument of is a random variable sampled from some underlying distribution, and the other arguments contain all the history information and the current state information (unlike Markov policies in which the policies only depend on the current state information). The output of is a general distribution of actions in (unlike product policies in which the action distribution is a product distribution).
For any correlated policy and any player , we can define a marginal policy as a set of maps where , and the output of is defined as the marginal distribution of the output of restricted to the space . For any general correlated policy , we can define its initial state value function similar as (1). The best response value of the player against is , where is the value function of the policy (the player plays according to general policy , and all other players play according to ), and the supremum is taken over all general policy of the player.
Throughout this paper we consider the interactive learning (i.e. exploration) setting where algorithms are able to play episodes within the MG and observe the realized transitions and rewards. Our focus is on the PAC sample complexity (i.e. number of episodes of play) for any learning algorithm to output an approximate equilibrium.
1 Exponential lower bound for learning approximate Nash equilibrium
The focus of this paper is the setting where the number of players is large. Intuitively, as the joint action space has size which scales exponentially in (if each ), naive algorithms for learning Nash equilibrium may learn all by enumeratively querying all , and this costs exponential in samples. Unfortunately, recent work shows that such exponential in dependence is unavoidable in the worst-case for any algorithm—there is an sample complexity lower bound for learning approximate Nash, even in one-step general-sum games (Chen et al., 2015; Rubinstein, 2016) (see Proposition A.0 for formal statement).
This suggests that the Nash equilibrium as a solution concept may be too hard to learn efficiently for MGs with a large number of players, and calls for alternative solution concepts or additional structural assumptions on the game in order to achieve an improved dependence.
Efficient Learning of Coarse Correlated Equilibria (CCE)
Given the difficulty of learning Nash when the number of players is large , we consider learning other relaxed notions of equilibria for general-sum MGs. Two standard notions of equilibria for games are the Correlated Equilibrium (CE) and Coarse Correlated Equilibrium (CCE), and they satisfy for general-sum MGs (Nisan et al., 2007).
We begin by considering learning CCE (most relaxed notion above) for Markov games.
We say a (general) correlated policy is an -approximate Coarse Correlated Equilibrium (-CCE) if
We say is an (exact) CCE if the above is satisfied with .
The following result shows that there exists an algorithm that can learn an -approximate CCE in general-sum Markov games within episodes of play.
Suppose we run the CCE-V-Learning algorithm (Algorithm 4) for all players and
episodes ( is a log factor). Then with probability at least , the certified policy defined in Algorithm 2 is an -CCE, i.e. .
For small enough , the sample complexity featured in Theorem 2 scales as . Most notably, this is the first algorithm that scales with , and exhibits a sharp difference in learning Nash and learning CCE in view of the lower bound for learning Nash in Proposition A.0. Indeed, existing algorithms such as Multi-Nash-VI Algorithm with CCE subroutine (Liu et al., 2021) does require episodes of play, which scales with due to its model-based nature. We achieve significantly better dependence on and also , though slightly worse dependence.
Our CCE-V-Learning algorithm (deferred to Appendix C.1 due to space limit) is a multi-player adaptation of the Nash V-Learning algorithm of Bai et al. (2020); Tian et al. (2021) for learning Nash equilibria in two-player zero-sum MGs. Similar as Bai et al. (2020), we show that this algorithm enjoys a “no-regret” like guarantee for each player at each (Lemma C.0). We also adopted the choice of hyperparameters in Tian et al. (2021) so that the sample complexity has a slightly better dependence in . When combined with the “certified correlated policy” procedure (Algorithm 2), our algorithm outputs a policy that is -CCE. Our certified policy procedure is adapted from the certified policy of Bai et al. (2020), and differs in that ours output a correlated policy for all the players whereas Bai et al. (2020) outputs a product policy. The key feature enabling this dependence is that this algorithm uses decentralized learning for each player to learn the value function (), instead of learning the function (as in Liu et al. (2021)) that requires sample size scales as . The proof of Theorem 2 is in Appendix C.
Efficient Learning of Correlated Equilibria (CE)
In this section, we move on to considering the harder problem of learning Correlated Equilibria (CE). We first present the definition of CE in Markov games.
A strategy modification for player is a set of functions . A strategy modification can be composed with any policy to give a modified policy defined as follows: At any step and state with the history information , if chooses to play , the modified policy will play . We use denote the set of all possible strategy modifications for player .
We say a (general) correlated policy is an -approximate CE (-CE) if
We say is an (exact) CE if the above is satisfied with .
Our definition of CE follows (Liu et al., 2021) and is a natural generalization of the CE for the well-studied special case of one-step (i.e. normal form) games (Nisan et al., 2007).
Our algorithm CE-V-Learning (Algorithm 1) builds further on top of CCE-V-Learning and Nash V-Learning, and makes several novel modifications in order to learn the CE. The key feature of CE-V-Learning is that it uses a weighted swap regret algorithm (mixed-expert FTRL) for every . At a high-level, CE-V-Learning consists of the following steps:
Line 6-11 (Sample action using mixed-expert FTRL): For each we maintain “sub-experts” indexed by (Each sub-expert represents an independent “expert” that runs her own FTRL algorithm). Sub-expert first computes an action distribution via Follow-the-Regularized-Leader (FTRL; Line 8). Then we employ a two-step sampling procedure to obtain the action: First sample a sub-expert from a suitable distribution computed from , then sample the actual action from .
Line 13-17 (Take action and record observations): Player takes action and observes other player’s actions, the reward, and the next state. Sub-expert then computes a loss estimator and weight according to the observations, which will be used in future FTRL updates.
Line 19 (Optimistic value update): Updates the optimistic estimate of the value using step-size and bonus .
Finally, after executing Algorithm 1 for episodes, we use the certified correlated policy procedure (Algorithm 2) to obtain our final output policy . This procedure is a direct modification of the certified policy procedure of (Bai et al., 2020) and outputs a correlated policy (because the randomly sampled and in line 1 and line 4 of Algorithm 2 are used by all the players) instead of product policy. The same procedure is also used for learning CCEs earlier in Section 3.
Here we specify the hyperparameters used in Algorithm 1:
The constants used in Algorithm 2 is defined as
Note that for any , sums to one and defines a distribution over .
2 Overview of techniques
Here we briefly overview the techniques used in Algorithm 1.
Minimizing swap regret via mixed-expert FTRL The key technical advance in our Algorithm 1 over CCE-V-Learning and Nash V-Learning is the use of mixed-expert FTRL (Line 6-11). The purpose of this is to allow the algorithm to achieve low swap regret at each in a suitable sense—For one-step (normal form) games, it is known that combining low-swap-regret learning for each player leads to an approximate CE (Stoltz, 2005; Cesa-Bianchi and Lugosi, 2006). To integrate this into Markov games, we utilize a celebrated reduction from low-swap-regret learning to usual low-regret learning (Blum and Mansour, 2007), which for any bandit problem with actions maintains sub-experts each running its own FTRL algorithm. Our particular application builds upon the two-step randomization scheme of Ito (2020) which first samples a sub-expert and the action from this sub-expert. The distribution for sampling the sub-expert is carefully chosen by solving a linear system (Line 10) so that also coincides with the (marginal) distribution of the sampled action, from which the reduction follows.
FTRL with predictable weights Applied naively, the above reduction does not directly work for our purpose, as our analysis requires minimizing the weighted swap regret with weights , whereas the reduction of Ito (2020) relies crucially on the vanilla (average) regret. We address this challenge by using a slightly modified FTRL algorithm for each sub-expert that takes in random but predictable weights (i.e. depending fully on prior information and “external” randomness). We present the analysis for such FTRL algorithm in Appendix G.4, and the consequent analysis for the weighted swap regret in Appendix G.1-G.3, both of which may be of independent interest.
Proposal distributions Finally, a nuanced but important new design in CE-V-Learning is that all sub-experts compute a proposal action distribution to sample the sub-expert and the associated action. Then, only the sampled sub-expert takes this action, and all other proposal distributions are discarded. This is different from the original algorithms of (Blum and Mansour, 2007; Ito, 2020) in which the FTRL update come after the sub-expert sampling and only happens for the sampled sub-expert. Our design is required here as otherwise the sub-experts are required to predict the next time when it is sampled in order to compute the weighted FTRL update, which is impossible.
3 Theoretical guarantee
We are now ready to present the theoretical guarantee for our CE-V-Learning algorithm.
Suppose we run the CE-V-Learning algorithm (Algorithm 1) for all players for
episodes ( is a log factor). Then with probability at least , the certified correlated policy defined in Algorithm 2 is an -CE, i.e. .
To the best of our knowledge, Theorem 5 presents the first result for learning CE that scales polynomially with , which is significantly better than the best known existing algorithm of Multi-Nash-VI with CE subroutine (Liu et al., 2021) whose sample complexity scales with . Similar as in Theorem 2, this follows as our CE-V-Learning uses decentralized learning for each player to learn the value function () . We also observe that our sample complexity for learning CE is higher than for learning CCE by a factor of ; the additional factor is expected as CE is a strictly harder notion of equilibrium. The proof of Theorem 5 can be found in Appendix D.
Finally, combining Theorem 2 & 5 with the exponential lower bound for learning Nash (Section 2.1), we obtain a full characterization of which equilibria can be learned with sample complexity in general-sum Markov games: This is possible for CCE and CE, but not Nash.
Learning Nash Equilibria in Markov Potential Games
In this section, we consider learning Nash equilibria in Markov Potential Games (MPGs), an important subclass of general-sum MGs. Despite the curse of number of players of learning Nash in general-sum MGs, recent work shows that learning Nash in MPGs does not require sample size exponential in , by using stochastic policy gradient based algorithms (Leonardos et al., 2021; Zhang et al., 2021). In this section, we provide an alternative algorithm Nash-CA that also achieves a mild dependence on and an improved dependence on by a simple reduction to single-agent learning.
We first present the definition of MPGs. Our definition is the finite-horizon variantOur results can easily adapted to the discounted infinite time horizon setup. of the definitions of Macua et al. (2018); Leonardos et al. (2021); Zhang et al. (2021) and is slightly more general as we only require (4) on the total return. Throughout this section, denotes a Markov product policy.
(Markov potential games) A general-sum Markov game is a Markov potential game if there exists a potential function mapping any product policy to a real number in , such that for any , any two policies of the player, and any policy of other players, the difference of the value functions of the player with policies and is equals the difference of the potential function on the same policies, i.e.,
Note that the range of the potential function admits a trivial upper bound (this can be seen by varying for one at a time). An important example of MPGs is Markov Cooperative Games (MCGs) where all players share the same reward .
2 Algorithm and theoretical guarantee
We present a simple algorithm Nash-CA (Nash Coordinate Ascent) for learning an -Nash in MPGs. As its name suggests, the algorithm operates by solving single-agent Markov Decision Processes (MDPs) one player at a time, and intrinsically performing coordinate ascent on the potential function of the Markov game. Due to the potential structure of MPGs and the boundedness of the potential function, the local improvements of players across the steps can have an accumulative effect on the potential function, and the algorithm is guaranteed to stop after a bounded number of steps. We give the full description of the Nash-CA in Algorithm 3. We remark that Nash-CA is additionally guaranteed to output a pure-strategy Nash equilibrium (cf. Appendix E for definition).
For Markov potential games, with probability at least , Algorithm 3 terminates within steps of the while loop, and outputs an -approximate (pure-strategy) Nash equilibrium. The total episodes of play is at most
where is a log factor.
For small enough , the sample complexity for the Nash-CA algorithm in the above theorem is . As , this at most scales with the number of players as , which is much better than the exponential in sample complexity for general-sum MGs without additional structures. Compared with recent results on learning Nash via policy gradients (Leonardos et al., 2021; Zhang et al., 2021), the Nash-CA algorithm also achieves dependence, and significantly improves on the dependence from their to . In addition, our algorithm does not require assumptions on bounded distribution mismatch coefficient as they do, due to the exploration nature of our single-agent MDP subroutine.
Also, compared with the sample complexity bound of the Nash-VI algorithm (Liu et al., 2021) for general-sum MGs (not restricted to MPGs), our Nash-CA algorithm doesn’t suffer from the exponential dependence on thanks to the MPG structure. We do achieve a looser in the dependence on , yet overall our sample complexity is still better unless is exponentially small. The proof of Theorem 7 can be found in Appendix E.
To accompany Theorem 7, we establish a sample complexity lower bound of for learning pure-strategy Nash in MCGs and hence MPGs (Theorem F.0 in Appendix F). This lower bound improves in the dependence over the naive reduction to single-player MDPs (Domingues et al., 2021), which gives , though is loose on the dependence. The improved dependence is achieved by constructing a novel class of hard instances of on one-step games (Lemma F.0), which may be of further technical interest. However, there is still a large gap between these lower bounds and the best current upper bound of either our or the of Liu et al. (2021), which we leave as future work.
Conclusion
This paper investigates the question of when can we solve general-sum Markov games (MGs) sample-efficiently with a mild dependence on the number of players. Our results show that this is possible for learning approximate (Coarse) Correlated Equilibria in general-sum MGs, as well as learning approximate Nash equilibrium in Markov potential games. In both cases, our sample complexity bounds improve over existing results in many aspects. Our work opens up many interesting directions for future work, such as sharper algorithms for both problems, sample complexity lower bounds, or how to perform sample-efficient learning in general-sum MGs with function approximations. In addition to Markov potential games, it would also be interesting to explore alternative structural assumptions that permit sample-efficient learning.
Acknowledgement
Ziang Song is partially supported by the elite undergraduate training program of School of Mathematical Sciences in Peking University.
References
Appendix A Exponential in m𝑚m Lower Bound for Learning Nash in General-sum MGs
In this section, we give a sample complexity lower bound for computing approximate Nash equilibrium in one-step binary-action general-sum MGs (, and ) which has an exponential dependence in , the number of players. The result is built on the lower bound of query complexity in Rubinstein (2016).
We use to denote the one-step Markov game ( and ), in which there are players and actions for each player. We index the players by and denote the actions space of each player by . Since we restricted attention to binary-action games (i.e. ), the total number of joint actions is .
We define a (exact) query as the procedure where the algorithm queries a joint action and observes the (deterministic) reward . We define the query complexity (Chen et al., 2015) for learning -approximate Nash equilibrium (ANE) as the following.
The query complexity for learning -ANE is defined as the smallest such that there exists a randomized oracle algorithm satisfying the following: for any binary-action, m-player game , the algorithm can use no more than sequential queries of the reward to output an -ANE with probability at least .
In one-step MGs with deterministic reward, the query complexity is equivalent to the sample complexity, since each query obtains a reward entry. The following result in Rubinstein (2016) gives a query complexity lower bound for learning -ANE in -player binary action games.
There exists absolute constants and , such that for all ,
This result shows that it is impossible for any algorithm to learn an -ANE for every binary action game with probability at least using samples: such an algorithm with would only use samples, yet the sample complexity lower bound in Proposition A.0 requires at least samples. Since Proposition A.0 allows , this also rules out the possibility of learning -ANE with samples for all small .
Appendix B Q function and Bellman equations
From these definitions, we have the Bellman equations
for all (where we have set for all ).
Appendix C Proofs for Section 3
Our algorithm used to learn CCE in general-sum MGs is a combination of Algorithm 4 and Algorithm 2. In particular, Algorithm 4 computes a set of policies and plays these policies in each episode. Algorithm 2 used the full history in Algorithm 4 to produce a certified, general correlated policy which we will show to be a CCE (we will also use the same Algorithm 2 to produce the certified policy in the algorithm of learning CE). During the execution of Algorithm 2, if the index is at some step , the certified policy can choose any action at and after step .
In Algorithm 4, we choose the hyper-parameters as follows:
where is some absolute constant, and is a log factor. The choice of follows the V-OL algorithm in Tian et al. (2021) which helps to shave off an factor in the sample complexity compared with the original Nash V-Learning algorithm in Bai et al. (2020).
Here, we have a short comment on the log factor . In fact, we need to be for some absolute constant . For the cleanness of the results, in this paper, we ignore this difference since this would not harm the correctness of all the results we present.
C.2 Proof of Theorem 2
We begin with an auxiliary lemma on (its definition is in (3)).
The following properties hold for :
1. for every .
2. and for every .
3. for every .
4. for every .
Property 4 above does not appear in (Jin et al., 2018), for which we provide a quick proof here:
Here, (i) uses is increasing in for fixed . ∎
Towards proving Theorem 2, we begin with a simple consequence of the update rule in Algorithm 4, which will be used several times later.
Fix a state in time step and fix an episode , let and suppose s was previously visited at episodes at the -th step. The update rules in Algorithm 4 gives the following equations:
We next present and prove the following lemma which helps to explain why our choice of the bonus term is . The constant in is actually the same with the constant in this lemma.
Fix a state in time step and fix an episode , let and suppose s was previously visited at episodes at the -th step. With probability at least , for any , there exist a constant c s.t.
into where
So we can apply Azuma-Hoeffding inequality. Note that by Lemma C.0. Using Azuma-Hoeffding inequality, we have with probability at least
After taking a union bound, we have the following statement is true with probability at least ,
Then we bound . For fixed , if we define the loss function
simultaneously for all . By Lemma C.0 and , we have with probability at least
Again, taking a union bound in all , we have with probability at least ,
Finally, we concluded that with probability at least , we have
Recall that the certified policy as in Algorithm 2 is a nested mixture of policies. We further define policies in Algorithm 5. By construction, the relationship between and is that when players jointly play policy the , they first sample from , then they play together the policy (Algorithm 5 for ) with the same sampled . As a result, we have the following relationship:
We define the policy starting from the -th step for player as . At each step , samples action based on current state, the history starting from the -th step and a random number . We use to denote all policies for player starting from the -th step. Similar to Section 2, we can define general correlated policy starting from the -th step (where the random numbers may be correlated for different players), and we use to denote all such general correlated policy starting from the -th step.
For , we can define the value function starting from the -th step as:
We also define the value function of the best response as:
One example of a policy starting from the -th step is defined in Algorithm 5, so that we can define and .
for all with probability at least .
Proof of Lemma C.0 We prove this lemma by backward induction over . The base case of is true as all the value functions equal by definition. Suppose the claim is true for . We begin with upper bounding . Let and for to be the ’th time that is previously visited. By the definition of certified policies and by the value iteration formula of MGs, we have for any policy ,
Conditional on the high probability event in Lemma C.0, we use the inductive hypothesis to obtain
Here, (i) uses our choice of and .
Meanwhile, for , by the definition of certified policy and inductive hypothesis,
Here, (i) uses
As a result, the backward induction would work well for all as long as the inequalities in Lemma C.0 and (9) hold for all . Taking a union bound in all , we have with probability at least , the inequality in (9) is true simultaneously for all . Therefore the inequalities in Lemma C.0 and (9) hold simultaneously for all with probability at least . This finishes the proof of this lemma. ∎
Equipped with these lemmas, we are ready to prove Theorem 2.
Proof of Theorem 2 Conditional on the high probability event in Lemma C.0 (this happens with probability at least ), we have
for all . Then, choosing and , we have
Moreover, by (7), value function of certified policy can be decomposed as
where the decomposition is due to the first line in the Algorithm 2: sample Uniform().
To prove is an approximate CCE, we only need to bound . Letting and . Suppose was previously visited at episodes at the -th step. By the update rule,
We can use Lemma C.0 which gives and to get
where we also uses .
Taking the summation w.r.t. k, we begin by the first two terms;
where (i) is by changing the order of summation and (ii) is by Lemma C.0.
where we assume . So we have
Recursing this argument for gives
Therefore, guarantees that we have for all . This complete the proof of Theorem 2. ∎
Appendix D Proofs for Section 4
In this section we prove Theorem 5. We first define a set of lower value estimates (along with the upper estimates used in Algorithm 1) via the following update rule:
We emphasize that are analyses quantities only for simplifying the proof, and are not used by the algorithm.
The following lemma is the same as Lemma C.0 in the CCE case (except that for a different algorithm).
Fix a state in time step and fix an episode , let and suppose s was previously visited at episodes at the -th step. The update rule for and in Algorithm 1 and (10) gives the following equations:
We next prove the following lemma which helps explain our choice of the bonus term . The constant in is the same with the constant in this lemma. For any policy modification for the player and one-step policy for any , the modified policy is defined as follows: if chooses to play , the modified policy will play . Moreover, for , policy chooses when chooses .
Fix a state in time step and fix an episode , let and suppose s was previously visited at episodes at the -th step. With probability , for any , there exist a constant c s.t.
Proof of Lemma D.0 First, like the prove in Lemma C.0, we decompose
into where
We first bound . By the same reason in proof of Lemma C.0, we can apply Azuma-Hoeffding inequality. Note that by Lemma C.0. Using Azuma-Hoeffding inequality, we have with probability at least ,
After taking a union bound, the following statement is true with probability at least ,
Then we bound . For fixed , we define loss function
Now, for any fixed step and state , the distributions and visitation counts are only updated at episodes . Further, these updates are exactly equivalent to the mixed-expert FTRL update algorithm which we describe in Algorithm 8. Therefore, the above can be bounded by the weighted swap regret bound of Lemma G.0 (choosing the log term as ) to yield that
with probability at least . Taking a union bound over all , we have with probability at least ,
Finally, we conclude that with probability at least , we have
We define the auxiliary certified policies in Algorithm 6 (same as Algorithm 5 for the CCE case but repeated here for clarity). Again, we have the following relationship:
A strategy modification starting from the -th step for player is a set of functions . This strategy modification can be composed with any policy (as in Definition C.0) to give a modified policy defined as follows: At any step and state with the history information starting from the -th step , if chooses to play , the modified policy will play . We use denote the set of all such possible strategy modifications for player .
For any , also doesn’t depend on the history before the -th step, so , which implies that is well-defined in (8).
for all with probability at least .
Proof of Lemma D.0 We prove this lemma by backward induction over . The base case of is true as all the value functions equal . Suppose the claim is true for . We begin with upper bounding . Let and for to be the ’th time that is previously visited. By the definition of certified policies and by the value iteration formula of MGs, we have for any ,
Condition on the high probability event (with probability at least ) in Lemma D.0, we can use the inductive hypothesis to obtain
Here, (i) uses our choice of and , so that .
Meanwhile, for , by the definition of certified policy and inductive hypothesis,
Here, (i) uses
As a result, the backward induction would work well for all as long as the inequalities in Lemma D.0 and (12) hold for all . Taking a union bound in all , we have with probability at least , the inequality in (12) is true simultaneously for all . Therefore the inequalities in Lemma C.0 and (12) hold simultaneously for all with probability at least . This finishes the proof of this lemma. ∎
Equipped with these lemmas, we are ready to prove Theorem 5.
Proof of Theorem 5 Conditional on the high probability event in Lemma D.0 (this happens with probability at least ), we have
for all . Then, choosing and , we have
Moreover, by (11), value function of certified policy can be decomposed as
where the decomposition is due to the first line in the Algorithm 2: sample Uniform(). Therefore we have the following bound on :
By Lemma D.0 Letting and . By the update rule, we have
Taking the summation w.r.t. k, by the same argument in the proof of Theorem 2, we can get
Therefore, if , we have holds for all , which means is an -approximate CE. This completes the proof of Theorem 2. ∎
Appendix E Proofs for Section 5
A particular property of MPGs is that, there always exists a pure-strategy Nash equilibrium. Such a property does not hold for every general-sum MG. Pure-strategy Nash equilibria are preferred in many scenarios since each player can take deterministic actions.
For any Markov potential games, there exists a pure-strategy Nash equilibrium.
See Theorem 3.1 in Leonardos et al. (2021) or Proposition 1 in Zhang et al. (2021) for a proof of Proposition E.0.
E.2 The UCBVI-UPLOW sub-routine
We consider the UCBVI-UPLOW algorithm (Algorithm 7), which is adapted from (Xie et al., 2021; Liu et al., 2021), for learning approximate optimal policy in reinforcement learning problems. Such an algorithm is used as a sub-routine in Algorithm 3 to learn approximate pure-strategy Nash equilibria in MPGs. We remark that although in Algorithm 3 we propose to use the UCBVI-UPLOW algorithm to search for a near optimal policy, many alternative algorithms can be used to find the near optimal policy (e.g., UCBVI (Azar et al., 2017) or Q-learning (Jin et al., 2018)). Here we choose the UCBVI-UPLOW algorithm because 1) it has a tight sample complexity bound; 2) it outputs a deterministic policy which can be used to find a pure-strategy approximate Nash equilibrium.
We have the following sample complexity guarantee for the UCBVI-UPLOW algorithm returning an -approximate optimal policy.
The UCBVI-UPLOW algorithm always returns a deterministic policy . Moreover, for any , letting and taking the number of episodes
then with probability at least , the returned policy is -approximate optimal, i.e., .
Proof of Lemma E.0 First, is obviously deterministic from line 12 of Algorithm 7.
The sample complexity guarantee of the UCBVI-UPLOW algorithm is a consequence of the sample complexity guarantee of the Nash-VI algorithm for learning Nash in zero-sum Markov games as proved in Liu et al. (2021).
By this correspondence, the UCBVI-UPLOW algorithm is actually a specific version of the Nash-VI algorithm in Liu et al. (2021), and Line 12 in UCBVI-UPLOW is actually a specific version of line 12 in Nash-VI in Liu et al. (2021): this is because in this specific Markov game, and only depend on and , so that is actually in the CCE set .
By this reduction and by Theorem 4 in Liu et al. (2021), this lemma is proved. ∎
E.3 Proof of Theorem 7
Because we can choose the log factor as (this doesn’t affect the correctness of the theorem), for each execution of UCBVI-UPLOW, by Lemma E.0, it return a -optimal deterministic policy with probability at least . Taking a union bound, we have
simultaneously for all and with probability at least . For the empirical estimator , it’s bounded in . Thus by Hoeffding’s inequality, for fixed and
Choosing for some large constant , we have
Apply this inequality to and and taking a union bound, we have
simultaneously for all and with probability at least . As a result, by (14) and (15), we have
simultaneously for all and with probability at least . On this event,
If the while loop doesn’t end after the -th iteration and , there exists s.t. , so we have
Here, follows the definition of potential function. Because is bounded, the while loop ends within steps. Therefore, (16) holds simultaneously for all and before the end of while loop with probability at least . Again, on this event, if the while loop stops at the end of -th step, we have , then
So the returned policy is a -approximate Nash equilibrium. Moreover, since UCBVI-UPLOW outputs a pure-strategy policy and our initial policy is also a pure-strategy policy, we can conclude that with probability at least , within steps of the while loop, Algorithm 3 outputs an -approximate (pure-strategy) Nash equilibrium.
Finally, the number of episodes within each step of the while loop is
So the total sample complexity (episodes) is at most
Appendix F Lower Bound of Finding Approximate Pure-Strategy Nash Equilibrium
In this section, we present an result on the sample complexity lower bound for learning a pure-strategy Nash equilibrium in MPGs (a harder task than learning Nash as pure-strategy Nash is a stricter notion). We remark that our lower bounds are actually constructed on Markov Cooperative Games (MCGs) which is a subset of MPGs. Note that for MCGs, the potential function is bounded in , so by Theorem 7, the sample complexity of Nash-CA (Algorithm 3) is highlighting the dependency on , and . We would show this dependency is inevitable for learning -approximate pure-strategy Nash equilibrium in MCGs by proving an lower bound.
Suppose , , , and . Then, there exists an absolute constant such that for any and any online finetuning algorithm that outputs a pure-strategy policy , if the number of episodes
then there exists general-sum Markov cooperative game on which the algorithm suffers from -suboptimality, i.e.
This theorem can be viewed as a corollary of the following lemma by a simple reduction. We would prove this theorem in the next subsection. One-step (general-sum) game is a game with only one state and one step. In a one-step game, each player chooses an action simultaneously and then receive it’s own reward. The Nash equilibrium and NE-gap can be defined similarly in one-step games.
Suppose , and . Then, there exists an absolute constant such that for any and any online finetuning algorithm that outputs a pure strategy , if the number of samples
then there exists a one-step game with stochastic reward, on which the algorithm suffers from -suboptimality, i.e.
The proof of this lemma is also in the next subsection. In the proof, we first construct a class of one-step games which reward is or depending on the taken joint-action. The proportion of joint-actions with reward is relatively small. Most importantly, every pure-strategy -approximate Nash equilibrium has reward . So in order to find an -approximate pure-strategy Nash equilibrium, we must explore sufficient joint-actions. The number of the joint-actions with reward can be bounded by the covering number of under Hamming distance. Then we use KL divergence decomposition (Lemma F.0) to argue rigorously that we need to explore sufficient joint-actions to get an -approximate pure-strategy Nash equilibrium.
The rest of this section is organized as follows: We first prove Lemma F.0 in Section F.1, and then prove the main Theorem F.0 in Section F.2.
There’s dependencyWe only prove this lower bound when all equal to . This case is representative. in the lower bound of sample complexity for finding a pure-strategy -approximate Nash equilibrium in MCGs. This bound is novel and improves the existing result. The existing proof in sample complexity’s lower bound of Markov games (Bai and Jin (2020)) relies on an reduction from Markov games to single-agent MDPs, so the existing lower bound’s dependency on is .
Here, we don’t include factor in our lower bound. The difficulty is that the NE-gap only depends on the player with the most suboptimality. For a single-agent MDP, if the player can change the policy at each state to improve the expected cumulative reward by , then the player can change policy at all state to improve the expected cumulative reward to the utmost extent. In general-sum Markov games, at different state, maybe different players can change the policy for this state to improve his expected cumulative reward by . However, the definition NE-gap only allows one player to change the policy. This difference in nature makes and incompatible in the lower bound.
If we consider another notion of suboptimality, i.e., changing maximum to summation:
This definition of NE-gap is different from the previous definition. With , if each player can change his policy to improve his expected cumulative reward by , the would be at least . Then we can similarly define -approximate Nash equilibrium as the policy such that . We simply point out that with this new definition of and -approximate Nash equilibrium, mimicking the proof of Theorem 2 in Dann and Brunskill (2015), we can prove the sample complexity’s lower bound for learning a pure-strategy -approximate Nash equilibrium in Markov (cooperative) games is .
F.1 Proof of Lemma F.0
For convenience, we call the joint-action (in one-step game) that is a Nash equilibrium a Nash strategy. We begin with a special case of Lemma F.0, i.e. the case when for all .
Suppose , and . Then, there exists an absolute constant such that for any and any algorithm that outputs a pure strategy , if the number of samples
then there exists a one step game with stochastic reward on which the algorithm suffers from -suboptimality, i.e.,
The proof of this lemma further relies on the following lemma.
There exists a one-step game for players where each player has two actions. The deterministic reward is or and the number of joint actions that have 1 is at most . Moreover, the only pure-strategy Nash equilibria are these joint actions which have reward .
Proof of Lemma F.0 We use to denote the reward of (joint) actions and define hamming distance . To ensure that pure-strategy Nash equilibria must have reward 1, we only need to ensure that for a , there exists one such that
In other words, the set is a 1-net of under the distance . By the definition of covering number, we only need to prove
Define . By hamming code (Hamming (1950)), we know that for any integer ,
Moreover, we also have by adding 0 and 1 behind the 1-net of . Taking largest such that and iterating this construction on the Hamming code we get . This ends the proof. ∎
The next lemma is KL divergence decomposition (Lemma 15.1 of (Lattimore and Szepesvári, 2020)]), we restate it in one-step games.
Then we return to the proof of Lemma F.0. Suppose a game satisfies the condition in Lemma F.0, by permuting the actions of , we get games. They all satisfy the condition in Lemma F.0. Suppose the reward of the -th game is () .
We consider the following family of one-step games with stochastic reward: Let .
where in one-step game , the reward is sampled from if the joint action is Moreover, we define as a game whose reward is sampled from independent of the action.
We further let denote the uniform distribution on .
Proof of Lemma F.0 Fix a one-step game , by Lemma F.0, it’s clear that pure-strategy Nash equilibria form a set . We have . For any online finetuning algorithm that outputs a pure strategy . Suppose takes joint-action . From the structure of the , we know
Since is a sufficient statistics for the posterior distribution , we have
where is because of the permutation. Finally, we choose , if , then
So there’s a game instance on which the algorithm suffer from sub-optimality. ∎
The difference between Lemma F.0 and F.0 is the size of action space. To prove the case, we need to generalized F.0 to the case each player have actions.
For all positive integers and . There exists a one-step game for players where each player has actions. The deterministic reward is or and the number of joint actions that have 1 is at most . Moreover, the only pure-strategy Nash equilibria are these joint actions which has reward .
Proof of Lemma F.0 We would prove this lemma by induction. Without loss of generality, we suppose the action for each player is . First, we define the hamming distance between two vectors.
The joint action space is . Suppose we have an -net of , , which means for every , we can find a , s.t. . If the reward of a game satisfy:
Then for every pure strategy which has reward , we can find another pure strategy s.t. and . This means that one player can change to obtain higher reward. So is not a pure-strategy Nash equilibrium.
As a result, we can construct a game based on the -net. The only thing left to be verified is that the number of joint actions that have reward 1 is at most . Note that the number of joint actions that have reward 1 is actually , so we need to prove
where denotes the covering number.
For , from the proof of Lemma F.0, (17) is true. For , we first decompose into smaller blocks, i.e.
where . Among these blocks, we choose the blocks which satisfy . Apparently, there are blocks satisfying . Because (17) is true for , we can pick a -net of with at most elements. By a translation, (all elements add a constant vector), we can pick a -net of each block with at most elements. Totally there are at most elements. These elements form a set . We would prove is a -net of .
In fact, for any , suppose is in . After translating this block to , is coincided with .
If , change to such that . Suppose is the vector in block that corresponds to in . This gives . Moreover, because the translation from to only changes the first component.
If , we can find in such that because is a -net. Suppose and differs at the -th component. We can change to s.t. . Suppose corresponds to in and in . By the definition of , we know . Moreover, and only differ at the -th component because of translation and the fact that and only differ at the -th component. and also only differ at the -th component because of translation. So we have and may only differ at the -th component, i.e. .
Recall that . To conclude, we can always find another vector such that , this means is a -net of . So (17) is proved. ∎
Using this fundamental lemma and suppose a game satisfies the condition in Lemma F.0, by permuting the actions of , we get games. They all satisfy the condition in Lemma F.0. Suppose the reward of the -th game is () .
We consider the following family of one-step games with stochastic reward: Let .
where in one-step game , the reward is sampled from if the joint action is Moreover, we define as a game whose reward is sampled from independent of the action.
Then by the same argument in proof of Lemma F.0, we can easily prove Lemma F.0.
F.2 Proof of Theorem F.0
We are now ready to prove Theorem F.0 based on Lemma F.0.
Because , we construct a class of general-sum Markov games as follows (see figure 1): the set of all joint-actions can be divided into two sets an .
For any and , and , where . This also implies the Markov game is cooperative.
If we choose as the joint action with reward in defined in (18). By the construction, for any pure-strategy policy , if the joint actions taken at step is , we have . The only useful information in each episode is the transition at step . Transition from to can be viewed as getting a reward and transition from to can be viewed as getting a reward. So learning pure-strategy Nash equilibrium of this class of Markov games is equivalent to learning pure-strategy Nash equilibrium of a game for players with stochastic reward. As a result, by Lemma F.0, if the number of episodes
then there exists general-sum Markov cooperative game on which the algorithm suffers from -suboptimality, i.e.
Appendix G Adversarial Bandit with Low Weighted Swap Regret
In this section, we describe and analyze our main algorithm for adversarial bandits with low weighted swap regret. Our Algorithm, Mixed-expert Follow-The-Regularized-Leader (FTRL) for weighted adversarial bandits, is described in Algorithm 8.
G.1 Main result for adversarial bandit with low weighted swap regret
We first define a strategy modification. A strategy modification is a function which can also be applied to any action distribution , such that gives the swap distribution which takes action with probability .
The swap regret (Blum and Mansour, 2007; Ito, 2020) measures the difference between the cumulative realized loss for the algorithm and that for swapped action sequences generated by an arbitrary strategy modification . Here, we consider a weighted version of the swap regret with some non-negative weights , defined as
We will also consider a slightly modified version of the swap regret used in our analyses for learning CE, defined as
where is -th action distribution (from which the action is sampled from) played by the algorithm.
We now state our main result of this section.
If we execute Algorithm 8 for rounds and the weights are chosen according to (2), then with probability at least , we have the following bounds on the swap regret simultaneously for all :
The rest of this section is devoted to proving Lemma G.0, organized as follows. We first present some important properties of Algorithm 8 in Section G.2. We then prove Lemma G.0 in Section G.3 using new auxiliary results on weighted adversarial bandits with predictable weights. Lastly, these auxiliary results are stated and proved in Appendix G.4.
G.2 Properties of Algorithm 8
Here we show that, the updates for any particular sub-expert in Algorithm 8 is exactly equivalent to an FTRL update (with loss sequence being the ones only over the episodes in which is sampled) which we summarize in Algorithm 9. This is important as our proof relies on reducing the weighted swap regret to a linear combination of weighted regrets for each sub-expert .
To see this, fix any . When is sampled in Line 6 at episode , we have accumulator and weight at the end of episode . Action is chosen from distribution
So from the sub-expert ’s perspective, she is performing FTRL (follow the regularized leader) with changing step size and random weight (We summarize this in Algorithm 9). Suppose the sub-expert is chosen at episode , then the weighted regret for sub-expert becomes
Recall is chosen as in (2). We have the following bound:
The weight have a (non-random) upper bound .
G.3 Proof of Lemma G.0
We use to denote the sampled sub-expert at the -th episode. Define as the -algebra generated by all the random variables observed up to the end of the -th episode.
First observe that for we have the bound
also, for we have the bound
Term and can be bounded by concentration in a similar fashion; here we first focus on term . Observe that at the -th episode, as obtained in Line 5 solves the equation
As there is at most strategy modifications, we can substitute with , and take a union bound to get
simultaneously for all with probability at least . We also note that, by a similar argument (as is also distributed according to conditioned on the past), we have that
Therefore for bounding both and , it suffices to bound term .
We next bound term . Define and let be the value of at the end of the -th episode, i.e. . We also suppose the sub-expert was chosen at episode up to episode . Then we have
Here the last equation is because our choice of which is a simple corollary from the definition of in Eq. (3).
where defined in (22) is the weighted regret for sub-expert , we can use our result on weighted adversarial bandits with predictable weights (Lemma G.0) to bound this term (The upper bound of the weight can be taken as by the calculation of (23). Moreover, and is increasing, so is non-decreasing.). Recall that our choice of log term is where . Thus by Lemma G.0, with probability at least ,
Here, (i) uses (26), (ii) uses the is increasing w.r.t. and (iii) uses . Finally, because , by the concavity of , we have with probability at least ,
Combining this with (24) and (25), we finish the proof. ∎
G.4 Auxiliary lemmas for weighted adversarial bandit with predictable weights
In this subsection, we consider the Follow the Regularized Leader (FTRL) algorithm (Lattimore and Szepesvári, 2020) with
weighted regret with -measurable weights and loss distributions,
We present these results because the predictable weights we would use are potentially unbounded from above; if weights are predictable and also bounded, then there may be an easier analysis.
We assume the predictable sequence have a global (non-random) upper bound . Then we define the log term . We set
G.4.1 Regret bound
In the following, we consider to give a high probability weighted regret bound for Algorithm 9.
Let be any -predictable sequence satisfying for some constant (non-random) almost surely. Moreover, suppose is non-decreasing. Then, following Algorithm 9, with probability at least , for any and we have
where .
This lemma follows from the bound in Lemma G.0 and a concentration step that we establish below.
Denote , then we have
with probability at least . Summing the above and the regret bound shown in Lemma G.0, we finish the proof. ∎
Let be any -predictable sequence satisfying for some constant (non-random) almost surely. Moreover, suppose is non-decreasing. Then, following Algorithm 9, with probability at least , for any and we have
where .
The regret can be decomposed into three terms
and we bound in Lemma G.0, in Lemma G.0 and in Lemma G.0.
Setting , the conditions in Lemma G.0 and Lemma G.0 are satisfied. Putting them together and take union bound, we have with probability
The rest of this section is devoted to the proofs of the Lemmas used in the proofs of Lemma G.0. We begin the following useful lemma adapted from Lemma 1 in Neu (2015), which is crucial in constructing high probability guarantees.
For any predictable sequence of coefficients s.t. w.r.t. and fixing , we have with probability at least ,
Define , and . By definition,
where is because for all .
where is because for any and . Here we are using the condition to guarantee the condition is satisfied.
Equipped with the above bound, we can now prove the concentration result.
Denote , and note that
Using Lemma G.0, we can bound the separately as below.
If for all and is non-increasing, with probability , for any and ,
In fact, applying Theorem 26.13 in Lattimore and Szepesvári (2020) gives that
where is by using Lemma G.0 with . The any-time guarantee is justified by taking union bound. ∎
With probability , for any ,
To bound the second term, we use similar argument in the proof of Lemma G.0 , we define , . and , notice
with probability at least . Taking a union bound, we get
with probability at least . On this event, choosing , we have
With probability , for any and any , if is non-increasing in ,
Then for all the , apply Lemma G.0 with . Since now , the condition in Lemma G.0 is satisfied. As a result, for any and , we have with probability at least that
Taking a union bound, we have with probability at least ,
Since any is a convex combination of , on this event, we also have