Skip to content

This repository contains my 3 submodule projects for the Udacity's Deep Reinforcement Learning Nanodegree

Notifications You must be signed in to change notification settings

ahmedadamji/DeepReinforcementLearningND

Repository files navigation

Deep Reinforcement Learning Nanodegree

The submodules in this repo contain the completed projects for the Deep RL Nanodegree by Udacity.

Project 1: Navigation

For this project, an agent was trained to navigate (and collect bananas!) in a large, square world.

Trained Agent

A reward of +1 is provided for collecting a yellow banana, and a reward of -1 is provided for collecting a blue banana. Thus, the goal of your agent is to collect as many yellow bananas as possible while avoiding blue bananas.

The state space has 37 dimensions and contains the agent's velocity, along with ray-based perception of objects around agent's forward direction. Given this information, the agent has to learn how to best select actions. Four discrete actions are available, corresponding to:

  • 0 - move forward.
  • 1 - move backward.
  • 2 - turn left.
  • 3 - turn right.

The task is episodic, and in order to solve the environment, your agent must get an average score of +13 over 100 consecutive episodes.

Project 2: Continuous Control

For this project, I worked 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.

For this project the agent was trained using Distributed Training, using the second version of the reacher environment which 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.

Project 3: Collaboration and Competition

For this project, I worked with the Tennis environment.

Trained Agent

In this environment, two agents control rackets to bounce a ball over a net. If an agent hits the ball over the net, it receives a reward of +0.1. If an agent lets a ball hit the ground or hits the ball out of bounds, it receives a reward of -0.01. Thus, the goal of each agent is to keep the ball in play.

The observation space consists of 8 variables corresponding to the position and velocity of the ball and racket. Each agent receives its own, local observation. Two continuous actions are available, corresponding to movement toward (or away from) the net, and jumping.

The task is episodic, and in order to solve the environment, your agents must get an average score of +0.5 (over 100 consecutive episodes, after taking the maximum over both agents). Specifically,

  • After each episode, we add up the rewards that each agent received (without discounting), to get a score for each agent. This yields 2 (potentially different) scores. We then take the maximum of these 2 scores.
  • This yields a single score for each episode.

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

How to pull all the submodules of this repository?

Clone this repository to your local machine.

git clone https://github.com/ahmedadamji/DeepReinforcementLearningND.git

Navigate to the root directory of the cloned repository.

cd DeepReinforcementLearningND

Initialize and update all the submodules of the repository using the following command:

git submodule update --init --recursive

This will fetch all the submodules and checkout the appropriate commit for each submodule.

To update all the submodules to the latest version, run the following command:

git submodule update --recursive --remote

This will update all the submodules to the latest commit on their respective remote branches.

That's it! You should now have all the submodules of this repository in their latest version.

About

This repository contains my 3 submodule projects for the Udacity's Deep Reinforcement Learning Nanodegree

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages