All Projects → Scitator → Rl Course Experiments

Scitator / Rl Course Experiments

Licence: mit

Projects that are alternatives of or similar to Rl Course Experiments

Hands On Reinforcement Learning With Python
Master Reinforcement and Deep Reinforcement Learning using OpenAI Gym and TensorFlow
Stars: ✭ 640 (+776.71%)
Mutual labels:  jupyter-notebook, reinforcement-learning, deep-reinforcement-learning, policy-gradient, deep-q-network
2048 Deep Reinforcement Learning
Trained A Convolutional Neural Network To Play 2048 using Deep-Reinforcement Learning
Stars: ✭ 169 (+131.51%)
Mutual labels:  jupyter-notebook, reinforcement-learning, deep-reinforcement-learning, deep-q-network
Reinforcement learning tutorial with demo
Reinforcement Learning Tutorial with Demo: DP (Policy and Value Iteration), Monte Carlo, TD Learning (SARSA, QLearning), Function Approximation, Policy Gradient, DQN, Imitation, Meta Learning, Papers, Courses, etc..
Stars: ✭ 442 (+505.48%)
Mutual labels:  jupyter-notebook, reinforcement-learning, deep-reinforcement-learning, policy-gradient
Lagom
lagom: A PyTorch infrastructure for rapid prototyping of reinforcement learning algorithms.
Stars: ✭ 364 (+398.63%)
Mutual labels:  jupyter-notebook, reinforcement-learning, deep-reinforcement-learning, policy-gradient
Deeprl Tutorials
Contains high quality implementations of Deep Reinforcement Learning algorithms written in PyTorch
Stars: ✭ 748 (+924.66%)
Mutual labels:  jupyter-notebook, reinforcement-learning, deep-reinforcement-learning, deep-q-network
Tensorflow Reinforce
Implementations of Reinforcement Learning Models in Tensorflow
Stars: ✭ 480 (+557.53%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning, policy-gradient, deep-q-network
Reinforcement Learning
Minimal and Clean Reinforcement Learning Examples
Stars: ✭ 2,863 (+3821.92%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning, policy-gradient, deep-q-network
Rad
RAD: Reinforcement Learning with Augmented Data
Stars: ✭ 268 (+267.12%)
Mutual labels:  jupyter-notebook, reinforcement-learning, deep-reinforcement-learning, deep-q-network
Pytorch Rl
This repository contains model-free deep reinforcement learning algorithms implemented in Pytorch
Stars: ✭ 394 (+439.73%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning, policy-gradient
Rl Book
Source codes for the book "Reinforcement Learning: Theory and Python Implementation"
Stars: ✭ 464 (+535.62%)
Mutual labels:  jupyter-notebook, reinforcement-learning, deep-reinforcement-learning
Deep Q Learning
Minimal Deep Q Learning (DQN & DDQN) implementations in Keras
Stars: ✭ 1,013 (+1287.67%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning, deep-q-network
Deep Reinforcement Learning
Repo for the Deep Reinforcement Learning Nanodegree program
Stars: ✭ 4,012 (+5395.89%)
Mutual labels:  jupyter-notebook, reinforcement-learning, deep-reinforcement-learning
Curl
CURL: Contrastive Unsupervised Representation Learning for Sample-Efficient Reinforcement Learning
Stars: ✭ 346 (+373.97%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning, deep-q-network
Practical rl
A course in reinforcement learning in the wild
Stars: ✭ 4,741 (+6394.52%)
Mutual labels:  jupyter-notebook, reinforcement-learning, deep-reinforcement-learning
Dissecting Reinforcement Learning
Python code, PDFs and resources for the series of posts on Reinforcement Learning which I published on my personal blog
Stars: ✭ 512 (+601.37%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning, genetic-algorithm
Text summurization abstractive methods
Multiple implementations for abstractive text summurization , using google colab
Stars: ✭ 359 (+391.78%)
Mutual labels:  jupyter-notebook, reinforcement-learning, policy-gradient
Pysc2 Examples
StarCraft II - pysc2 Deep Reinforcement Learning Examples
Stars: ✭ 722 (+889.04%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning, deep-q-network
Notebooks
Some notebooks
Stars: ✭ 53 (-27.4%)
Mutual labels:  jupyter-notebook, reinforcement-learning, genetic-algorithm
Btgym
Scalable, event-driven, deep-learning-friendly backtesting library
Stars: ✭ 765 (+947.95%)
Mutual labels:  reinforcement-learning, deep-reinforcement-learning, policy-gradient
Reinforcement Learning
Learn Deep Reinforcement Learning in 60 days! Lectures & Code in Python. Reinforcement Learning + Deep Learning
Stars: ✭ 3,329 (+4460.27%)
Mutual labels:  jupyter-notebook, reinforcement-learning, deep-reinforcement-learning

RL course experiments

Overview

This repository provides code implementations for popular Reinforcement Learning algorithms.

Main idea was to generalise main RL algorithms and provide unified interface for testing them on any gym environment. For example, now your can create your own Double Dueling Deep Recurrent Q-Learning agent (Let's name it, 3DRQ). For simplicity, all main agent blocks are in agents folder.

For now, repository is under after-course refactoring. So, many documentation needed.

All code is written in Python 3 and uses RL environments from OpenAI Gym. Advanced techniques use Tensorflow for neural network implementations.

Inspired by:

Additional thanks to JustHeuristic for Practical_RL course

Table of Contents

For more information, look at folder readme.

Special requirements

For simple script running you need to install additional repo with optimization stuff for neural networks:

pip install git+https://github.com/Scitator/rstools

Example usage

DQN:

PYTHONPATH=. python DQN/run_dqn.py --plot_history --env CartPole-v0 \
--feature_network linear --layers 128-128 --hidden_size 64 \
--n_epochs 1000 --n_games 4 --batch_size 128 --t_max 500 --episode_limit 500 \
--replay_buffer simple --replay_buffer_size 2000 \
--qvalue_lr 0.0001 --feature_lr 0.0001 --value_lr 0.0001 \
--initial_epsilon 0.8 --final_epsilon 0.1 \
--gpu_option 0.25 \
--api_key <paste_your_gym_api_key_here>

Reinforce:

PYTHONPATH=. python PG/run_reinforce.py --plot_history --env CartPole-v0 \ 
--feature_network linear --layers 128-128 --hidden_size 64 \ 
--n_epochs 10000 --n_games 1 --batch_size 1 --t_max 500 --episode_limit 500 \
--entropy_factor 0.005 --policy_lr 0.0000001 --feature_lr 0.0000001 --grad_clip 10.0 \ 
 --gpu_option 0.25 --time_major \
--api_key <paste_your_gym_api_key_here>

Feed-Forward Asynchronous Advantage Actor-Critic:

PYTHONPATH=. python A3C/run_a3c.py --plot_history --env CartPole-v0 \
--feature_network linear --layers 128-128 --hidden_size 64 \  
--n_epochs 500 --n_games 1 --batch_size 1 --t_max 100 --episode_limit 500 \
--entropy_factor 0.005 --policy_lr 0.00001 --feature_lr 0.00001 --value_lr 0.00001 --grad_clip 10.0 \
--gpu_option 0.25 --time_major \
--api_key <paste_your_gym_api_key_here>

If agent start to play well, you can always stop training by Ctrl+C hotkey. If something go wrong, you can always evaluate agent thought magic --load --n_epochs 0 combination.

Metrics
  • loss - typical neural network loss
  • reward - typical environment reward, but because Environment Pool is always used not very informative for now
  • steps - mean number of game ends per epoch session
If you have linux with NVIDIA GPU and no X server, but want to try gym

You need to reinstall NVIDIA drivers.

issue source how-to guide

and add bash xvfb start; DISPLAY=:1 before run command.

Contributing

write code

Found a bug or know how to write it simpler? Or maybe you want to create your own agent? Just follow PEP8 and make merge request.

...or play a game

We have a lot of RL algorithms, and even more gym environments to test them. So, play a game, save

  • agent parameters (so anyone can reproduce)
  • agent itself (model.ckpt*)
  • plots (they will be automatically generated with --plot_history flag)
  • gym-link (main results)
  • make merge request (solutions should be at field/solutions.md, for example DQN/solutions.md)
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].