konnase / DI-engine

OpenDILab Decision AI Engine

Home Page:https://opendilab.github.io/DI-engine/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


PyPI Conda Conda update PyPI - Python Version PyTorch Version Libraries.io dependency status for GitHub repo

Loc Comments

Style Docs Unittest Algotest Platformtest codecov

GitHub Org's stars GitHub stars GitHub forks GitHub commit activity GitHub issues GitHub pulls Contributors GitHub license

Updated on 2021.08.03 DI-engine-v0.1.1 (beta)

Introduction to DI-engine (beta)

DI-engine is a generalized Decision Intelligence engine. It supports most basic deep reinforcement learning (DRL) algorithms, such as DQN, PPO, SAC, and domain-specific algorithms like QMIX in multi-agent RL, GAIL in inverse RL, and RND in exploration problems. Various training pipelines and customized decision AI applications are also supported. Have fun with exploration and exploitation.

Application

System Optimization and Design

Other

Installation

You can simply install DI-engine from PyPI with the following command:

pip install DI-engine

If you use Anaconda or Miniconda, you can install DI-engine from conda-forge through the following command:

conda install -c opendilab di-engine

For more information about installation, you can refer to installation.

Documentation

The detailed documentation are hosted on doc(中文文档).

Quick Start

3 Minutes Kickoff

3 Minutes Kickoff(colab)

3分钟上手中文版(kaggle)

Bonus: Train RL agent in one line code:

ding -m serial -e cartpole -p dqn -s 0

Feature

Algorithm Versatility

No Algorithm Label Implementation Runnable Demo
1 DQN discrete policy/dqn python3 -u cartpole_dqn_main.py / ding -m serial -c cartpole_dqn_config.py -s 0
2 C51 discrete policy/c51 ding -m serial -c cartpole_c51_config.py -s 0
3 QRDQN discrete policy/qrdqn ding -m serial -c cartpole_qrdqn_config.py -s 0
4 IQN discrete policy/iqn ding -m serial -c cartpole_iqn_config.py -s 0
5 Rainbow discrete policy/rainbow ding -m serial -c cartpole_rainbow_config.py -s 0
6 SQL discretecontinuous policy/sql ding -m serial -c cartpole_sql_config.py -s 0
7 R2D2 distdiscrete policy/r2d2 ding -m serial -c cartpole_r2d2_config.py -s 0
8 A2C discrete policy/a2c ding -m serial -c cartpole_a2c_config.py -s 0
9 PPO discretecontinuous policy/ppo python3 -u cartpole_ppo_main.py / ding -m serial_onpolicy -c cartpole_ppo_config.py -s 0
10 PPG discrete policy/ppg python3 -u cartpole_ppg_main.py
11 ACER discretecontinuous policy/acer ding -m serial -c cartpole_acer_config.py -s 0
12 IMPALA distdiscrete policy/impala ding -m serial -c cartpole_impala_config.py -s 0
13 DDPG continuous policy/ddpg ding -m serial -c pendulum_ddpg_config.py -s 0
14 TD3 continuous policy/td3 python3 -u pendulum_td3_main.py / ding -m serial -c pendulum_td3_config.py -s 0
15 SAC continuous policy/sac ding -m serial -c pendulum_sac_config.py -s 0
16 QMIX MARL policy/qmix ding -m serial -c smac_3s5z_qmix_config.py -s 0
17 COMA MARL policy/coma ding -m serial -c smac_3s5z_coma_config.py -s 0
18 QTran MARL policy/qtran ding -m serial -c smac_3s5z_qtran_config.py -s 0
19 WQMIX MARL policy/wqmix ding -m serial -c smac_3s5z_wqmix_config.py -s 0
20 CollaQ MARL policy/collaq ding -m serial -c smac_3s5z_collaq_config.py -s 0
21 GAIL IL reward_model/gail ding -m serial_reward_model -c cartpole_dqn_config.py -s 0
22 SQIL IL entry/sqil ding -m serial_sqil -c cartpole_sqil_config.py -s 0
23 HER exp reward_model/her python3 -u bitflip_her_dqn.py
24 RND exp reward_model/rnd python3 -u cartpole_ppo_rnd_main.py
25 CQL offline policy/cql ding -m serial_offline -c cartpole_cql_config.py -s 0
26 PER other worker/replay_buffer rainbow demo
27 GAE other rl_utils/gae ppo demo

discrete means discrete action space, which is only label in normal DQL algorithms(1-15)

continuous means continuous action space, which is only label in normal DQL algorithms(1-15)

dist means distributed training (collector-learner parallel) RL algorithm

MARL means multi-agent RL algorithm

exp means RL algorithm which is related to exploration and sparse reward

IL means Imitation Learning, including Behaviour Cloning, Inverse RL, Adversarial Structured IL

offline means offline RL algorithm

other means other sub-direction algorithm, usually as plugin-in in the whole pipeline

P.S: The .py file in Runnable Demo can be found in dizoo

Environment Versatility

No Environment Label Visualization dizoo link
1 atari discrete original dizoo link
2 box2d/bipedalwalker continuous original dizoo link
3 box2d/lunarlander discrete original dizoo link
4 classic_control/cartpole discrete original dizoo link
5 classic_control/pendulum discrete original dizoo link
6 competitive_rl discrete marl original dizoo link
7 gfootball discretesparse original dizoo link
8 minigrid discretesparse original dizoo link
9 mujoco continuous original dizoo link
10 multiagent_particle discrete marl original dizoo link
11 overcooked discrete marl original dizoo link
12 procgen discrete original dizoo link
13 pybullet continuous original dizoo link
14 smac discrete marlsparse original dizoo link
15 league_demo discrete marl original dizoo link
16 pomdp atari discrete dizoo link

discrete means discrete action space

continuous means continuous action space

MARL means multi-agent RL environment

sparse means environment which is related to exploration and sparse reward

P.S. some enviroments in Atari, such as MontezumaRevenge, are also sparse reward type

Contribution

We appreciate all contributions to improve DI-engine, both algorithms and system designs. Please refer to CONTRIBUTING.md for more guides. And our roadmap can be accessed by this link.

And users can join our slack communication channel for more detailed discussion.

Citation

@misc{ding,
    title={{DI-engine: OpenDILab} Decision Intelligence Engine},
    author={DI-engine Contributors},
    publisher = {GitHub},
    howpublished = {\url{https://github.com/opendilab/DI-engine}},
    year={2021},
}

License

DI-engine released under the Apache 2.0 license.

About

OpenDILab Decision AI Engine

https://opendilab.github.io/DI-engine/

License:Apache License 2.0


Languages

Language:Python 99.8%Language:Shell 0.2%Language:Makefile 0.0%Language:Dockerfile 0.0%