rohithpr / RL_banana_brain

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deep Reinforment Learning - Project 1 - Banana Gobbler

This project repository contains the solution for Udacity's Deep Reinforcement Learning Nanodegree Navigation Project.

Algorithm

I have used Deep QNetworks to train the agent. For more details read the report.

Environment details

This code is based off the workspace provided as part of Udacity’s Deep Reinforcement Learning nanodegree.

The environment is based on Unity ML-agents.

The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source Unity plugin that enables games and simulations to serve as environments for training intelligent agents.

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 the 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, the agent must get an average score of +13 over 100 consecutive episodes.

Note: The project environment provided by Udacity is similar to, but not identical to the Banana Collector environment on the Unity ML-Agents GitHub page.

Installation requirements

Follow the instructions below to setup the environment on your own machine:

Step 1: Clone the DRLND Repository and follow the instructions in the DRLND GitHub repository to set up your Python (3.6.3) environment. These instructions can be found in README.md at the root of the repository. By following these instructions, you will install PyTorch(0.4.0), the ML-Agents toolkit, and a few more Python packages required to complete the project.

(For Windows users) The ML-Agents toolkit supports Windows 10. While it might be possible to run the ML-Agents toolkit using other versions of Windows, it has not been tested on other versions. Furthermore, the ML-Agents toolkit has not been tested on a Windows VM such as Bootcamp or Parallels.

Step 2: Download the Unity Environment

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 "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.)

Train

To train the agent, run Navigation.ipynb cell by cell in jupyter notebook.

About


Languages

Language:Python 80.4%Language:Jupyter Notebook 19.6%