/udacity-p1-navigation

Udacity Deep Reinforcement Learning ND Project 1 - Navigation(Banana Collector)

Primary LanguageJupyter Notebook

udacity-p1-navigation

Udacity Deep Reinforcement Learning ND Project 1 - Navigation(Banana Collector)

Project Details

This project is one of the Udacity Deep Reinforcement Learning Nano Degree program. It will train an agent to navigate and collect bananas in a square world. You can train your agent and validate it's performance through various deep Q-Network algorithms. Let's check out details.

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.

The follwoing is the unity agent information for this project.

INFO:unityagents:
'Academy' started successfully!
Unity Academy name: Academy
        Number of Brains: 1
        Number of External Brains : 1
        Lesson number : 0
        Reset Parameters :
		
Unity brain name: BananaBrain
        Number of Visual Observations (per agent): 0
        Vector Observation space type: continuous
        Vector Observation space size (per agent): 37
        Number of stacked Vector Observation: 1
        Vector Action space type: discrete
        Vector Action space size (per agent): 4
        Vector Action descriptions: , , ,

Getting Started

  1. Clone this repository git clone https://github.com/ethanchoi/udacity-p1-navigation.git

    If you haven't already, please follow the instructions in the DRLND GitHub repository to set up your Python environment. These instructions can be found in README.md at the root of the repository. By following these instructions, you will install PyTorch, the ML-Agents toolkit, and a few more Python packages required to complete the project.

  2. 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 to obtain the environment.

  3. Place the file in your DRLND GitHub repository, in the udacity_p1-navigation/ folder, and unzip (or decompress) the file.

Instructions

Follow the instructions in Navigation.ipynb to get started with training your own agent! You can train an agenet to collect bananas as fast as possible and check it's performance. Also you are able to tune hyper-parameters in your model, for examples, number of hidden layers, neurons and eps end/decay variables.

After finishing your agent training, you can save model weights and load it later. Finally, you can simulate the agent how it navigate to collect bananas and check a final score.