summaries: This paper builds off of Gray et. al. by swapping out the blueprint that is trained on human data with one that is trained from scratch using a deep learning variant of Nash-Q learning. The new method is able to achieve what appears to be superhuman performance in 1v1 Diplomacy and also does well but with mixed results in 6v1 Diplomacy against existing methods.  The paper proposes learning methods for the No-Press variant of the board game Diplomacy.   The method uses an equilibrium search method (similar to [9]) to solve for Nash in a single turn of the game, estimating future returns with a value function one turn in the future. Then a policy is trained to predict the equilibrium found, while the value function is trained to predict the values of the Nash equilibrium, which implements value iteration.  The equilibrium search method is based on prior work [9]. This tackles the large action space by restricting search to only the most likely actions from a policy network. This is extended in this work by using Double Oracle to expand the action set, and using a Diplomacy-specific method to generate proposal actions, which exploits the graph structure of the game. The paper also introduces a transformer-based model for learning to play Diplomacy, which outperforms previous Graph-Network approaches, and advances methods to estimate the exploitability of a Diplomacy agent.  Experimental results show that this results in an agent that can defeat human opponents convincingly in a 2-player variant of Diplomacy.  Diplomacy is a complex 7-player strategy game that poses a challenge for RL due to its simultaneous moves and combinatorially large action space. In recent years significant progress has been made on learning human-level play by starting from imitation learning on a dataset of human play from websites, and then using some policy improvement algorithms. This paper tackles the exploration problem, introducing a policy improvement algorithm that reaches competitive-quality play without requiring a dataset, using Nash Q-learning, a double oracle-like method, regret matching, and geographically local perturbations for action proposals. They also find advantage from switching to a transformer-based architecture.  Their method (DORA) exhibits strong results in 1v1 human play, as well as being the first from-scratch agent able to play on par with DipNet (an imitation baseline) in a 1v6 setting, in a metagame that DORA wasn’t trained in.  Separately, their policy improvement method on top of an imitation network beats previous SOTA (SearchBot). This paper describes an algorithm that trains agents through self-play with no human data and no reward shaping, and can accommodate the large action space of Diplomacy. It is an algorithm for action exploration and equilibrium approximation in games with combinatorial action spaces. This algorithm simultaneously performs value iteration reinforcement learning while learning a policy proposal network. Meanwhile, a double oracle step is used to explore additional actions to add to the policy proposals. They train an agent completely from scratch for a 2-player variant of Diplomacy and show that it achieves superhuman performance. They also train an agent for the 7-player no-press Diplomacy entirely from scratch with no human data for the first time and show that this agent differs radically from past agents that required human data. This approach therefore opens up the ability to investigate novel ways of playing the game.  The paper proposes an approach called DORA for building agents for the Diplomacy board game, which is a long standing AI challenge. The key achievement in the paper is constructing agents in a way that does not rely on imitating human gameplay (as opposed to some recent works which at least in part leverages historical game data). Diplomacy is hard because it has a large action space and as it is a game with many players (7 in the full game, but only two int eh France/Austria variant). The results are very good for the two player (France/Austria) variant against people. The results are more mixed in the 7 player game - when there are many copies of DORA, it does very well, but less well when there are many copies of another bot and one DORA player. 
abstractText: Prior AI successes in complex games have largely focused on settings with at most hundreds of actions at each decision point. In contrast, Diplomacy is a game with more than 10 possible actions per turn. Previous attempts to address games with large branching factors, such as Diplomacy, StarCraft, and Dota, used human data to bootstrap the policy or used handcrafted reward shaping. In this paper, we describe an algorithm for action exploration and equilibrium approximation in games with combinatorial action spaces. This algorithm simultaneously performs value iteration while learning a policy proposal network. A double oracle step is used to explore additional actions to add to the policy proposals. At each state, the target state value and policy for the model training are computed via an equilibrium search procedure. Using this algorithm, we train an agent, DORA, completely from scratch for a popular two-player variant of Diplomacy and show that it achieves superhuman performance. Additionally, we extend our methods to full-scale no-press Diplomacy and for the first time train an agent from scratch with no human data. We present evidence that this agent plays a strategy that is incompatible with human-data bootstrapped agents. This presents the first strong evidence of multiple equilibria in Diplomacy and suggests that self play alone may be insufficient for achieving superhuman performance in Diplomacy.
authors.name: Anton Bakhtin
authors.name: David Wu
authors.name: Adam Lerer
authors.name: Noam Brown
references.authors: Lukáš Adam Rostislav Horčík Tomáš Kasl Tomáš Kroupa
references.title: Double oracle algorithm for computing equilibria in continuous games
references.authors: Thomas Anthony Tom Eccles Andrea Tacchetti János Kramár Ian Gemp Thomas C Hudson Nicolas Porcel Marc Lanctot Julien Pérolat Richard Everett
references.title: Learning to play no-press diplomacy with best response policy iteration
references.venue: arXiv preprint arXiv:2006.04635,
references.authors: Christopher Berner Greg Brockman Brooke Chan Vicki Cheung Przemysław Dębiak Christy Dennison David Farhi Quirin Fischer Shariq Hashme Chris Hesse
references.title: Dota 2 with large scale deep reinforcement learning
references.venue: arXiv preprint arXiv:1912.06680,
references.authors: David Blackwell
references.title: An analog of the minimax theorem for vector payoffs
references.venue: Pacific Journal of Mathematics,
references.authors: Noam Brown Anton Bakhtin Adam Lerer Qucheng Gong
references.title: Combining deep reinforcement learning and search for imperfect-information games
references.venue: arXiv preprint arXiv:2007.13544,
references.authors: Noam Brown Tuomas Sandholm
references.title: Simultaneous abstraction and equilibrium finding in games
references.venue: In Twenty-Fourth International Joint Conference on Artificial Intelligence,
references.authors: Noam Brown Tuomas Sandholm
references.title: Solving imperfect-information games via discounted regret minimization
references.venue: In Proceedings of the AAAI Conference on Artificial Intelligence,
references.authors: Noam Brown Tuomas Sandholm
references.title: Superhuman AI for multiplayer poker
references.venue: Science, page eaay2400,
references.authors: Lasse Espeholt Hubert Soyer Remi Munos Karen Simonyan Volodymir Mnih Tom Ward Yotam Doron Vlad Firoiu Tim Harley Iain Dunning
references.title: Impala: Scalable distributed deeprl with importance weighted actor-learner architectures
references.venue: arXiv preprint arXiv:1802.01561,
references.authors: Jonathan Gray Adam Lerer Anton Bakhtin Noam Brown
references.title: Human-level performance in no-press diplomacy via equilibrium search
references.venue: arXiv preprint arXiv:2010.02923,
references.authors: James Hannan
references.title: Approximation to bayes risk in repeated play
references.venue: Contributions to the Theory of Games,
references.authors: Sergiu Hart Andreu Mas-Colell
references.title: A simple adaptive procedure leading to correlated
references.venue: equilibrium. Econometrica,
references.authors: Junling Hu Michael P Wellman
references.title: Nash q-learning for general-sum stochastic games
references.venue: Journal of machine learning research,
references.authors: Manish Jain Dmytro Korzhyk Ondřej Vaněk Vincent Conitzer Michal Pěchouček Milind Tambe
references.title: A double oracle algorithm for zero-sum security games on graphs
references.venue: In The 10th International Conference on Autonomous Agents and Multiagent Systems-Volume
references.authors: Diederik P Kingma Jimmy Ba
references.title: Adam: A method for stochastic optimization
references.venue: arXiv preprint arXiv:1412.6980,
references.authors: Marc Lanctot Kevin Waugh Martin Zinkevich Michael Bowling
references.title: Monte carlo sampling for regret minimization in extensive games
references.venue: In Advances in neural information processing systems,
references.authors: Marc Lanctot Vinicius Zambaldi Audrunas Gruslys Angeliki Lazaridou Karl Tuyls Julien Pérolat David Silver Thore Graepel
references.title: A unified game-theoretic approach to multiagent reinforcement learning
references.venue: In nternational Conference on Neural Information Processing Systems,
references.authors: Michael L Littman
references.title: Markov games as a framework for multi-agent reinforcement learning
references.venue: In Machine learning proceedings
references.authors: R Duncan Luce Howard Raiffa
references.title: Games and decisions: Introduction and critical survey
references.venue: Courier Corporation,
references.authors: Stephen Mcaleer JB Lanier Roy Fox Pierre Baldi
references.title: Pipeline psro: A scalable approach for finding approximate nash equilibria in large games
references.venue: Advances in Neural Information Processing Systems,
references.authors: Brendan McMahan Geoffrey Gordon Avrim Blum
references.title: Planning in the presence of cost functions controlled by an adversary
references.venue: In International conference on machine learning,
references.authors: Volodymyr Mnih Koray Kavukcuoglu David Silver Andrei A Rusu Joel Veness Marc G Bellemare Alex Graves Martin Riedmiller Andreas K Fidjeland Georg Ostrovski
references.title: Human-level control through deep reinforcement learning
references.venue: Nature, 518(7540):529–533,
references.authors: Philip Paquette Yuchen Lu Seton Steven Bocco Max Smith O-G Satya Jonathan K Kummerfeld Joelle Pineau Satinder Singh Aaron C Courville
references.title: No-press diplomacy: Modeling multi-agent gameplay
references.venue: In Advances in Neural Information Processing Systems,
references.authors: Adam Paszke Sam Gross Francisco Massa Adam Lerer James Bradbury Gregory Chanan Trevor Killeen Zeming Lin Natalia Gimelshein Luca Antiga
references.title: Pytorch: An imperative style, high-performance deep learning library
references.venue: In Advances in neural information processing systems,
references.authors: Lloyd S Shapley
references.title: Stochastic games
references.venue: Proceedings of the national academy of sciences,
references.authors: David Silver Aja Huang Chris J Maddison Arthur Guez Laurent Sifre George Van Den Driessche Julian Schrittwieser Ioannis Antonoglou Veda Panneershelvam Marc Lanctot
references.title: Mastering the game of go with deep neural networks and tree
references.venue: search. Nature,
references.authors: David Silver Thomas Hubert Julian Schrittwieser Ioannis Antonoglou Matthew Lai Arthur Guez Marc Lanctot Laurent Sifre Dharshan Kumaran Thore Graepel
references.title: A general reinforcement learning algorithm that masters chess, shogi, and go through self-play
references.authors: David Silver Julian Schrittwieser Karen Simonyan Ioannis Antonoglou Aja Huang Arthur Guez Thomas Hubert Lucas Baker Matthew Lai Adrian Bolton
references.title: Mastering the game of go without human knowledge
references.authors: Vasilis Syrgkanis Alekh Agarwal Haipeng Luo Robert E Schapire
references.title: Fast convergence of regularized learning in games
references.venue: In Advances in Neural Information Processing Systems,
references.authors: Tom Van de Wiele David Warde-Farley Andriy Mnih Volodymyr Mnih
references.title: Q-learning in enormous action spaces via amortized approximate maximization
references.venue: arXiv preprint arXiv:2001.08116,
references.authors: Oriol Vinyals Igor Babuschkin Wojciech M Czarnecki Michaël Mathieu Andrew Dudzik Junyoung Chung David H Choi Richard Powell Timo Ewalds Petko Georgiev
references.title: Grandmaster level in starcraft ii using multi-agent reinforcement learning
sections.text: 1 Introduction
  Classic multi-agent AI research domains such as chess, Go, and poker feature action spaces with at most thousands of actions per state, and are therefore possible to explore exhaustively a few steps deep. In contrast, modern multi-agent AI benchmarks such as StarCraft, Dota, and Diplomacy feature combinatorial action spaces that are incredibly large. In StarCraft and Diplomacy, this challenge has so far been addressed by bootstrapping from human data [32, 24, 3, 11]. In Dota, this challenge was addressed through careful expertdesigned reward shaping [4].
  In contrast, in this paper we describe an algorithm that trains agents through self play without any human data and can accommodate the large action space of Diplomacy, a longstanding AI benchmark game in which the number of legal actions for a player on a turn is often more than 1020 [24].
  We propose a form of deep RL (reinforcement learning) where at each visited state the agent approximates a Nash equilibrium for the stage game with 1-step lookahead search, plays the equilibrium policy, and uses the equilibrium value as the training target. Since the full action space is too large to consider, this equilibrium is computed over a smaller set of candidate
  35th Conference on Neural Information Processing Systems (NeurIPS 2021).
  actions. These actions are sampled from an action proposal network that is trained in unison with the value model. We show that our deep Nash value iteration algorithm, when initialized with a human-bootstrapped model, defeats multiple prior human-derived agents in no-press Diplomacy by a wide margin.
  Next, we investigate training an agent completely from scratch with no human data in Diplomacy. In order to improve action exploration when training from scratch, the proposal actions are augmented with exploratory actions chosen through a double-oracle-like process, and if these discovered actions end up as part of the equilibrium then they will be learned by the proposal network. Using this technique, which we call DORA (Double Oracle Reinforcement learning for Action exploration), we develop a superhuman agent for a popular two-player variant of Diplomacy. Our agent is trained purely through self-play with no human data and no reward shaping.
  We also train a DORA agent for the 7-player game of no-press Diplomacy, the first no-press Diplomacy agent to be trained entirely from scratch with no human data. When 6 DORA agents play with 1 human-data-based agent, all human-data-based agents perform extremely poorly. However, when one DORA agent plays with 6 human-data-based agents, the bot underperforms. These results suggest that self-play in 7-player Diplomacy may converge to equilibria that are incompatible with typical human play. This is in contrast to previous large-scale multi-agent benchmarks like multiplayer poker [9] and validates Diplomacy as a valuable benchmark for learning policies that are compatible with human behavior.
sections.heading: 2 Background and Related Work
sections.heading: 2.1 Description of Diplomacy
sections.text: In this section we summarize the rules of Diplomacy. For a more detailed description, see [24]. No-press Diplomacy is a zero-sum board game where 7 players compete for control on a map of Europe. The map contains 75 locations, 34 of which are supply centers (SCs). Each player begins with 3-4 units and 3-4 SCs and a player wins by controlling a majority (18) of the SCs. If no player controls a majority and all remaining players agree to a draw, then the victory is divided between the uneliminated players. In case of a draw, we use the Sum-of-Squares (SoS) scoring system that defines the score of player i as C2i / ∑ i′ C 2 i′ , where Ci is the SC count for player i.
  Each turn during movement, all players simultaneously choose an action composed of one order for every unit they control. An order may direct a unit to hold stationary, to move to an adjacent location, to support a nearby unit’s hold or move, to move across water via convoy, or to act as the convoy for another unit. Because a player may control up to 17 units with an average of 26 valid orders for each unit, the number of possible actions is typically too large to enumerate. Additionally, in Diplomacy, often supports or other critical orders may be indistinguishable from a no-op except in precise combinations with other orders or opponent actions. This makes the action space challenging to learn with black-box RL. Actions are simultaneous, so players typically must play a mixed strategy to avoid being predictable and exploitable.
  In the popular France vs. Austria (FvA) variant of Diplomacy, the number of players is reduced to two, but the victory condition and all game rules, including the number of locations and centers, remain the same. FvA serves as an effective way to isolate the challenge of an astronomically large imperfect-information action space from the challenge of Diplomacy’s multi-agent nature.
sections.heading: 2.2 Stochastic Games
sections.text: Stochastic games [26] are a multi-agent generalization of Markov decision processes. At each state, each player chooses an action and the players’ joint action determines the transition to the next state. Formally, at each state s ∈ S agents simultaneously choose a joint action a = (a1, . . . , aN ) ∈ A1×· · ·×AN , whereN is the number of players. Agents then receive a reward according to a vector function r(s,a) ∈ RN and transition to a new state s′ = f(s,a). The game starts at initial state s0 and continues until a terminal state is reached, tracing a trajectory τ = ((s0,a0), ..., (st−1,at−1)) where f(st−1,at−1) is terminal. Each agent i plays according to a policy πi : S → ∆Ai, where ∆Ai is a set of probability distributions over actions inAi. Given a policy profileπ = (π1, . . . , πN ), the probability of a trajectory is p(τ |π) = ∏ (s,a)∈τ p(a|a ∼ π(s)), and we define the vector of
  expected values of the game rooted at state s as V (π, s) = ∑ τ∈T (s) p(τ |π) ∑ (st,at)∈τ γ tr(st,at) where T (s) is the set of terminal trajectories beginning at s. We denote by V (π) := V (π, s0) the value of a game rooted in the initial state. We denote by π−i the policies of all players other than i.
  A best response (BR) for agent i against policy profile π is any policy that achieves maximal expected value. That is, π∗i is a BR to π if Vi(π ∗ i , π−i) = maxπ′i Vi(π ′ i, π−i). A policy profile is a Nash equilibrium (NE) if all players’ policies are BRs to each other. Letting Vi be the ith component of V , π is a NE if:
  ∀i ∀π′i : Vi(π) ≥ Vi(π′i,π−i) An -NE is a policy profile in which an agent can only improve its expected reward by at most by switching to a different policy. If a policy profile is an -NE, we say its exploitability is .
  We may also talk about Nash equilibria for one stage of the game rather than the whole game. For any state s, supposing we have values Q(s,a) that represent the expected values of playing joint action a in state s assuming some policy profile is played thereafter, we may define a new 1-step game where instead the game ends immediately after this action andQ(s,a) is itself the final reward. For such stage games, notationally we denote NE using the symbol σ rather than π.
sections.heading: 2.3 Nash Q-Learning
sections.text: Value iteration methods such as Nash-Q have been developed that provably converge to Nash equilibria in some classes of stochastic game, including 2p0s (two-player zero-sum) stochastic games [19, 14]. Nash-Q learns joint Q values Q(s,a) that aim to converge to the state-action value of (s,a) assuming that some NE π is played thereafter. This is done by performing 1-step updates on a current estimated functionQ as in standard Q-learning, but replacing the max operation with a stage game NE computation.
  Formally, suppose that a is played in s leading to s′. A NE σ, σi ∈ ∆Ai, is computed for the stage game at s′ whose payoffs for each joint action a′ are specified by the current values of Q(s′,a′). The value of this game to each player assuming this NE is then used as the target values ofQ(s,a). The update rule is thus:
  Q(s,a)← (1− α)Q(s,a) + α ( r(s,a) + γ ∑ a′ σ(a′)Q(s′,a′) ) , (1)
  where α is the learning rate, γ is the discount factor, and σ(a) := ∏ i σi(ai) is the probability of joint action a.
  As presented later in Section 3.1, the foundation of our algorithm is an adaptation of Nash QLearning, with several modifications to make it suitable for deep RL and adjusted to use a value function rather than a Q function.
sections.heading: 2.4 Double Oracle
sections.text: Double oracle (DO) is an iterative method for finding a NE over a large set of actions in a matrix game [22]. It leverages the fact that computing a best response is computationally much cheaper than computing a NE. Starting from a small set of candidate actions A0i ⊆ Ai for each player i, on each iteration it computes a NE σt in the matrix game restricted to the candidate actions At. Then, at each iteration t for each player i it finds the best response action at+1i ∈ Ai to the restricted NE σt and creates At+1i := A t i ⋃ {at+1i }. Formally, a t+1 i is an action in the full action set Ai that satisfies
  at+1i = arg max a′∈Ai ∑ a∈At Qi(s, a1, . . . , ai−1, a ′, ai+1, . . . , aN ) ∏ j 6=i σtj(aj). (2)
  DO-inspired methods have been used in a variety of other work for handling large or continuous action spaces [15, 7, 18, 1, 21]. Although in the worst case the equilibrium policy may have support over a large fraction of the action space, in practice in many problems a small subset of actions may suffice, and in this case DO-based methods can be computationally efficient due to being able to restrict equilibrium computation to only a tiny fraction of the total number of actions.
  As we will present in Section 3.2, we make use of a DO-like procedure both within the RL loop and at inference time, and show it to be an effective way to introduce novel good actions to the policy.
sections.heading: 2.5 Regret Matching
sections.text: Both Nash-Q-Learning and DO require the computation of NEs in matrix games, which we approximate using the iterative regret matching (RM) algorithm [5, 13], as has been done in past work [11]. RM is only guaranteed to converge to a NE in 2p0s games and other special classes of games [12]. Nevertheless, past work has found that it produces competitive policies that have low exploitability in important non-2p0s games including six-player poker and no-press Diplomacy [9, 11]. We therefore use RM to approximate a NE σ in restricted matrix games during DO.
  In RM, each player i has a regret value for each action ai ∈ Ai. The regret on iteration t is denoted Regretti(ai). Initially, all regrets are zero. On each iteration t of RM, σ t i(ai) is set according to
  σti(ai) =  max{0,Regretti(ai)}∑ a′ i ∈Ai max{0,Regretti(a′i)} if ∑ a′i∈Ai
  max{0,Regretti(a′i)} > 0 1 |Ai| otherwise
  (3)
  Next, each player samples an action a∗i fromAi according to σti and all regrets are updated such that
  Regrett+1i (ai) = Regret t i(ai) + vi(ai, a ∗ −i)− ∑ a′i∈Ai σti(a ′ i)vi(a ′ i, a ∗ −i), (4)
  where vi(a) is the utility of player i in the matrix game. This sampled form of RM guarantees that the average policy over all iterations converges to a -NE in 2p0s games at a rate of at worst O( 1 2 ) iterations with high probability [17]. In order to improve empirical performance, we use linear RM [8], which weighs updates on iteration t by t.1 We also use optimism [30], in which the most recent iteration is counted twice when computing regret.
sections.heading: 3 Algorithms
sections.text: We now describe DORA in detail. DORA simultaneously learns a state-value function and an action proposal distribution via neural networks trained by bootstrapping on an approximate Nash equilibrium for the stage game each turn. A DO-based process is used to discover actions.
sections.heading: 3.1 Deep Nash Value Iteration
sections.text: The core of the learning procedure is based on Nash Q-Learning as presented in Section 2.3, but simplified to use only a value function, with adaptations for large action spaces and function approximation.
  Approximating a Q-function in a game with an action space as large as Diplomacy is challenging. However, in Diplomacy as in many other domains, the reward r(s, a) depends only on the next state s′ = f(s, a) and not on how it was reached, and since the transition function is known and can be simulated exactly, we can redefine r to be a function of just the next state s′. In that case, we can rewrite Update Rule 1 (from Section 2.3) in terms of a state value function:
  V (s)← (1− α)V (s) + α(r(s) + γ ∑ a′ σ(a′)V (f(s,a′))) (5)
  Since the state space is large, we use a deep neural network V (s; θv) with parameters θv to approximate V (s). Since the action space is large, exactly computing the Nash equilibrium σ for the 1-step matrix game at a state is also infeasible. Therefore, we train a policy proposal network π(s; θπ) with parameters θπ that approximates the distribution of actions under the equilibrium policy at state s. We generate a candidate action set at state s by sampling Nb actions from π(s; θπ) for each player and selecting the Nc Nb actions with highest likelihood. We then approximate a NE σ via RM (described in Section 2.5) in the restricted matrix game in which each player is limited to their Nc actions assuming successor states’ values are given by our current value network V (s; θv).
  We explore states via self-play to generate data, with both players following the computed NE policy with an probability of instead exploring a random action from among the Nc proposals. Also, in
  1In practice, rather than weigh iteration t’s updates by t we instead discount prior iterations by t t+1 in order to reduce numerical instability. The two options are mathematically equivalent.
  place of θv and θπ , self-play uses slightly-lagged versions of the networks θ̂v and θ̂π to compute σ that are only updated periodically from the latest θv and θπ in training, a normal practice that improves training stability [23]. We then regress the value network towards the computed stage game value under the NE σ using MSE loss (whose gradient step is simply the above update rule), and regress the policy proposal network towards σ using cross entropy loss:
  ValueLoss(θv) = 1
  2
  ( V (s; θv)− r(s)− γ
  ∑ a′ σ(a′)V ( f(s,a′); θ̂v ))2 PolicyLoss(θπ) = −
  ∑ i ∑ ai∈Ai σi(a) log πi(s, ai; θπ),
  (6)
  We show in Appendix B that in 2p0s games, the exact tabular form of the above algorithm with mild assumptions and without the various approximations for deep RL provably converges to a NE. Outside of 2p0s games and other special classes, both Nash Q-learning and RM lack theoretical guarantees; however, prior work on Diplomacy and 6-player poker have shown that similar approaches still often perform well in practice [11, 3, 9], and we also observe that DORA performs well in 7-player no-press Diplomacy.
  At a high level our algorithm is similar to previous algorithms such as AlphaZero [28] and ReBeL [6] that update both a policy and value network based on self-play, leveraging a simulator of the environment to perform search. The biggest differences between our algorithm and AlphaZero are that 1-ply RM acts as the search algorithm instead of Monte Carlo tree search (just as in [11]), the value update is uses a 1-step bootstrap instead of the end-of-game-value (which allows the trajectory generation to be off-policy if desired), and the policy network acts as an action proposer for the search but does not regularize the search thereafter. Our algorithm is also similar to a recent method to handle large action spaces for Q-learning [31] and reduces to it in single-agent settings.
sections.heading: 3.2 Double-Oracle-Based Action Discovery
sections.text: The algorithm in Section 3.1 relies on the policy network to generate good candidate actions. However, good actions initially assigned too low of a probability by the network may never be sampled and reinforced. To address this, we use a mechanism based on double oracle, described in Section 2.4, to introduce novel actions. However, vanilla DO requires computing the expected value of all actions against the restricted matrix game NE. Since our action space is too large to enumerate, we generate only a pool of Np Nc actions to consider. A natural idea to generate this pool would be to sample actions uniformly at random from all actions. However, our results in Section 5.1 show this approach performs poorly. Intuitively, in a combinatorial action space as large as in Diplomacy often only a minuscule fraction of actions are reasonable, so random sampling is exceedingly unlikely to find useful actions (see Fig 1 for an example).
  We instead generate the pool of Np actions for a player by generating local modifications of the candidate actions already in the restricted matrix game equilibrium. We first sample uniformly among the player’s Nd (d ≤ c) most probable actions in that equilibrium. Next, for each sampled action, we randomly sample a single location on the map and consider all units of the player adjacent to the location. For those units, we randomly choose legal valid new orders. We add the order in this pool that best-responds to the equilibrium as a new candidate action, and DO proceeds as normal.
  As shown in Table 3, we found this method of action sampling to outperform simply picking legal and valid combinations of orders uniformly at random. Intuitively, this is likely because locality in Diplomacy, as in a wide variety of other problem domains and algorithms, is a powerful inductive bias and heuristic. Perturbations of good actions are vastly more likely than random actions to also be good, and spatially-nearby actions are more likely to need to covary than spatially-distant ones.
  To further improve the scalability of our algorithm, we apply several additional minor approximations, including computing some of the above expected values using sampling and capping the number of DO iterations we perform. For details, see Appendix D.
sections.heading: 4 Implementation and Methods
sections.text: We describe our implementation of the above algorithms and training methods as applied to training in Diplomacy. For details on the exact parameters, see Appendix D. The code and the models are available online 2.
sections.heading: 4.1 Data Generation and Training
sections.text: We implement deep Nash value iteration following the same considerations as deep Q-learning. Multiple data generation workers run self-play games in parallel. The policy and value targets on each turn along with the game state they correspond to are collected in a shared experience replay buffer and sampled by a set of training workers to train the networks. The policy proposal and value networks used by the data generation workers are only periodically updated from those in training.
  During self play, each agent plays according to its part of the computed approximate-NE policy σ with probability 1− , and with probability plays a uniformly random action from the Nc actions obtained from the policy proposal network. We also use larger values of on the first two turns to quickly introduce diversity from the opening state, similar to the use of larger early exploration settings in other work, for example AlphaZero [29, 28]. Detailed parameters are in Appendix D.
  Algorithm 1 Approximated Double Oracle 1: function FINDEQUILIBRIUMWITHDO(s, Nc, Np, Niters, ) 2: A← SAMPLEACTIONSFROMPROPOSALNET(s, Nc) 3: σ ← COMPUTEEQUILIBRIUM(s,A) 4: for t = (1..Niters) do 5: modified← 0 6: for i = (1..Nplayers) do 7: Âi ← GENERATEACTIONS(s,Ai, Np) . Uniform sampling or local modification 8: vi ← Ea∼σ [Vi(f(s,a); θv)] 9: a∗i , v ∗ i ← argmax
  ai∈Âi Ea−i∼σ−i [Vi(f(s,a); θv)]
  10: if v∗i − vi > then 11: Ai ← Ai ⋃ {a∗i } 12: σ ← COMPUTEEQUILIBRIUM(s,A) 13: modified← 1 14: if !modified then 15: Break
  return σ
  16: function GENERATEACTIONSLOCALMODIFICATION(s, Abase, Np) 17: A← {} 18: while |A| < Np do 19: a← SAMPLEACTION(Abase) 20: loc← SAMPLEMAPLOCATION() 21: clique← GETNEIGHBOURS(loc) 22: a′ ← RANDOMCOORDINATEDMODIFICATION(a, clique) 23: A← A ⋃ {a′}
  return A
sections.heading: 4.2 Model Architecture
sections.text: Our model closely follows the encoder-decoder architecture of [11]. We use the policy head to model the policy proposal distribution and the value head to predict the expected values of the players.
  We found several adjustments to be effective for our use in deep Nash-based RL. Firstly, we removed all dropout layers, as we found this to improve training stability. Secondly, we replaced the graph convolution-based encoder with a simpler transformer encoder, improving model quality and removing the need to hardwire the adjacency matrix of the Diplomacy map into the architecture. Lastly, we also split the network into separate policy and value networks. Since our regret minimization procedure is essentially only a 1-ply search, the states on which we need to evaluate policy
  2https://github.com/facebookresearch/diplomacy_searchbot
  (the current state) and value (the states after one turn) are disjoint, so there is no gain to computing both policy and value in one network query, and we found splitting the networks improved the quality and effective capacity of the models. We measure the impact of these choices in Table 2 and describe the architecture in more detail in Appendix A.
sections.heading: 4.3 Exploitability Testing
sections.text: To obtain a metric of the exploitablity of our final agents, we also train additional exploiter agents that rather than attempting to play an equilibrium, instead hold the exploited agent fixed and attempt to converge to a best response. We compare two approaches.
  In the first approach, we reimplement the same actor-critic method with sampled entropy regularization previously used in [11] for 7-player no-press Diplomacy and apply it to 2-player FvA. In this approach, the other agent is treated as a black box, reducing the problem to just a standard Markov Decision Process to which we can apply classical RL techniques. Namely, we use Impala [10], an asynchronous version of actor-critic algorithm. Since search agents may take several seconds to act, [11] first trained a policy network to copy the behavior of the search agent and then applied RL to exploit this proxy agent. The proxy agent acts much faster, which enabled generating data faster. In contrast, we optimized the training loop so that it was possible to train to exploit the search agent directly without first generating a proxy policy network agent.
  In the second approach, we begin with the policy and value models of the exploited agent and resume deep Nash value iteration, except with a single simple modification, described in Appendix E, that results in learning a best response rather than an equilibrium.
sections.heading: 5 Results
sections.text: Diplomacy features two main challenges for AI research: its large combinatorial action space and its multi-agent (non-2p0s) nature. DORA is intended to address the former challenge. To measure its effectiveness on just the action-exploration aspect, we first present results in a 2p0s variant of Diplomacy called France vs. Austria (FvA). We show DORA decisively beats top humans in FvA.
  Next, we present results for 7-player no-press Diplomacy, which has been a domain for much prior research [24, 3, 11]. We train a DORA agent from scratch with no human data and test it against pre-trained models from previous work [24, 11]3. In the 6v1 setting, (six DORA agents playing with one copy of another bot) DORA wins overwhelmingly against all other agents. However, in the 1v6 setting (one DORA agent playing with six copies of another bot), DORA does slightly worse than previous search agents that leveraged human data. Our results suggest that DORA converges to strong play within an equilibrium (i.e., a “metagame”) that is very different from how humans play. Finally, we present results showing that adding our RL algorithm on top of a human-bootstrapped model clearly beats prior bots in both the 1v6 and 6v1 settings.
sections.heading: 5.1 Results in 2-player France vs. Austria
sections.text: In 2-player FvA, we tested our final DORA agent against multiple top players of this variant, inviting them to play a series of games against our agent. All players were allowed to play an arbitrary number of practice games against the agent before playing official counted games. Prior to running the games, we also implemented a simple variance reduction method, described in Appendix C.
  3See Appendix D for the details.
  In Table 1 we report both the raw and variance-reduced average scores. DORA defeats top human players by a large and highly significant margin, with an average score of 78% after variance reduction. It also wins significantly more than half of games as France, the side considered much harder to play4. These results show DORA achieves a level of play in FvA above that of top humans.
  We ran several ablations to loosely estimate the relative importance of the various components contributing to our final agent for France vs Austria.
  GraphConv vs Transformers
  Double Oracle at Training Time See Table 2. Although not a primary focus of this paper, we found that at least for use in RL, changing our model architecture to use a transformer encoder rather than a graph-convolution encoder in Section 4.2 resulted in significant gains over prior neural network architectures in Diplomacy [24, 3, 11], while using fewer parameters and still being similarly fast or faster in performance. Enlarging the model and splitting the network led to further gains.
  See Table 3. We demonstrate the effectiveness of our DO method in finding improved actions during training. DO’s ability to discover new strong actions for the policy proposal network to learn makes a big difference in the final agent. Local modification sampling is effective, whereas random sampling is relatively ineffective.
  Double Oracle at Inference Time See Table 4. We also demonstrate the effectiveness of our DO method in finding improved candidate actions at inference time. Uniform random sampling among legal actions to generate the action pool for finding best responses only improves the weakest of our baseline agent at inference time, due to being ineffective at finding better actions within the huge action space, whereas local modification sampling improves all baselines at inference time.
sections.heading: 5.1.1 Exploitability
sections.text: We implemented and tested both algorithms from Section 4.3 to estimate a lower bound on the exploitability of our agents. We also test a variant where we adapt deep Nash value iteration for exploitation just as in the second method, but disable policy learning - the value network learns to predict states of higher exploitability, but the policy proposal network is fixed and does not learn.
  The results against our best agent are in Table 5. We find that despite being of superhuman strength, the agent is still relatively exploitable. In a 2p0s large-action-space setting, this is not necessarily
  4Between agents of similar strength we often observe France winning only about a third of games vs Austria.
  surprising. For example in Go, another game with a moderately large action space, there exist gaps of more than 1000 Elo (nearly 100% winrate) between different agents, all of which are superhuman, even with no explicit training for exploitation [27]. Moreover, in imperfect-information games such as Diplomacy, exploiting a fixed agent is much easier than training an agent with low exploitability, since the exploiting agent does not need to precisely balance the probabilities of its actions.
  Nonetheless, we also observe that our adaptation of the deep Nash value iteration method greatly outperforms the simpler actor-critic method from [11], and that both value learning and DO-based policy learning are important for its performance, with value learning improving over the baseline from 50% to 60.5%, and policy learning improving further to 85.8% winrate over DORA.
  We also observe that applying DO at inference time reduces the exploitability, from 90.5% using our strongest exploiter agent to 85.8%. Even at inference time, DO continues to find and suggest new effective actions that would otherwise be overlooked by the policy proposal network.
sections.heading: 5.2 Results in 7-player No-Press Diplomacy
sections.text: We also applied our methods to 7-player no-press Diplomacy, training a DORA agent entirely from scratch with no human data in this more-challenging domain. For comparison, we also trained an agent via deep Nash value iteration beginning from policy and value networks first trained on human games. Our best results were achieved when we forced the agent to use the human-initialized policy for action proposal during training games, never updating it, and also stopping the training early - see additional ablations in Appendix H). Since we do not update the action proposal policy used in training games, we also do not apply DO for this agent, and so we refer to this agent as HumanDNVINPU ("deep Nash value iteration, no proposal update"). The results are reported in Table 6. Note that as these are 7-player games, the expected score if the agents perform equally well is 1/7 ∼ 14.3%. Unlike in 2p0s settings, in a competitive multi-agent game, particularly one such as Diplomacy where agents must temporarily ally and coordinate to make progress, there may be multiple different equilibria that are mutually incompatible [20]. An agent playing optimally under one equilibrium may perform very poorly in a pool of agents playing a different equilibrium.
  For example in Diplomacy, it may be mutually benefit two agents to ally to attack a third, but in such cases players must often coordinate on a choice, for example on which unit attacks and which unit supports, or on which region to attack. Since an order and a support must exactly match to be effective, each choice may be a stable equilibrium on its own. But an agent that plays one choice in a population of agents that always play another in that situation will fail to match and will do poorly.
  Our results are consistent with DORA converging roughly to an equilibrium that is very different than the one played by humans, but playing well within that equilibrium. DORA achieves only about an 11% winrate in a 1-vs-6 setting against one of the strongest prior human-data-based agents, SearchBot [11] (tying would be a score of 1/7≈ 14.3%). However, SearchBot fares even worse with only a 1.1% winrate in a 1-vs-6 setting against DORA.
  Against a second DORA trained with a different random seed (Table 7), each DORA scores only about 3-8% against the other 1-vs-6. This suggests that different DORA runs may converge to different equilibria from each other.
  Our results with HumanDNVI-NPU are also consistent with reinforcement learning converging to inconsistent equilibria. HumanDNVI-NPU soundly defeats SearchBot, the prior SOTA, winning 36.3% of games 1-vs-6, while SearchBot wins only 0.5% in the reverse matchup. Starting from a human-like policy, deep Nash value iteration massively improves the strength of the agent. Yet HumanDNVI-NPU still does extremely poorly vs DORA, and vice versa. Our results seem to suggest that in 7-player no-press Diplomacy, deep Nash value iteration converges to an equilibrium in which outside agents cannot compete, even agents trained independently by the same method, but that which equilibrium is found depends on initialization, with some equilibria performing far better versus human-like players than others. See also Appendix H for additional ablations and experiments.
sections.heading: 6 Conclusions and Future Work
sections.text: Diplomacy has been a benchmark for AI research for two main reasons: its massive combinatorial action space and its multi-agent nature. We show that DORA achieves superhuman performance in 2- player Diplomacy without any human data or reward shaping, despite the combinatorial action space and imperfect information. DORA therefore effectively addresses the first challenge of Diplomacy.
  Additionally, we show that DORA in full-scale 7-player no-press Diplomacy approximates an equilibrium that differs radically from human-data-based agents. When one human-data-based agent plays against a population of DORA agents, the one agent loses by a wide margin. Similarly, one DORA agent against a population of human-data-based agents does not exceed an average level of performance. These 7-player results provide evidence that self-play from scratch may be insufficient to achieve superhuman performance in Diplomacy, unlike other multiplayer games such as 6-player poker [9]. Furthermore, the results suggest that there may be a wide space of equilibria, with some differing dramatically from human conventions. DORA provides the first competitive technique for exploring this wider space of equilibria without being constrained to human priors.
title: No-Press Diplomacy from Scratch