Constrained Exploitability Descent: An Offline Reinforcement Learning Method for Finding Mixed-Strategy Nash Equilibrium

Algorithm 2 Constrained Exploitability Descent (CED)
  Input: offline dataset D, discount factor γ, and iteration number K
  Output: last iterate νK for min-player

  Set policy constraint measure D(·, ·) and range δ, policy penalty parameter ϵ, and learning rate α
  Extract non-repetitive transition set D∗ , state set S, and action sets A, B from D
  Compute state distribution ρD and behavior policy (µβ , νβ ) from D
  {% Evaluate the value function  under behavior policy}                                                        !!2 
                                                                                                                    
  Compute Qµβ ,νβ = arg min                          Q(s, a, b) − r(s, a, b) + γE a′ ∼µβ (s′ ) [Q(s′ , a′ , b′ )]
                                         P
                           Q     (s,a,b,r,s′ )∈D∗                                  ′      ′
                                                                                     b ∼νβ (s )
                                                                                                                     
  Initialize Q0 = Qµβ ,νβ , µ0 = µβ , ν0 = νβ

  For k ∈ {1, 2, · · · , K}
    {% Apply Bellman operator
                             to the current value function}                                                    !!2 
                                                                                                                   
                                              Q(s, a, b) − r(s, a, b) + γE a′ ∼µk−1 (s′ ) [Qk−1 (s′ , a′ , b′ )]
                                    P
    Update Qk = arg min
                         Q  (s,a,b,r,s′ )∈D∗                               ′         ′
                                                                                  b ∼νk−1 (s )
                                                                                                                    
     For s ∈ S
       {% Update µ along ED-like gradient
                                     ( under policy constraint}
                                                                                                  2 )
                                        P                                  P
       Update µk (s) =   arg min           µ(s, a) − µk−1 (s, a) + αρD (s)   νk−1 (s, b)Qk (s, a, b)
                           µ(s)∈∆(A), s.t.     a∈A                                       b∈B
                          D(µ(s),µβ (s))≤δ
     For s ∈ S
       {% Compute approximate best
                                 response νunder policy penalty}                                  
                                                              µβ ,νβ
                                   P            P
       Compute νk (s) = arg max      ν(s, b) −      µk (s, a)Q       (s, a, b) − ϵDKL (ν(s), νβ (s))
                            ν(s)∈∆(B)    b∈B             a∈A




KL-divergence) to describe the closeness of two policies.           in Algorithm 1, the resulting max-player policy µ will surely
                                                                    deviate from the equilibrium of the original game for the
The following policy update formula is an example of ap-
                                                                    same reason in single-agent scenarios. Surprisingly, we find
plying direct policy constraints:
                                                                    that it is possible to instead keep the min-player policy ν
                                  Ea∼π(s) [Qπk (s, a)]
                                
     πk (s) =      arg max                                          unexploitable. We will further explain it through our subse-
                π(s)∈∆(A), s.t.                                     quent mathematical derivations in theoretical analysis. With
               D(π(s),πβ (s))≤δ
                                                                    this observation, we propose an offline equilibrium-learning
In comparison, a regularized value is computed when using           algorithm under policy constraints and call it Constrained
indirect policy penalties:                                          Exploitability Descent (CED; see Algorithm 2).
                    
πk (s) = arg max Ea∼π(s) [Q(s, a)] − ϵD(π(s), πβ (s))               CED inherits the basic structure of ED in each iteration. A
         π(s)∈∆(A)
                                                                    Q value is computed, the current µ is updated, and a best
For direct policy constraints, the optimality of the learned        response ν is computed in preparation for the next iteration.
policy is preserved only when the behavior policy πβ is             However, CED has multiple differences in detail:
close enough to the true optimal policy, which is in theory
a pure strategy in single-agent scenarios. However, this              • Qk is updated from the last Qk−1 rather than directly
is unlikely to happen since πβ is derived from an offline               solved under the current Bellman equation.
dataset. For indirect policy penalties, they face the same
problem since the resulting solution could never be a pure            • The update of µ at each state s ∈ S is under a direct
strategy (see Lemma 4.1 for the case of KL-divergence).                 policy constraint D(µ(s), µβ (s)) ≤ δ. An additional
                                                                        factor ρD (s) is also appended after the learning rate α.
4. Constrained Exploitability Descent
                                                                      • The computation of ν is based on Qµβ ,νβ (without esti-
For adversarial games, even if we only apply a constraint to            mating Qµk ,νk ) and is under a KL-divergence penalty
the computation of the best response ν † for the min-player             DKL (ν(s), νβ (s)) with a regularization parameter ϵ.

                                                                4
