Skip to content

This is an implementation of rainbow DQN, for the udacity navigation problem.

Notifications You must be signed in to change notification settings

Zartris/rainbow_navigation_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project 1: Navigation

Introduction

For this project, you will train an agent 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.

Getting Started

  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.

  2. Place the file in the PROJECT GitHub repository, in the rainbow_navigation_project/ folder, and unzip (or decompress) the file.

  3. install environment

    1. pip install matplotlib
    2. pip install mlagents
    3. pip install numpy
    4. That should be it.

Instructions

Follow the instructions in rainbow.ipynb either train or test the solution! It is also written as python classes if that suits you better, but I will only go into details with the rainbow.ipynb.

Results

While the results are not optimal, it will solve the problem in around 300 episodes. I have created a better solution for the project that will solve it in less than 160 episodes, but it is not a rainbow implementation. The hyper-parameters for this project needs to be tuned further to improve the max average result over 100 episodes. As the hyper-parameters are set now, it will evens out around an average of 13.

I will recomment reading the report.pdf for better understanding of the rainbow implementation and look through the comments in the code. It should be fairly well commented.

Notes.

Through this implementation I have seeked guidance through others implementation of the different techniques used rainbow is all you need, and create my own implementation specific to solve the navigation project. To learn the affect of each implementation I found the README from KaplanAlex where good and I learned a lot from his small summary.

I have commented the code well to show understanding of the subject as well as notes to future me.

About

This is an implementation of rainbow DQN, for the udacity navigation problem.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published