Skip to content

mpedramfar/Deep-Q-learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deep Reinforcement Learning

In this project, we train a reinforcement learning (RL) agent that navigates an environment similar to Unity's Banana Collector environment. This is one of the projects described in the Udacity Deep Reinforcement Learning Nanodegree repository.

Environment

The environment has yellow and blue bananas scattered around a in rectangle-shaped environment. Occasionally some bananas drop from the air. The environment is episodic and runs for 300 timesteps (30 seconds).

A reward of +1 is provided for collecting a yellow banana, and a reward of -1 is provided for collecting a blue banana. The goal is to collect as many yellow bananas as possible while avoiding blue bananas. The environment is solved when the agent achieves an average score of +13 over 100 consecutive episodes.

Trained Agent

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.

Instructions

  1. Clone this repository, then create and activate a conda environment with
conda create -n dql python=3.6
conda activate dql

For this project we use unity unityagents 0.4. You can install this and other requitements with

git clone https://github.com/udacity/deep-reinforcement-learning.git
cd deep-reinforcement-learning/python
pip install .
  1. Download the environment from one of the links below. Then copy the enviroment zip file in the root folder of the repository and decompress it. 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 to obtain the environment.

  2. Follow the instructions in main.ipynb to train the agent.

Algorithm and Results

We use deep Q-learning with fixed Q-targets, double Q-learning and experience replay, similar to DeepMind's implementation here. This algorithm solves the problem in 255 episodes.

results

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published