Deep Q-Learning agent for final project of Udacity Nanodegree Program.
This project consist in train an agent and navigate in a large but finite square to pick yellow bananas, while avoiding blue bananas.
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.
Like the task is episodic, and in order to solve the environment, the agent must get an average score of +13 over 100 consecutive episodes.
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.
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: , , ,
-
Step 1, ensure the fulfilment of environment requirements.
- Python 3.6 or higher.
- If you wnat to create an environment to isolate the environment, you can install miniconda3.
- Install git to clone the repository. (This is an optional step)
-
Step 2, download the Unity Environment.
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.
Then, place the file in the
p1_navigation/
folder in the DRLND GitHub repository, and unzip (or decompress) the file. -
Step 3, clone or download the code.
You can clone the code from the git repository
git clone https://github.com/2Fast2/Deep_Q_Learning_Navigation.git
or download as a zip file.
-
Step 4, install necessary dependencies.
Install other necessary libraries from the
requirements.txt
file.pip install -r requirements.txt
Once you have all requirements satisfies, open Navigation.ipynb
(located in the p1_navigation/
folder in the DRLND GitHub repository) jupyter notebook and run the cells to train the agent.