Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
wenzhang.liu 2a2a35cb84 | 5 months ago | |
---|---|---|
.idea | 1 year ago | |
examples | 10 months ago | |
tests | 10 months ago | |
xuanpolicy | 10 months ago | |
.DS_Store | 1 year ago | |
.gitignore | 10 months ago | |
LICENSE.txt | 10 months ago | |
README.md | 5 months ago | |
setup.cfg | 10 months ago | |
setup.py | 5 months ago |
XuanPolicy is an open-source ensemble of Deep Reinforcement Learning (DRL) algorithm implementations.
We call it as Xuan-Ce (玄策) in Chinese.
"Xuan (玄)" means incredible and magic box, "Ce (策)" means policy.
DRL algorithms are sensitive to hyper-parameters tuning, varying in performance with different tricks,
and suffering from unstable training processes, therefore, sometimes DRL algorithms seems elusive and "Xuan".
This project gives a thorough, high-quality and easy-to-understand implementation of DRL algorithms,
and hope this implementation can give a hint on the magics of reinforcement learning.
We expect it to be compatible with multiple deep learning toolboxes(PyTorch, TensorFlow, and MindSpore), and hope it can really become a zoo full of DRL algorithms.
| Full Documentation | 中文文档 | GitHub | XuanCe (Mini version) |
CartPole |
Pendulum |
Lunar_lander |
... |
Ant |
HalfCheetah |
Hopper |
Humanoid |
... |
Breakout |
Boxing |
Alien |
Adventure |
Air Raid |
... |
Simple Push |
Simple Reference |
Simple Spread |
... |
Battle |
Tiger Deer |
Battle Field |
... |
The library can be run at Linux, Windows, MacOS, and EulerOS, etc.
Before installing XuanPolicy, you should install Anaconda to prepare a python environment.
After that, open a terminal and install XuanPolicy by the following steps.
Step 1: Create a new conda environment (python>=3.7 is suggested):
conda create -n xpolicy python=3.7
Step 2: Activate conda environment:
conda activate xpolicy
Step 3: Download the library via git:
git clone https://openi.pcl.ac.cn/OpenRelearnware/XuanPolicy.git
Step 4: Change directory to the directory of XuanPolicy:
cd XuanPolicy
Step 5: Install the library:
pip install -e .
This command does not include the dependencies of deep learning toolboxes. To install the XuanPolicy with
deep learning tools, you can type pip install xuanpolicy[torch]
for PyTorch,
pip install xuanpolicy[tensorflow]
for TensorFlow2,
pip install xuanpolicy[mindspore]
for MindSpore,
and pip install xuanpolicy[all]
for all dependencies.
Note: Some extra packages should be installed manually for further usage.
import xuanpolicy as xp
runner = xp.get_runner(method='dqn', env='Classic_Control', env_id='CartPole-v1', is_test=False)
runner.run()
import xuanpolicy as xp
runner_test = xp.get_runner(method='dqn', env='Classic_Control', env_id='CartPole-v1', is_test=True)
runner_test.run()
You can use tensorboard to visualize what happened in the training process. After training, the log file will be automatically generated in the directory ".results/" and you should be able to see some training data after running the command.
$ tensorboard --logdir ./logs/dqn/torch/CartPole-v1
@misc{XuanPolicy2023,
title={XuanPolicy: A Comprehensive and Unified Deep Reinforcement Learning Library},
author={Wenzhang Liu, Wenzhe Cai, Kun Jiang, Guangran Cheng, Yuanda Wang, Jiawei Wang, Jingyu Cao, Lele Xu, Chaoxu Mu, Changyin Sun},
publisher = {GitHub},
year={2023},
}
A reinforcement learning library by OpenRelearnware Group of PCL.
Python
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》