Giter Site home page Giter Site logo

ddpg's Introduction

Deep Deterministic Policy Gradients (DDPG)

A Tensorflow implementation of a Deep Deterministic Policy Gradient (DDPG) network for continuous control.

Trained on OpenAI Gym environments.

This implementation has been successfully trained and tested on the Pendulum-v0 and BipedalWalker-v2 environments. This code can however be run 'out of the box' on any environment with a low-dimensional state space and continuous action space.

This currently holds the high score for the Pendulum-v0 environment on the OpenAI leaderboard

Requirements

Note: Versions stated are the versions I used, however this will still likely work with other versions.

Usage

The default environment is 'Pendulum-v0'. To use a different environment simply pass the environment in via the --env argument when running the following files.

  $ python train.py

This will train the DDPG on the specified environment and periodically save checkpoints to the /ckpts folder.

  $ ./run_every_new_ckpt.sh

This shell script should be run alongside the training script, allowing to periodically test the latest network as it trains. This script will monitor the /ckpts folder and run the test.py script on the latest checkpoint every time a new checkpoint is saved.

  $ python play.py

Once we have a trained network, we can visualise its performance in the environment by running play.py. This will play the environment on screen using the trained network and save a GIF (optional).

Note: To reproduce the best 100-episode performance of -123.79 +/- 6.90 that achieved the top score on the 'Pendulum-v0' OpenAI leaderboard, run:

  $ python test.py --ckpt_file 'Pendulum-v0.ckpt-26800'

Results

Result of training the DDPG on the 'Pendulum-v0' environment:

Result of training the DDPG on the 'BipedalWalker-v2' environment:

To-Do

Environment Best 100-episode performance Ckpt file
Pendulum-v0 -123.79 +- 6.90 ckpt-26800

To-do

  • Train/test on further environments, including Mujoco

References

License

MIT License

ddpg's People

Contributors

msinto93 avatar

Stargazers

Yunli Shao avatar  avatar  avatar  avatar  avatar Gabriel B.A. avatar  avatar  avatar JOO, ILTAECK avatar  avatar Ma Jinming avatar Tom Keller avatar Ioannis Kourouklides avatar dotieuthien avatar gyusu han avatar Aslan Chui avatar N. YC. Kim avatar Yong-Gwi Cho avatar Duo Gong avatar  avatar

Watchers

 avatar paper2code - bot 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.