EconGym: A Scalable AI Testbed with Diverse Economic Tasks

Qirui Mi1,2,3, Qipeng Yang4,5,6, Zijun Fan4,5,6, Wentian Fan4,5,6, Heyang Ma7, Chengdong Ma8, Siyu Xia1,2, Bo An3, Jun Wang9, Bo Li8, Haifeng Zhang1,2,5
1 Institute of Automation, Chinese Academy of Sciences 2 School of Artificial Intelligence, Chinese Academy of Sciences 3 Nanyang Technological University 4 Nanjing University of Posts and Telecommunications 5 Nanjing Artificial Intelligence Research of IA 6 University of Chinese Academy of Sciences, Nanjing 7 University of International Business and Economics 8 Peking University 9 University College London
Overview of EconGym
Overview of EconGym: Users define tasks by selecting economic roles and agent algorithms, generating dynamic multi-agent trajectories. These trajectories support economic analysis for the economics community and policy optimization for the AI community. Built on rigorous economic theory and modular agent modeling, EconGym enables diverse and cross-domain economic tasks.
Workflow of EconGym
Workflow of EconGym.

Abstract

EconGym is a scalable and modular simulation testbed that bridges artificial intelligence (AI) and economics, enabling rigorous training, evaluation, and benchmarking of AI algorithms in realistic economic settings.

Unlike existing economic simulation environments that often focus on a single task, EconGym is grounded in rigorous economic theory and supports over 25 economic problems involving heterogeneous economic roles—such as households, firms, banks, and governments. Each role type includes multiple modeling variants inspired by prior economic research. Users can flexibly assign roles and learning algorithms, including reinforcement learning (RL), large language models (LLMs), behavior cloning (BC), rule-based policies, real-world strategies, and more—to simulate dynamic, multi-agent economic trajectories.

Whether you are an economist conducting policy analysis or an AI researcher designing algorithms for complex, hierarchical, and large-scale environments, EconGym offers a powerful testbed to tackle real-world economic challenges—from pension reform and taxation to monetary policy coordination and macroeconomic stability.

Key Contributions

EconGym builds on advanced microeconomic and macroeconomic theory to model core economic roles—households, firms, banks, and governments—with research-level rigor. The environment includes heterogeneous agent formulations such as overlapping generations (OLG) households, Ramsey consumers, monopolistic firms, and central banks. This theoretical grounding ensures the platform goes beyond simplistic toy models and supports meaningful economic analysis.

Real-world economic phenomena rarely occur in isolation—issues like taxation, monetary policy, and aging populations often interact.

EconGym offers a unified interface for composing agents with different decision-making structures, enabling users to study multiple economic questions simultaneously. For example, combining an OLG household model with both fiscal authority and central bank allows users to explore the interplay between demographic shifts, tax design, and central bank policy.

This is made possible by EconGym’s modular architecture, which supports more than 25 economic tasks across domains such as pensions, taxation, market competition, and personal decision making.

EconGym integrates a wide range of agent learning approaches—including reinforcement learning (RL), large language models (LLMs), behavior cloning (BC), economic solvers, expert-designed rules, real-world policies.

Users can benchmark these algorithms under consistent settings or assign different algorithms to different agents, supporting fair comparisons and hybrid system evaluation.

The framework is optimized for both efficiency and realism, capable of simulating up to 10,000 agents with dynamic economic interactions.

This scale enables realistic modeling of policy diffusion, market dynamics, and population heterogeneity in large economic systems.

EconGym serves as a versatile testbed for both economic research and AI development.

Users can easily modify YAML configurations, plug in custom agent algorithms, and design new simulation scenarios—making it an ideal environment for experimenting with complex policies and studying emergent multi-agent behavior at scale.

Demo

Impact of Different Wealth Taxes on Households

Dynamic Population Structure Evolution

Comparison of Tax Policies: Saez Tax, DDPG (RL), US Federal Tax

User Manual

We provide a detailed User Manual covering 25 key economic research questions. Each problem comes with:

  • An introduction to the economic issue
  • Recommended choices of economic roles and agent algorithms
  • Baseline experimental results and visualizations
  • A YAML configuration file for direct environment execution

🔗 See the document/ folder on GitHub for full documentation and research use cases.

🚀 Quick Start

After installing the required Python packages, you can run any benchmark scenario with a single command:

python main.py --problem_scene "delayed_retirement"

Each --problem_scene flag corresponds to a YAML file in the cfg/ directory. You can easily customize these YAML files or create your own to define new benchmark tasks tailored to your research needs. For more details on how to run and extend EconGym, please refer to our GitHub repository.

Below is an overview of the 25 economic benchmark problems and their corresponding YAML configuration files:

🏦 Pension Issues

No. Research Question YAML File
Q1 How does delayed retirement affect the economy? delayed_retirement.yaml
Q2 Do personal pensions improve security? personal_pension.yaml
Q3 How does aging impact the macroeconomy? population_aging.yaml
Q4 How to close pension funding gaps? pension_gap.yaml
Q5 How do pension systems vary across countries? pension_across_countries.yaml

💰 Fiscal Policy Issues

No. Research Question YAML File
Q1 Can consumption taxes boost growth and fairness? consumption_tax.yaml
Q2 How does inheritance tax affect wealth distribution? estate_tax.yaml
Q3 Does universal basic income enhance equity? universal_basic_income.yaml
Q4 How to design optimal tax policies? optimal_tax.yaml
Q5 How does wealth tax impact wealth concentration? wealth_tax.yaml

🏛️ Monetary Policy Issues

No. Research Question YAML File
Q1 How effective are negative interest rates? negative_interest.yaml
Q2 How to control inflation via monetary policy? inflation_control.yaml
Q3 What are the long-term effects of quantitative easing? QE.yaml
Q4 How to set optimal bank rate spreads? optimal_monetary.yaml
Q5 How to coordinate monetary and fiscal policies? multi_government.yaml

⚖️ Market Competition Issues

No. Research Question YAML File
Q1 How does technology drive long-term growth? technology.yaml
Q2 How do monopolies affect resources and welfare? monopoly.yaml
Q3 What is algorithmic collusion in oligopolies? oligopoly.yaml
Q4 How does product diversity affect welfare? monopolistic_competition.yaml

👤 Individual Decision-Making Issues

BibTeX

@misc{econcgym2025,
  title={EconGym: A Scalable AI Testbed with Diverse Economic Tasks},
  author={Qirui Mi and Qipeng Yang and Zijun Fan and Wentian Fan and Heyang Ma and Chengdong Ma and Siyu Xia and Bo An and Jun Wang and Haifeng Zhang},
  year={2025},
  note={Under submission},
  url={https://github.com/Miracle1207/EconGym}
}

Acknowledgments

We sincerely thank Prof. Bo Li from Peking University for his valuable discussions and feedback throughout the development of this project. As an outstanding economist, Prof. Bo Li provided critical guidance on the theoretical foundations of the economic models in EconGym, significantly enhancing the rigor and realism of the platform.

Contact

If you have any questions, collaboration ideas, or would like to use EconGym in your research, feel free to reach out:

We welcome feedback, collaborations, and contributions from the research community.