Code Monkey home page Code Monkey logo

joyrl-offline's Introduction

EN|中文

JoyRL离线版

JoyRL是一套主要基于Torch的强化学习开源框架,旨在让读者仅仅只需通过调参数的傻瓜式操作就能训练强化学习相关项目,从而远离繁琐的代码操作,并配有详细的注释以兼具帮助初学者入门的作用。

本项目为JoyRL离线版,支持读者更方便的学习和自定义算法代码,同时配备JoyRL上线版,集成度相对更高。

安装说明

目前支持Python 3.8和Gym 0.25.2版本。

下载代码:

git clone https://github.com/johnjim0816/joyrl-offline

创建Conda环境(需先安装Anaconda)

conda create -n joyrl-offline python=3.8
conda activate joyrl-offline

安装Gym:

pip install gym==0.25.2

安装Torch:

# CPU
conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 cpuonly -c pytorch
# GPU
conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 cudatoolkit=11.3 -c pytorch -c conda-forge
# GPU镜像安装
pip install torch==1.10.0+cu113 torchvision==0.11.0+cu113 torchaudio==0.10.0 --extra-index-url https://download.pytorch.org/whl/cu113

安装其他依赖:

pip install -r requirements.txt

安装多线程

Multiprocessing框架

pip install multiprocess

Ray框架

pip install ray==2.3.0

使用说明

直接更改 config.config.GeneralConfig()类以及对应算法比如 algos\DQN\config.py中的参数,然后执行:

python main.py

运行之后会在目录下自动生成 tasks文件夹用于保存模型和结果。

或者也可以新建一个 yaml文件自定义参数,例如 config/custom_config_Train.yaml然后执行:

python main.py --yaml config/custom_config_Train.yaml

presets文件夹中已经有一些预设的 yaml文件,并且相应地在benchmarks文件夹中保存了一些已经训练好的结果。

说明文档

文档链接

环境说明

请跳转envs查看说明

算法列表

传统强化学习

算法类型 算法名称 参考文献 作者 备注
Monte Carlo RL introduction johnjim0816
Value Iteration RL introduction guoshicheng
Off-policy Q-learning RL introduction johnjim0816
On-policy Sarsa RL introduction johnjim0816

DRL基础

算法类别 算法名称 参考文献 作者 备注
Value-based DQN DQN Paper johnjim0816, guoshicheng (CNN)
DoubleDQN DoubleDQN Paper johnjim0816
Dueling DQN johnjim0816
PER_DQN PER_DQN Paper wangzhongren,johnjim0816
NoisyDQN NoisyDQN Paper wangzhongren
C51 C51 Paper also called Categorical DQN
Rainbow DQN Rainbow Paper wangzhongren
Policy-based REINFORCE REINFORCE Paper johnjim0816 最基础的PG算法
A2C A2C blog johnjim0816
A3C A3C paper johnjim0816, Ariel Chen
GAE
ACER
TRPO TRPO Paper
PPO PPO Paper johnjim0816, Wen Qiu PPO-clip, PPO-kl
DDPG DDPG Paper johnjim0816
TD3 TD3 Paper johnjim0816

DRL进阶

算法类别 算法名称 参考文献 作者 备注
MaxEntropy RL SoftQ SoftQ Paper johnjim0816
SAC
Distributional RL C51 C51 Paper also called Categorical DQN
QRDQN QRDQN Paper
Offline RL CQL CQL Paper Ariel Chen
BCQ
Multi-Agent IQL IQL Paper
VDN VDN Paper
QTRAN
QMIX QMIX Paper
MAPPO
MADDPG
Sparse reward Hierarchical DQN H-DQN Paper
ICM ICM Paper
HER HER Paper
Imitation Learning GAIL GAIL Paper Yi Zhang
TD3+BC TD3+BC Paper
Model based Dyna Q Dyna Q Paper guoshicheng
Multi Object RL MO-Qlearning MO-QLearning Paper curryliu30

Benchmark开发

环境名称 作者 算法
CartPole-v1 johnjim0816 DQN, Double DQN, Dueling DQN, REINFORCE, A2C, A3C
wangzhongren PER DQN
LunarLander-v2 FinnJob PPO
LunarLanderContinuous-v2 MekeyPan SAC
MountainCar-v0 GeYuhong DQN
BipedalWalker-v3 scchy DDPG

如何贡献

参考贡献说明

joyrl-offline's People

Contributors

johnjim0816 avatar gsc579 avatar wangzhongren-code avatar cr-bh avatar limafang avatar geyuhong avatar irvinfaith avatar pmy0721 avatar curryliu30 avatar guochaoqun1998 avatar misaki-wang avatar finnjob avatar gyyer avatar katniss1025 avatar clorisqiu1 avatar pengsuhua avatar sunwuzhou03 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.