Skip to content

Apply Deep Q Learning to teach an agent to navigate in Bananaworld. Udacity Deep Reinforcement Learning Project.

Notifications You must be signed in to change notification settings

tomkommando/BananaProject

Repository files navigation

Banana Collector

We train an agent to navigate in a large square shaped space and collect yellow bananas while avoiding blue bananas. The agent interacts and receives feedback from (Unity ML Agent) envionment using Python API.

The state space is 37 dimensional space and contains the agent's velocity, along with ray-based perception of objects around agent's forward direction. The agent has to learn which one of the following four actions to take in any given state:

  • 0 - move forward.
  • 1 - move backward.
  • 2 - turn left.
  • 3 - turn right.

The task is episodic and the environment is considered solved when the agent manages to score of +13 on average over 100 consecutive episodes.

trained_agent

Read more about training process and results in the report. 🐒

Getting Started

To run the code, you need Python 3.6 environment with required dependencies installed.

  1. Create environment
conda create --name bananaproject python=3.6
source activate bananaproject
  1. Clone this repository and install requirements
git clone https://github.com/tomkommando/BananaProject.git
cd BananaProject
pip install -r requirements.txt
  1. You may need to download a Udacity Banana Project environment. Pick a version that match 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.

  2. Place the file in the BananaProject GitHub repository folder, and unzip (or decompress) the file.

Instructions

In order to run the code:

  1. Activate environment:
source activate bananaproject
  1. Make sure you are in the correct folder.
cd BananaProject
  1. start jupyter notebook server
jupyter notebook
  1. Open your browser and connect to the Jupyter Notebook server in the local host address: http://127.0.0.1:8888/. You may need to enter Token which is printed out in the console when you start the Jupyter Notebook server, alternatively you can choose a password for yourself.

  2. Run train_agent.ipynb and follow the instructions in the file to train an agent or watch a trained agent playing!

Jupyter

About

Apply Deep Q Learning to teach an agent to navigate in Bananaworld. Udacity Deep Reinforcement Learning Project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published