Table of Contents
Fetching ...

NashOpt -- A Python Library for Computing Generalized Nash Equilibria

Alberto Bemporad

TL;DR

The library exploits the joint Karush-Kuhn-Tucker conditions of all players to handle both general nonlinear GNEs and linear-quadratic games, including their variational versions.

Abstract

NashOpt is an open-source Python library for computing and designing generalized Nash equilibria (GNEs) in noncooperative games with shared constraints and real-valued decision variables. The library exploits the joint Karush-Kuhn-Tucker (KKT) conditions of all players to handle both general nonlinear GNEs and linear-quadratic games, including their variational versions. Nonlinear games are solved via nonlinear least-squares formulations, relying on JAX for automatic differentiation. Linear-quadratic GNEs are reformulated as mixed-integer linear programs, enabling efficient computation of multiple equilibria. The framework also supports inverse-game and Stackelberg game-design problems. The capabilities of NashOpt are demonstrated through several examples, including noncooperative game-theoretic control problems of linear quadratic regulation and model predictive control. The library is available at https://github.com/bemporad/nashopt

NashOpt -- A Python Library for Computing Generalized Nash Equilibria

TL;DR

The library exploits the joint Karush-Kuhn-Tucker conditions of all players to handle both general nonlinear GNEs and linear-quadratic games, including their variational versions.

Abstract

NashOpt is an open-source Python library for computing and designing generalized Nash equilibria (GNEs) in noncooperative games with shared constraints and real-valued decision variables. The library exploits the joint Karush-Kuhn-Tucker (KKT) conditions of all players to handle both general nonlinear GNEs and linear-quadratic games, including their variational versions. Nonlinear games are solved via nonlinear least-squares formulations, relying on JAX for automatic differentiation. Linear-quadratic GNEs are reformulated as mixed-integer linear programs, enabling efficient computation of multiple equilibria. The framework also supports inverse-game and Stackelberg game-design problems. The capabilities of NashOpt are demonstrated through several examples, including noncooperative game-theoretic control problems of linear quadratic regulation and model predictive control. The library is available at https://github.com/bemporad/nashopt
Paper Structure (27 sections, 45 equations, 5 figures)

This paper contains 27 sections, 45 equations, 5 figures.

Figures (5)

  • Figure 1: CPU time for computing a GNE via MILP vs LM for increasing number of agents and constraints.
  • Figure 2: Game-theoretic vs centralized LQR
  • Figure 3: Closed-loop trajectories for linear MPC: comparison between game-theoretic (competitive) and centralized (cooperative) formulations.
  • Figure 4: Number of nonzeros in $x^*$ and optimal cost $J(x*)$ as a function of the $\ell_1$-regularization parameter $\alpha_1$.
  • Figure 5: CPU time to compute the Nash equilibrium as a function of the number $N$ of agents.