/p2_continuous-control

Deep Reinforcement Learning Nanodegree: Project 2

Primary LanguagePython

Project 2: Continuous Control

Introduction

For this project, you will work with the Reacher environment.

Trained Agent

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.

Environment solved criterion: We solve the single agent version of the environment. The task is episodic, and in order to solve the environment, the agent must get an average score of +30 over 100 consecutive episodes.

Getting Started

The project has been tested on Mac OSX only.

Download the environment

  1. Download the environment from the link below.

  2. Place the file in the p2_continuous-control/ source folder, and unzip (or decompress) the file.

Install all the dependencies

  1. Install virtualenv
sudo apt install virtualenv
  1. Create a virtualenv for python3
virtualenv -p python3 drlnd
  1. Activate the environment
source drlnd/bin/activate
  1. Install all the dependencies
cd p2_continuous-control/
pip3 install python/

Note that the setup assumes that Tkinter is installed for python3. If not, install using the following

sudo apt install python3-tk

Training an agent

To train an agent run the following command

python DDPG.py --num_episodes 500