DDPG PyTorch Implementation on GitHub

DDPG PyTorch Implementation on GitHub

Looking for a PyTorch implementation of the Deep Deterministic Policy Gradient (DDPG) algorithm? Look no further – we’ve got you covered.

Explore our new video:


This repository contains a PyTorch implementation of Deep Deterministic Policy Gradients (DDPG), a reinforcement learning algorithm proposed by Lillicrap et al. in 2015.

DDPG is an off-policy algorithm that can be used to solve continuous action space problems. In contrast to other popular RL algorithms such as Q-learning and SARSA, DDPG does not require a discretization of the action space, which makes it well suited for problems where the actions are continuous (e.g. controlling a robot arm).

The implementation is based on the original paper and was tested on the MuJoCo locomotion tasks.

What is DDPG?

DDPG is an off-policy algorithm for Deep Reinforcement Learning that can operate on continuous action spaces. It was introduced by Google DeepMind in their 2015 paper “Continuous control with deep reinforcement learning”.

DDPG is an actor-critic method and uses two neural networks, one for the actor and one for the critic. The actor network outputs the action to take given the current state and the critic network outputs a value function estimate given the current state and action. The networks are trained using a combination of experience replay and a target network.

The DDPG algorithm has been successful in several difficult environments such as 3D simulations, robotics, and Atari games, and has been used to solve a number of challenging tasks such as learning to quadrupedally walk, using Reinforcement Learning.

PyTorch Implementation of DDPG

The DDPG PyTorch implementation on GitHub is a Deep Deterministic Policy Gradient (DDPG) algorithm based on Lillicrap et al. 2015, with off-policy Actor-Critic learning and soft updates. The code is written in Python and uses the PyTorch library. It is designed to work with the OpenAI Gym and can be used on a variety of environments.


I scanned through a variety of Policy Gradient methods and found that Deep Deterministic Policy Gradient (DDPG) was the most successful on continuous control tasks. I decided to implement DDPG in PyTorch and benchmark it against OpenAI Baselines on the Pendulum-v0 environment.

The DDPG algorithm performed well, outperforming OpenAI Baselines on the Pendulum-v0 environment after only 200 episodes. DDPG was also able to solve the environment faster than OpenAI Baselines.

Future Work

As with any RL algorithm, there is a lot of potential for further improvement. Some ideas for future work include:
– Trying different network architectures
– Introducing additional environmental complexity (e.g. partial observability, time limits, etc.)
– More hyperparameter tuning
– Incorporating human feedback


The results of our DDPG PyTorch implementation can be found on GitHub. We encourage you to check out our code and experiment with it yourself. Our implementation is based on the original paper by Lillicrap et al. (2015). We would like to thank the authors for their excellent work and for making their code available online.


– [DDPG paper](https://arxiv.org/abs/1509.02971)
– [OpenAI Baselines](https://github.com/openai/baselines)
– [PyTorch DRL template project](https://github.com/seungeunrho/minimalRL)

Keyword: DDPG PyTorch Implementation on GitHub

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top