GitRead 中文社区
首页趋势排行榜原创文章严选周刊
更多资源
新手训练营
精选专题热门话题GitHub 文档资源精选实战指南

xuance

XuanCe: A Comprehensive and Unified Deep Reinforcement Learning Library

  • 语言Python
  • 默认分支master
  • 大小482.1 MB
  • 更新3 周前
  • Issues30
在 GitHub 打开
avataragi-brain

项目介绍

agi-brain/xuance 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 MIT License 许可证,目前获得 1.1k 个 Star、162 次 Fork。

仓库全名
agi-brain/xuance

README 摘要

XuanCe: A Comprehensive and Unified Deep Reinforcement Learning Library Full Documentation 中文文档 READMECN.md XuanCe 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…

完整内容见 GitHub 原始 README 或本页 。

常见问题

xuance 用什么语言开发?

主要使用 Python 编写,采用 MIT License 许可证,目前有 1.1k 个 Star。

xuance 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 xuance 的源码?

可以直接克隆仓库:git clone https://github.com/agi-brain/xuance.git,默认分支为 master;安装与运行步骤见仓库 README。

xuance 最近还在维护吗?

仓库最近一次更新为 3 周前,当前有 30 个未关闭 Issue;Star 数为 1.1k,可作为社区活跃度的参考。

本页面展示项目元数据与原始 README,GitRead 中文社区 编辑团队负责选题收录。

相关仓库

public-apis/public-apis avatar
public-apispublic-apis
1 天前
498.5k
54.4k
67

免费 API 汇总列表

apipublic-apisfree+7
Python
15.7 MB
7
详情
EbookFoundation/free-programming-books avatar
free-programming-booksEbookFoundation
4 小时前
401.5k
67.7k
91

免费可获取的编程书籍

bookseducationhacktoberfest+2
Python
21.8 MB
3
详情
donnemartin/system-design-primer avatar
system-design-primerdonnemartin
9月15日
377.7k
59.3k
647

学习如何设计大规模系统。为系统设计面试做准备。包含 Anki 闪卡。

designdesign-patternsdesign-system+10
Python
11.0 MB
0
详情
vinta/awesome-python avatar
awesome-pythonvinta
4 天前
334.3k
29.1k
24

回答“我想用 Python 做 X,该用哪个工具?”的权威清单

awesomeawesome-listpython+3
Python
6.9 MB
2
详情
practical-tutorials/project-based-learning avatar
project-based-learningpractical-tutorials
3 天前
289.6k
36.8k
234

精选的项目实战教程列表

tutorialprojectbeginner-project+5
Python
472 KB
1
详情
NousResearch/hermes-agent avatar
hermes-agentNousResearch
2 小时前
262.9k
59.2k
54.0k

与你共同成长的智能体

aiai-agentai-agents+10
Python
1.4 GB
3
详情
TheAlgorithms/Python avatar
PythonTheAlgorithms
1 天前
226.0k
51.3k
106

所有算法均用 Python 实现

algorithmalgorithm-competitionsalgorithms-implemented+11
Python
17.9 MB
2
详情
yt-dlp/yt-dlp avatar
yt-dlpyt-dlp
1 周前
207.2k
18.2k
2.8k

功能丰富的命令行音视频下载器

youtube-dlpythonsponsorblock+4
Python
63.5 MB
0
详情

关于

a2catariddpgdqngoogle-research-footballmaddpgmagentmappomindsporempemujocomulti-agent-reinforcement-learningppopytorchqmixreinforcement-learningreinforcement-learning-librarystarcraft2tensorflow2
  • MIT License
  • 1.1k Stars
  • 162 Forks
  • 17 Watching

简要分析

热度分
1456
价值分
717
活跃状态
活跃
GitHub

语言占比

Python

Release

  • XuanCe (1.4.4)7月18日
  • XuanCe (1.4.3)5月27日
  • XuanCe (1.4.2)5月27日
  • XuanCe (1.4.1)2月25日
  • XuanCe (1.4.0)1月12日

贡献者

wenzhangliuwenzhangliubaijinqiubaijinqiuKKayakKKayakjkun-332jkun-332YkiziYkiziF-coder1857F-coder1857S444HS444HTangY1fanTangY1fanwenboli-aiwenboli-ai1otuses1otusesjosh1147josh1147AHU-QXYAHU-QXY

XuanCe: A Comprehensive and Unified Deep Reinforcement Learning Library

PyPI Documentation Status GitHub Downloads GitHub Repo stars GitHub forks GitHub watchers

PyTorch TensorFlow MindSpore gymnasium pettingzoo PyPI - Python Version

Benchmarks

Full Documentation | 中文文档 | README_CN.md

XuanCe 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 backends( PyTorch, TensorFlow, and MindSpore), and hope it can really become a zoo full of DRL algorithms.

Paper link: https://arxiv.org/pdf/2312.16248.pdf

Table of Contents:

  • Features
  • Algorithms
  • Environments
  • Installation
  • Quickly Start
  • Community
  • Citation

Features

  • :school_satchel: Highly modularized.
  • :thumbsup: Easy to learn, easy for installation, and easy for usage.
  • :twisted_rightwards_arrows: Flexible for model combination.
  • :tada: Abundant algorithms with various tasks.
  • :couple: Supports both DRL and MARL tasks.
  • :key: High compatibility for different users. (PyTorch, TensorFlow2, MindSpore, CPU, GPU, Linux, Windows, MacOS, etc.)
  • :zap: Fast running speed with parallel environments.
  • :computer: Distributed training with multi-GPUs.
  • 🎛️ Support automatically hyperparameters tuning.
  • :chart_with_upwards_trend: Good visualization effect with tensorboard or wandb tool.

Algorithms

:point_right: DRL

  • DQN: Deep Q Network [Paper]
  • Double DQN: DQN with Double Q-learning [Paper]
  • Dueling DQN: DQN with Dueling Network [Paper]
  • PER: DQN with Prioritized Experience Replay [Paper]
  • NoisyDQN: DQN with Parameter Space Noise for Exploration [Paper]
  • DRQN: Deep Recurrent Q-Network [Paper]
  • QRDQN: DQN with Quantile Regression [Paper]
  • C51: Distributional Reinforcement Learning [Paper]
  • PG: Vanilla Policy Gradient [Paper]
  • NPG: Natural Policy Gradient [Paper]
  • PPG: Phasic Policy Gradient [Paper] [Code]
  • A2C: Advantage Actor Critic [Paper] [Code]
  • SAC: Soft Actor-Critic [Paper] [Code]
  • SAC-Discrete: Soft Actor-Critic for Discrete Actions [Paper] [Code]
  • PPO-Clip: Proximal Policy Optimization with Clipped Objective [Paper] [Code]
  • PPO-KL: Proximal Policy Optimization with KL Divergence [Paper] [Code]
  • DDPG: Deep Deterministic Policy Gradient [Paper] [Code]
  • TD3: Twin Delayed Deep Deterministic Policy Gradient [Paper][Code]
  • P-DQN: Parameterised Deep Q-Network [Paper]
  • MP-DQN: Multi-pass Parameterised Deep Q-network [Paper] [Code]
  • SP-DQN: Split Parameterised Deep Q-Network [Paper]

:point_right: Model-Based Reinforcement Learning (MBRL)

  • DreamerV2 [Paper] [Code]
  • DreamerV3 [Paper] [Code]
  • HarmonyDream [Paper] [Code]

:point_right: Multi-Agent Reinforcement Learning (MARL)

  • IQL: Independent Q-learning [Paper] [Code]
  • VDN: Value Decomposition Networks [Paper] [Code]
  • QMIX: Q-mixing networks [Paper] [Code]
  • WQMIX: Weighted Q-mixing networks [Paper] [Code]
  • QTRAN: Q-transformation [Paper] [Code]
  • DCG: Deep Coordination Graphs [Paper] [Code]
  • IDDPG: Independent Deep Deterministic Policy Gradient [Paper]
  • MADDPG: Multi-agent Deep Deterministic Policy Gradient [Paper] [Code]
  • IAC: Independent Actor-Critic [Paper] [Code]
  • COMA: Counterfactual Multi-agent Policy Gradient [Paper] [Code]
  • VDAC: Value-Decomposition Actor-Critic [Paper] [Code]
  • IPPO: Independent Proximal Policy Optimization [Paper] [Code]
  • MAPPO: Multi-agent Proximal Policy Optimization [Paper] [Code]
  • MFQ: Mean-Field Q-learning [Paper] [Code]
  • MFAC: Mean-Field Actor-Critic [Paper] [Code]
  • ISAC: Independent Soft Actor-Critic
  • MASAC: Multi-agent Soft Actor-Critic [Paper]
  • MATD3: Multi-agent Twin Delayed Deep Deterministic Policy Gradient [Paper]
  • IC3Net: Individualized Controlled Continuous Communication Model [Paper] [Code]
  • CommNet: Communication Neural Net [Paper][Code]

:point_right: Contrastive Reinforcement Learning (CRL)

  • CURL: Contrastive Unsupervised Representation Learning for Sample-Efficient Reinforcement Learning [Paper] [Code]
  • SPR: Data-Efficient Reinforcement Learning with Self-Predictive Representations [Paper] [Code]
  • DrQ: Image Augmentation Is All You Need: Regularizing Deep Reinforcement Learning from Pixels [Paper] [Code]

Environments

Classic Control


Cart Pole

Pendulum

Acrobot

MountainCar

Box2D


Bipedal Walker

Car Racing

Lunar Lander

MuJoCo Environments


Ant

HalfCheetah

Hopper

HumanoidStandup

Humanoid

InvertedPendulum

...

Atari Environments


Adventure

Air Raid

Alien

Amidar

Assault

Asterix

Asteroids

...

Minigrid Environments


GoToDoorEnv

LockedRoomEnv

MemoryEnv

PlaygroundEnv

...

Drones Environments


Helix

Single-Agent Hover

Multi-Agent Hover

...

MetaDrive

MPE Environments


Simple Push

Simple Reference

Simple Spread

Simple Adversary

...

Robotic Warehouse


Example 1

Example 2

Example 3

Example 4

...

SMAC

Google Research Football

:point_right: Installation

:computer: XuanCe can run at Linux, Windows, MacOS, and EulerOS, etc.

Step 1: Set up a Python environment

We recommend installing Anaconda to manage your Python environment. (You can also download a specific Anaconda installer from here.)

Then open a terminal and create/activate a new conda environment (Python >= 3.8 is recommended):

conda create -n xuance_env python=3.8 && conda activate xuance_env

Step 2: Install XuanCe

pip install xuance

This command does not include the dependencies of deep learning backends. To install the XuanCe with deep learning tools, you can type pip install xuance[torch] for PyTorch, pip install xuance[tensorflow] for TensorFlow2, pip install xuance[mindspore] for MindSpore, and pip install xuance[all] for all dependencies.

Note: Some extra packages should be installed manually for further usage. Click here to see more details for installation.

:point_right: Quickly Start

Train a Model

import xuance

runner = xuance.get_runner(algo='ppo',
                           env='classic_control',
                           env_id='CartPole-v1')
runner.run(mode='train')

Test the Model

import xuance

runner = xuance.get_runner(algo='ppo',
                           env='classic_control',
                           env_id='CartPole-v1')
runner.run(mode='test')

Visualize the results

Tensorboard

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-v0
Weights & Biases (wandb)

XuanCe also supports Weights & Biases (wandb) tools for users to visualize the results of the running implementation.

How to use wandb online? :arrow_right: https://github.com/wandb/wandb.git/

How to use wandb offline? :arrow_right: https://github.com/wandb/server.git/

Benchmarks

XuanCe provides an official benchmark pipeline for evaluating DRL and MARL algorithms.

To avoid increasing the size of the main repository, official benchmark results (including evaluation curves, summary tables, and pretrained models) are maintained in a separate repository:

👉 https://github.com/agi-brain/xuance-benchmarks

Users can either:

  • Run benchmarks locally using the provided pipeline, or
  • Directly inspect and reuse the official benchmark results without rerunning experiments.

Community

  • GitHub issues: https://github.com/agi-brain/xuance/issues
  • Github discussions: https://github.com/orgs/agi-brain/discussions
  • Discord invite link: https://discord.gg/HJn2TBQS7y
  • Slack invite link: https://join.slack.com/t/xuancerllib/
  • QQ App’s group number: 552432695, 153966755
  • WeChat account: “玄策 RLlib”

(Note: You can also post your questions on Stack Overflow.)

(QR code for QQ group and WeChat official account)

QQ group 1

QQ group 2

Official account (WeChat)

Citations

If you use XuanCe in your research or development, please cite the paper:

@article{liu2023xuance,
  title={XuanCe: A Comprehensive and Unified Deep Reinforcement Learning Library},
  author={Liu, Wenzhang and Cai, Wenzhe and Jiang, Kun and Cheng, Guangran and Wang, Yuanda and Wang, Jiawei and Cao, Jingyu and Xu, Lele and Mu, Chaoxu and Sun, Changyin},
  journal={arXiv preprint arXiv:2312.16248},
  year={2023}
}

评论

登录 后发表评论
暂无评论
GitRead 中文社区
深度解读 · 趋势洞察 · 价值精选

关于

关于我们联系我们编辑准则收录标准赞赏人员

发现

技术趋势新手训练营资源精选实战指南精选专题热门话题GitHub 文档

条款

隐私政策服务条款网站地图
26.9万收录项目
6.8万中文话题
155精选专题
发现技术价值,连接开源智慧
© 2026 GitRead · GitHub 中文社区 本站与 GitHub, Inc. 无隶属关系;GitHub 是 GitHub, Inc. 的商标。