Giter Club home page Giter Club logo

tidy-reinforcement-learning's Introduction

Tidy Reinforcement Learning with Tensorflow

I am a researcher working on automation tasks using deep reinforcement learning. The paper and the reality were quite different, and there was a lot of difficulty during the automation task. I create this repository to help those who start a task using deep reinforcement learning. All of the code is in tensorflow and Python 3.

Objective

  • The code in this repo has a simple and pretty structure in which each algorithm achieves uniformity. It will be a huge help for you to understand the differences between the reinforcement learning algorithms.
  • Take advantage of the pseudo code folder. You should be able to see pseudo code and make all the algorithms into a consistent architecture.

List of Implemented Algorithms

We used open-gym cartpoles (for discrete tasks), mountain car (for continous tasks), and pendulum (for continous tasks). In the case of HER, we used the coin flipping environment cited in the paper.

  • Policy Gradient (PG) for cartpole (discrete task)
  • Advantage Actor-Critic (A2C) for cartpole (discrete task)
  • Advantage Actor-Critic (A2C) for mountain car (continuous task),,,(imperfect...!!!)
  • Proximal Policy Optimization (PPO) (continuous task)
  • Deep Q Network (DQN) for cartpole (discrete task)
  • Deep Deterministic Policy Gradient (DDPG) for pendulum (continuous task)
  • Hindsight Experience Replay for coin flipping (discrete task),,,(imperfect...!!!)
  • Soft Actor-Critic (SAC) for pendulum (continuous task)

Papers / Pseudo Codes of RL Algorithms

Compare the Following Algorithms

  • PG (cartpole) vs A2C (cartpole)
  • A2C (cartpole) vs A2C (pendulum)
  • A2C (pendulum) vs PPO (pendulum)
  • PG (cartpole) vs DQN (cartpole)
  • A2C (pendulum) vs DDPG (pendulum)
  • DQN (cartpole) vs HER (coin)
  • PPO (pendulum) vs SAC (pendulum)

Some Tips in Realistic Development

  • A positive reward is a magnet, and a negative reward is a mole game.
  • The fastest agent to learn the Pendulum task is DDPG. So is ddpg the best reinforcement learning algorithm?
  • Which of the sparse reward and dense reward is practical?
  • If the problem is difficult, split it up and approach it.
  • Without a simulator, there is no answer other than model-based running.
  • In very difficulut task, it does not affect the skill drawn from experience replay.
  • Hindsight Experience Replay changes reward function. Unless you are a master of reinforcement learning, do not try HER.

Installation

pip install -r requirements.txt

Inspired by

tidy-reinforcement-learning's People

Contributors

babyapple avatar

Watchers

James Cloos 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.