你确认删除该任务么?此任务一旦删除不可恢复。
wenzhang.liu 2a2a35cb84 | 5 个月前 | |
---|---|---|
.idea | 1年前 | |
examples | 10 个月前 | |
tests | 10 个月前 | |
xuanpolicy | 10 个月前 | |
.DS_Store | 1年前 | |
.gitignore | 10 个月前 | |
LICENSE.txt | 10 个月前 | |
README.md | 5 个月前 | |
setup.cfg | 10 个月前 | |
setup.py | 5 个月前 |
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
尊敬的启智用户
感谢您一直以来对Openl启智社区AI协作平台的支持。为了保障您的使用权益和确保网络安全,我们于2024年1月份更新了《Openl启智社区AI协作平台使用协议》。更新后的协议明确了用户禁止使用内网穿透工具的条例。您单击“同意并继续”后,便可以继续使用我们的服务。感谢您的合作与理解。
更多协议内容,请参考《Openl启智社区AI协作平台使用协议》