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.
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
To set up a python environment to run the code in this repository, please follow the instructions below:
-
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
-
Install pytorch using conda:
conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
- Clone this git repo
git clone git@github.com:drormeir/BananaCollector.git
cd BananaCollector
pip install .
-
Download the environment from one of the links below. You need only select the environment that matches your operating system:
- Linux: click here
- Mac OSX: click here
- Windows (32-bit): click here
- Windows (64-bit): click here
-
Create an IPython kernel for the
drlnd
environment.
python -m ipykernel install --user --name drlnd --display-name "drlnd"
- Before running code in a notebook, change the kernel to match the
drlnd
environment by using the drop-downKernel
menu.
The Jupyter notebook Navigation_Test.ipynb
imports all necessary dependencies and the python files of this project.
A detailed report describing the learning algorithm, along with ideas for future work is at report.md