sparshgarg23 / DDPG

Deep Deterministic Policy Gradient for controlling multiple 2 DOF robots.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Continuous Control

Introduction

This project works 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.

Distributed Training

For this project there are 2 separate versions of the Unity environment:

  • The first version contains a single agent.
  • The second version contains 20 identical agents, each with its own copy of the environment.

The second version is useful for algorithms like PPO, A3C, and D4PG that use multiple (non-interacting, parallel) copies of the same agent to distribute the task of gathering experience.
In this case I implemented a DDPG.

Getting Started

The environments for Windows (64 bit) are already included in this repository.
If another environment is required, it must be downloaded separately.

  1. Download the environment from one of the links below. You need only select the environment that matches your operating system:

    (For Windows users) Check out this link if you need help with determining if your computer is running a 32-bit version or 64-bit version of the Windows operating system.

    (For AWS) If you'd like to train the agent on AWS (and have not enabled a virtual screen), then please use this link (version 1) or this link (version 2) to obtain the "headless" version of the environment. You will not be able to watch the agent without enabling a virtual screen, but you will be able to train the agent. (To watch the agent, you should follow the instructions to enable a virtual screen, and then download the environment for the Linux operating system above.)

  2. Place the file in the Repository and unzip (or decompress) the file.

Instructions

The main file of this project is Continuous_Control.ipynb.
To use a Jupyter notebook, run the following command from this folder:
jupyter notebook
and open Continuous_Control.ipynb from the list of files.

Once the project notebook has been opened, you can simply click the "Run->" button in the main menu to execute the python program that opens the Unity Reacher playing field and starts to train 20 agents solve this environment.

About

Deep Deterministic Policy Gradient for controlling multiple 2 DOF robots.


Languages

Language:HTML 87.9%Language:Jupyter Notebook 8.9%Language:Python 3.2%