All Projects → kngwyu → Rainy

kngwyu / Rainy

Licence: Apache-2.0 license
☔ Deep RL agents with PyTorch☔

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to Rainy

Deep-Reinforcement-Learning-With-Python
Master classic RL, deep RL, distributional RL, inverse RL, and more using OpenAI Gym and TensorFlow with extensive Math
Stars: ✭ 222 (+469.23%)
Mutual labels:  deep-reinforcement-learning, dqn, ddpg, sac, ppo, a2c, td3
Deeprl
Modularized Implementation of Deep RL Algorithms in PyTorch
Stars: ✭ 2,640 (+6669.23%)
Mutual labels:  deep-reinforcement-learning, dqn, ddpg, ppo, a2c, option-critic, td3
Tianshou
An elegant PyTorch deep reinforcement learning library.
Stars: ✭ 4,109 (+10435.9%)
Mutual labels:  dqn, ddpg, sac, ppo, a2c, td3
ReinforcementLearningZoo.jl
juliareinforcementlearning.org/
Stars: ✭ 46 (+17.95%)
Mutual labels:  dqn, ddpg, sac, ppo, a2c, td3
ElegantRL
Scalable and Elastic Deep Reinforcement Learning Using PyTorch. Please star. 🔥
Stars: ✭ 2,074 (+5217.95%)
Mutual labels:  dqn, ddpg, sac, ppo, a2c, td3
Minimalrl
Implementations of basic RL algorithms with minimal lines of codes! (pytorch based)
Stars: ✭ 2,051 (+5158.97%)
Mutual labels:  deep-reinforcement-learning, dqn, ddpg, sac, ppo, a2c
LWDRLC
Lightweight deep RL Libraray for continuous control.
Stars: ✭ 14 (-64.1%)
Mutual labels:  deep-reinforcement-learning, ddpg, sac, ppo, td3
Deep-rl-mxnet
Mxnet implementation of Deep Reinforcement Learning papers, such as DQN, PG, DDPG, PPO
Stars: ✭ 26 (-33.33%)
Mutual labels:  deep-reinforcement-learning, dqn, ddpg, a2c, td3
Deep-Reinforcement-Learning-Notebooks
This Repository contains a series of google colab notebooks which I created to help people dive into deep reinforcement learning.This notebooks contain both theory and implementation of different algorithms.
Stars: ✭ 15 (-61.54%)
Mutual labels:  deep-reinforcement-learning, dqn, ppo, a2c
Reinforcement Learning
Learn Deep Reinforcement Learning in 60 days! Lectures & Code in Python. Reinforcement Learning + Deep Learning
Stars: ✭ 3,329 (+8435.9%)
Mutual labels:  deep-reinforcement-learning, dqn, ppo, a2c
Machine Learning Is All You Need
🔥🌟《Machine Learning 格物志》: ML + DL + RL basic codes and notes by sklearn, PyTorch, TensorFlow, Keras & the most important, from scratch!💪 This repository is ALL You Need!
Stars: ✭ 173 (+343.59%)
Mutual labels:  deep-reinforcement-learning, dqn, ddpg, ppo
Deep RL with pytorch
A pytorch tutorial for DRL(Deep Reinforcement Learning)
Stars: ✭ 160 (+310.26%)
Mutual labels:  deep-reinforcement-learning, dqn, ppo, a2c
rl implementations
No description or website provided.
Stars: ✭ 40 (+2.56%)
Mutual labels:  deep-reinforcement-learning, dqn, ddpg, a2c
Elegantrl
Lightweight, efficient and stable implementations of deep reinforcement learning algorithms using PyTorch.
Stars: ✭ 575 (+1374.36%)
Mutual labels:  deep-reinforcement-learning, dqn, ddpg, ppo
Deep Reinforcement Learning
Repo for the Deep Reinforcement Learning Nanodegree program
Stars: ✭ 4,012 (+10187.18%)
Mutual labels:  deep-reinforcement-learning, dqn, ddpg, ppo
Deeprl Tensorflow2
🐋 Simple implementations of various popular Deep Reinforcement Learning algorithms using TensorFlow2
Stars: ✭ 319 (+717.95%)
Mutual labels:  deep-reinforcement-learning, dqn, ddpg, ppo
Pytorch A2c Ppo Acktr Gail
PyTorch implementation of Advantage Actor Critic (A2C), Proximal Policy Optimization (PPO), Scalable trust-region method for deep reinforcement learning using Kronecker-factored approximation (ACKTR) and Generative Adversarial Imitation Learning (GAIL).
Stars: ✭ 2,632 (+6648.72%)
Mutual labels:  deep-reinforcement-learning, ppo, a2c, acktr
Reinforcement Learning Algorithms
This repository contains most of pytorch implementation based classic deep reinforcement learning algorithms, including - DQN, DDQN, Dueling Network, DDPG, SAC, A2C, PPO, TRPO. (More algorithms are still in progress)
Stars: ✭ 426 (+992.31%)
Mutual labels:  deep-reinforcement-learning, dqn, ddpg, ppo
Easy Rl
强化学习中文教程,在线阅读地址:https://datawhalechina.github.io/easy-rl/
Stars: ✭ 3,004 (+7602.56%)
Mutual labels:  deep-reinforcement-learning, dqn, ddpg, ppo
TF2-RL
Reinforcement learning algorithms implemented for Tensorflow 2.0+ [DQN, DDPG, AE-DDPG, SAC, PPO, Primal-Dual DDPG]
Stars: ✭ 160 (+310.26%)
Mutual labels:  dqn, ddpg, sac, ppo

Rainy

Actions Status PyPI version Black

Reinforcement learning utilities and algrithm implementations using PyTorch.

Example

Rainy has a main decorator which converts a function that returns rainy.Config to a CLI app. All function arguments are re-interpreted as command line arguments.

import os

from torch.optim import RMSprop

import rainy
from rainy import Config, net
from rainy.agents import DQNAgent
from rainy.envs import Atari
from rainy.lib.explore import EpsGreedy, LinearCooler


@rainy.main(DQNAgent, script_path=os.path.realpath(__file__))
def main(
    envname: str = "Breakout",
    max_steps: int = int(2e7),
    replay_size: int = int(1e6),
    replay_batch_size: int = 32,
) -> Config:
    c = Config()
    c.set_env(lambda: Atari(envname))
    c.set_optimizer(
        lambda params: RMSprop(params, lr=0.00025, alpha=0.95, eps=0.01, centered=True)
    )
    c.set_explorer(lambda: EpsGreedy(1.0, LinearCooler(1.0, 0.1, int(1e6))))
    c.set_net_fn("dqn", net.value.dqn_conv())
    c.replay_size = replay_size
    c.replay_batch_size = replay_batch_size
    c.train_start = 50000
    c.sync_freq = 10000
    c.max_steps = max_steps
    c.eval_env = Atari(envname)
    c.eval_freq = None
    return c


if __name__ == "__main__":
    main()

Then you can use this script like

python dqn.py --replay-batch-size=64 train --eval-render

See examples directory for more.

API documentation

COMING SOON

Supported python version

Python >= 3.7

Implementation Status

Algorithm Multi Worker(Sync) Recurrent Discrete Action Continuous Action MPI support
DQN/Double DQN ✔️ ✔️
BootDQN/RPF ✔️
DDPG ✔️ ✔️
TD3 ✔️ ✔️
SAC ✔️ ✔️
PPO ✔️ ✔️ ✔️ ✔️ ✔️
A2C ✔️ 🔺(1) ✔️ ✔️
ACKTR ✔️ (2) ✔️ ✔️
AOC ✔️ ✔️ ✔️
PPOC ✔️ ✔️ ✔️
ACTC(3) ✔️ ✔️ ✔️

(1): Very unstable
(2): Needs https://openreview.net/forum?id=HyMTkQZAb implemented
(3): Incomplete implementation. β is often too high.

Sub packages

References

DQN (Deep Q Network)

DDQN (Double DQN)

Bootstrapped DQN

RPF(Randomized Prior Functions)

DDPQ(Deep Deterministic Policy Gradient)

TD3(Twin Delayed Deep Deterministic Policy Gradient)

SAC(Soft Actor Critic)

A2C (Advantage Actor Critic)

ACKTR (Actor Critic using Kronecker-Factored Trust Region)

PPO (Proximal Policy Optimization)

AOC (Advantage Option Critic)

PPOC (Proximal Option Critic)

ACTC (Actor Critic Termination Critic)

Implementaions I referenced

Thank you!

https://github.com/openai/baselines

https://github.com/ikostrikov/pytorch-a2c-ppo-acktr

https://github.com/ShangtongZhang/DeepRL

https://github.com/chainer/chainerrl

https://github.com/Thrandis/EKFAC-pytorch (for ACKTR)

https://github.com/jeanharb/a2oc_delib (for AOC)

https://github.com/mklissa/PPOC (for PPOC)

https://github.com/sfujim/TD3 (for DDPG and TD3)

https://github.com/vitchyr/rlkit (for SAC)

License

This project is licensed under Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].