As part of the Deep reinforcement learning nano degree with Udacity, this is an implementation of the DQN algorithm to train an agent how to optimally maximize yellow banana collection.
For any reinforcement learning implementation, the agent has to interact with their environment. In this case, the environment is represented as a large square floor with blue and yellow bananas scattered throughout.
Per the agent's action, the agent is rewarded according to banana collection; -1 for a blue banana collected and +1 for a yellow banana collected.
The state space has to total of 37 dimensions and keeps information on the velocity of the agent, as well a ray based perception of objects in front of the agent.
Within the environment, there is a discrete action space of 4. At any point in time, the agent is able 1. move forward, 2. move right, 3. move backwards, or 4. move left.
In order to successfully complete our episodic task, the agent is required to obtain an average score of at least 13 bananas over 100 episodes.
-
To get up and running, you'll want to download the defined Udacity dependencies here
-
You'll need to grab the following:
-
Next you'll need the navigation simulation. Download the environment that corresponds to your operating system.
- Linux: click here
- Mac OSX: click here
- Windows (32-bit): click here
- Windows (64-bit): click here
(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.
-
Move the downloaded file to the
p1_navigation/
folder in the DRLND repository. Decompress the file and you'll be ready to go. -
Navigate to the
Navigation.ipynb
and load the file using the drlnd kernel.
Credit to Udacity for collating the above resources