Skip to content

A single agent Reinforcement Learning using DDQN for collecting bananas in UnityML environment

Notifications You must be signed in to change notification settings

drormeir/BananaCollectorRL

Repository files navigation

BananaCollector

This project was submitted as part of Udacity's Deep Reinforcement Learning Nanodegree and is similar to UnityML "Food Collector"

The purpose of the project is to build and train a single agent that navigates and collecting bananas in a big square world. Trained Agent

This game is episodic, where each episode is consists of 300 steps. The environment provides a reward for each step according to the following rules: A reward of +1 for collecting a yellow banana, and -1 for collecting a blue banana. The goal of the agent is to collect as many yellow bananas as possible while avoiding blue bananas. The minimal requirement for success is to have an average score of at least 13.0 points in 100 consecutive episodes.

The agent runs on Python 3.6 + PyTorch. The paper that describes the algorithm is "Double Duel Q-network" with "Epsilon-Greedy policy" for environment exploration and an "Experience Replay Buffer" as a dynamic dataset for the learning process.

The original git repo of this project is at: https://github.com/udacity/deep-reinforcement-learning/tree/master/p1_navigation

Installation

To set up a python environment to run the code in this repository, please follow the instructions below:

  1. Create (and activate) a new environment with Python 3.6.

    • Linux or Mac:
    conda create --name drlnd python=3.6
    source activate drlnd
    • Windows:
    conda create --name drlnd python=3.6 
    conda activate drlnd
  2. Install pytorch using conda:

conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
  1. Clone this git repo
git clone git@github.com:drormeir/BananaCollector.git
cd BananaCollector
pip install .
  1. Download the environment from one of the links below. You need only select the environment that matches your operating system:

  2. Create an IPython kernel for the drlnd environment.

python -m ipykernel install --user --name drlnd --display-name "drlnd"
  1. Before running code in a notebook, change the kernel to match the drlnd environment by using the drop-down Kernel menu.

Kernel

Usage

The Jupyter notebook Navigation_Test.ipynb imports all necessary dependencies and the python files of this project.

Report

A detailed report describing the learning algorithm, along with ideas for future work is at report.md

About

A single agent Reinforcement Learning using DDQN for collecting bananas in UnityML environment

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published