parameters: (dist, payoff_matrices, proj_grad=True)
return_statement: return (grad_dist,), unreg_exp, unreg_exp
docstring: Computes exploitablity gradient.
  
    Args:
      dist: 1-d np.array, current estimate of nash distribution
      payoff_matrices: (>=2 x A x A) np.array, payoffs for each joint action
      proj_grad: bool, if True, projects dist gradient onto simplex
    Returns:
      gradient of payoff w.r.t. (dist) as tuple
      unregularized exploitability (stochastic estimate)
      unregularized exploitability (stochastic estimate) *duplicate
docstring_summary: Computes exploitablity gradient.
docstring_tokens: Computes exploitablity gradient .
function: def gradients(dist, payoff_matrices, proj_grad=True):
    """Computes exploitablity gradient.
  
    Args:
      dist: 1-d np.array, current estimate of nash distribution
      payoff_matrices: (>=2 x A x A) np.array, payoffs for each joint action
      proj_grad: bool, if True, projects dist gradient onto simplex
    Returns:
      gradient of payoff w.r.t. (dist) as tuple
      unregularized exploitability (stochastic estimate)
      unregularized exploitability (stochastic estimate) *duplicate
    """
    nabla = payoff_matrices[0].dot(dist)
  
    unreg_exp = np.max(nabla) - nabla.dot(dist)
  
    grad_dist = -nabla
    if proj_grad:
      grad_dist = simplex.project_grad(grad_dist)
  
    return (grad_dist,), unreg_exp, unreg_exp
function_tokens: def gradients ( dist , payoff_matrices , proj_grad = True ) : nabla = payoff_matrices [ 0 ] . dot ( dist ) unreg_exp = np . max ( nabla ) - nabla . dot ( dist ) grad_dist = - nabla if proj_grad : grad_dist = simplex . project_grad ( grad_dist ) return ( grad_dist , ) , unreg_exp , unreg_exp