This project is an implementation of the Foundation framework, a flexible, modular, and composable environment for modeling socio-economic behaviors and dynamics in a society with both agents and governments.
It provides a Gym-style API:
reset
: Resets the environment and returns the observation.step
: Moves the environment one step forward, returning the tuple (observation, reward, done, info).
The simulation framework can be used with reinforcement learning to learn optimal economic policies, as detailed in the following papers:
For more information, check out:
- The AI Economist
- Blog: The AI Economist Moonshot
- Web demo: AI policy design and COVID-19 case study review by AI Economist
See our Simulation Card for a review of the framework's intended use and ethical review.
For extending this framework, discussing machine learning for economics, and collaborating on research projects, join our Slack channel aieconomist.slack.com.
You'll need Python 3.7+ installed to get started.
You can use the Python package manager: pip install advanced-ai-economist
- Clone the repository:
git clone www.github.com/timipani/advanced-ai-economist
- Create a new conda environment:
conda create --name advanced-ai-economist python=3.7 --yes
conda activate advanced-ai-economist
- Set your PYTHONPATH to include the
advanced-ai-economist
directory:export PYTHONPATH=<path-to-advanced-ai-economist>:$PYTHONPATH
Familiarize with Foundation by trying the tutorials in the 'tutorials' folder.
The simulation is located in the 'ai_economist/foundation' folder.
- base: Base classes for defining Agents, Components, and Scenarios.
- agents: Agents represent economic actors in the environment.
Bug reports, pull requests, and other contributions are welcome. See our contribution guidelines.