🤖 AI Summary
Existing mean-field game (MFG) research lacks accessible, scalable, and open-source solvers. This paper introduces MFGLib—the first modular Python library designed for general MFG problems—enabling user-friendly modeling, customizable solving, and comprehensive result analysis. Methodologically, MFGLib provides a unified, extensible framework integrating forward–backward coupled systems (e.g., Hamilton–Jacobi–Bellman and Kolmogorov–Fokker–Planck equations), diverse numerical algorithms (fixed-point iterations, PDE solvers, and machine-learning-driven approaches), and automatic differentiation. Its key contributions are: (1) a cohesive architectural design supporting algorithmic interoperability; (2) an embedded hyperparameter auto-tuning module that substantially lowers configuration barriers; and (3) standardized APIs for rapid prototyping and validation. Open-sourced and already adopted by the research community, MFGLib fills a critical gap in the MFG software ecosystem and significantly improves both modeling expressivity and computational efficiency.
📝 Abstract
Mean-field games (MFGs) are limiting models to approximate $N$-player games, with a number of applications. Despite the ever-growing numerical literature on computation of MFGs, there is no library that allows researchers and practitioners to easily create and solve their own MFG problems. The purpose of this document is to introduce MFGLib, an open-source Python library for solving general MFGs with a user-friendly and customizable interface. It serves as a handy tool for creating and analyzing generic MFG environments, along with embedded auto-tuners for all implemented algorithms. The package is distributed under the MIT license and the source code and documentation can be found at https://github.com/radar-research-lab/MFGLib/.