AI

Wesley13
• 阅读 570

ai-economist-Foundation: An Economics Simulation Framework-Stephan Zheng, Alex Trott, Sunil Srinivasa

发布:2020-12-22 12:22:29.330549

作者:Stephan Zheng, Alex Trott, Sunil Srinivasa

### 作者邮箱:stephan.zheng@salesforce.com

### 首页:https://github.com/salesforce/ai-economist

### 文档:None

### 下载链接 

# Foundation: An Economic Simulation Framework

This repo contains an implementation of Foundation, a framework for flexible, modular, and composable environments that model socio-economic behaviors and dynamics in a society with both agents and governments.

Foundation provides a Gym-style API:

  • reset: resets the environment's state and returns the observation.
  • step: advances the environment by one timestep, and returns the tuple (observation, reward, done, info).

This simulation can be used in conjunction with reinforcement learning to learn optimal economic policies, as detailed in:

The AI Economist: Improving Equality and Productivity with AI-Driven Tax Policies, Stephan Zheng, Alexander Trott, Sunil Srinivasa, Nikhil Naik, Melvin Gruesbeck, David C. Parkes, Richard Socher.

If you use this code in your research, please cite us using this BibTeX entry:

@misc{2004.13332,
  Author = {Stephan Zheng, Alexander Trott, Sunil Srinivasa, Nikhil Naik, Melvin Gruesbeck, David C. Parkes, Richard Socher},
  Title = {The AI Economist: Improving Equality and Productivity with AI-Driven Tax Policies},
  Year = {2020},
  Eprint = {arXiv:2004.13332},
}

For more information and context, check out:

Join us on Slack

If you're interested in extending this framework, discussing machine learning for economics, and collaborating on research project:

Installation Instructions

To get started, you'll need to have Python 3.6+ installed.

Using pip

Simply use the Python package manager:

pip install ai-economist

Installing from Source

  1. Clone this repository to your local machine:

    git clone www.github.com/salesforce/ai-economist
    
  2. Create a new conda environment (named "ai-economist" below - replace with anything else) and activate it

    conda create --name ai-economist python=3.6
    conda activate ai-economist
    
  3. Either

    a) Edit the PYTHONPATH to include the ai-economist directory

    export PYTHONPATH=<local path to ai-economist>:$PYTHONPATH
    

    OR

    b) Install as an editable Python package

    cd ai-economist
    pip install -e .
    

Useful tip: for quick access, add the following to your ~/.bashrc or ~/.bash_profile:

alias aiecon="conda activate ai-economist; cd <local path to ai-economist>"

You can then simply run aiecon once to activate the conda environment.

Testing your Install

To test your installation, try running:

conda activate ai-economist
python -c "import ai_economist"

Getting Started

Tutorials

To familiarize yourself with Foundation, check out the tutorials in the tutorials folder. You can run these notebooks interactively in your browser on Google Colab.

To run these notebooks locally, you need Jupyter. See https://jupyter.readthedocs.io/en/latest/install.html for installation instructions and (https://jupyter-notebook.readthedocs.io/en/stable/ for examples of how to work with Jupyter.

Structure of the Code

The simulation is located in the ai_economist/foundation folder.

The code repository is organized into the following components:

| Component | Description | | --- | --- | | base | Contains base classes to can be extended to define Agents, Components and Scenarios. | | agents | Agents represent economic actors in the environment. Currently, we have mobile Agents (representing workers) and a social planner (representing a government). | | entities | Endogenous and exogenous components of the environment. Endogenous entities include labor, while exogenous entity includes landmarks (such as Water and Grass) and collectible Resources (such as Wood and Stone). | | components | Components are used to add some particular dynamics to an environment. They also add action spaces that define how Agents can interact with the environment via the Component. | | scenarios | Scenarios compose Components to define the dynamics of the world. It also computes rewards and exposes state for visualization. |

Releases and Contributing

  • Please let us know if you encounter any bugs by filing a Github issue.
  • We appreciate all your contributions. If you plan to contribute new Components, Scenarios Entities, or anything else, please see our contribution guidelines.

Changelog

Current version: v1.1.1

For the complete release history, see CHANGELOG.md.

License

Foundation and the AI Economist are released under the BSD-3 License.

 Copy from pypi.org

查询时间:128.825ms

渲染时间:128.959ms

本文同步分享在 博客“zhenruyan”(other)。
如有侵权,请联系 support@oschina.cn 删除。
本文参与“OSC源创计划”,欢迎正在阅读的你也加入,一起分享。

点赞
收藏
评论区
推荐文章
blmius blmius
3年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
皕杰报表之UUID
​在我们用皕杰报表工具设计填报报表时,如何在新增行里自动增加id呢?能新增整数排序id吗?目前可以在新增行里自动增加id,但只能用uuid函数增加UUID编码,不能新增整数排序id。uuid函数说明:获取一个UUID,可以在填报表中用来创建数据ID语法:uuid()或uuid(sep)参数说明:sep布尔值,生成的uuid中是否包含分隔符'',缺省为
待兔 待兔
4个月前
手写Java HashMap源码
HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22
Jacquelyn38 Jacquelyn38
3年前
2020年前端实用代码段,为你的工作保驾护航
有空的时候,自己总结了几个代码段,在开发中也经常使用,谢谢。1、使用解构获取json数据let jsonData  id: 1,status: "OK",data: 'a', 'b';let  id, status, data: number   jsonData;console.log(id, status, number )
Stella981 Stella981
3年前
Android So动态加载 优雅实现与原理分析
背景:漫品Android客户端集成适配转换功能(基于目标识别(So库35M)和人脸识别库(5M)),导致apk体积50M左右,为优化客户端体验,决定实现So文件动态加载.!(https://oscimg.oschina.net/oscnet/00d1ff90e4b34869664fef59e3ec3fdd20b.png)点击上方“蓝字”关注我
Wesley13 Wesley13
3年前
00:Java简单了解
浅谈Java之概述Java是SUN(StanfordUniversityNetwork),斯坦福大学网络公司)1995年推出的一门高级编程语言。Java是一种面向Internet的编程语言。随着Java技术在web方面的不断成熟,已经成为Web应用程序的首选开发语言。Java是简单易学,完全面向对象,安全可靠,与平台无关的编程语言。
Stella981 Stella981
3年前
Docker 部署SpringBoot项目不香吗?
  公众号改版后文章乱序推荐,希望你可以点击上方“Java进阶架构师”,点击右上角,将我们设为★“星标”!这样才不会错过每日进阶架构文章呀。  !(http://dingyue.ws.126.net/2020/0920/b00fbfc7j00qgy5xy002kd200qo00hsg00it00cj.jpg)  2
Wesley13 Wesley13
3年前
35岁是技术人的天花板吗?
35岁是技术人的天花板吗?我非常不认同“35岁现象”,人类没有那么脆弱,人类的智力不会说是35岁之后就停止发展,更不是说35岁之后就没有机会了。马云35岁还在教书,任正非35岁还在工厂上班。为什么技术人员到35岁就应该退役了呢?所以35岁根本就不是一个问题,我今年已经37岁了,我发现我才刚刚找到自己的节奏,刚刚上路。
Wesley13 Wesley13
3年前
MySQL部分从库上面因为大量的临时表tmp_table造成慢查询
背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_
Python进阶者 Python进阶者
10个月前
Excel中这日期老是出来00:00:00,怎么用Pandas把这个去除
大家好,我是皮皮。一、前言前几天在Python白银交流群【上海新年人】问了一个Pandas数据筛选的问题。问题如下:这日期老是出来00:00:00,怎么把这个去除。二、实现过程后来【论草莓如何成为冻干莓】给了一个思路和代码如下:pd.toexcel之前把这