/DDPG-Continuous-Control

Deep Reinforcement Learning - Continuous Control - DDPG in Pytorch

Primary LanguageJupyter Notebook

Deep Reinforcement Learning - Continuous Control - DDPG in Pytorch

Introduction

In this environment, a double-jointed arm can move to target locations. A reward of +0.1 is provided for each step that the agent's hand is in the goal location. Thus, the goal of your agent is to maintain its position at the target location for as many time steps as possible.

The observation space consists of 33 variables corresponding to position, rotation, velocity, and angular velocities of the arm. Each action is a vector with four numbers, corresponding to torque applicable to two joints. Every entry in the action vector should be a number between -1 and 1.

After each episode, we add up the rewards that each agent received (without discounting), to get a score for each agent. This yields 20 (potentially different) scores. We then take the average of these 20 scores. This yields an average score for each episode (where the average is over all 20 agents).

The environment is considered solved, when the average (over 100 episodes) of those average scores is at least +30.

Getting Started

Dependencies

  • Python 3.6 or higher (https://www.anaconda.com/download) or (https://www.python.org/downloads/)

  • Optional but recommended Create (and activate) a new environment with Python 3.6. Create (and activate) a new environment with Python 3.6.

    • Linux or Mac:
     conda create --name drlnd python=3.6
     source activate drlnd
    • Windows:
     conda create --name drlnd python=3.6 
     activate drlnd
  • Install requirements:

    clone git https://github.com/adaptationio/DDPG-Continuous-Control.git
    cd DDPG-Continuous-Control
    pip install .
  • Download the correct Unity Environment for OS and copy into same directory as results.ipynb

Instructions

  • Run:
    jupyter notebook
    Open results.ipynb and run code cells in order