Code Monkey home page Code Monkey logo

banana-dqn's Introduction

Banana Collection in Unity environment

Banana collection navigation by a vanilla DQN agent

Trained_agent

Environment Details

The objective of this project is to collect as many yellow bananas as possible while avoiding the blue bananas. The following is the environment where the agent performs its task.

Unity Academy name: Academy  
Number of Brains: 1  
Number of External Brains : 1  
Lesson number : 0  
Reset Parameters :

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: , , , 

The environment has 37 state spaces for the agent to operate in. There are 4 discrete actions spaces for forward, backward, turn left, turn right moves. The agent's problem is considered solved when average score of 13 is attained. The agent aim to achieve within 1800 episodes.

Installation Instruction

The README has instructions for installing dependencies or downloading needed files.

Python 3.6 is required. The program requires PyTorch, the ML-Agents toolkit, and a few more Python packages required to complete the project.

git clone https://github.com/udacity/deep-reinforcement-learning.git  
cd deep-reinforcement-learning/python  
pip install .

Run the following to create drlnd kernel in ipython so that the right unity environment is loaded correctly

python -m ipykernel install --user --name drlnd --display-name "drlnd"

Getting Started

Place report.ipynb in the folder p1_navigation/ together with the following two files:

  1. dqn_agent.py - contains the DQN agent code.
  2. model.py - contains neural network class for used as Q function

The Unity Banana collection environment can be downloaded from here:

Linux: click here
Mac OSX: click here
Windows (32-bit): click here
Windows (64-bit): click here

Choose the environment suitable for your machine. Unzipping will create another Banana_xxxx folder. For example, if the Linux Banana environment is downloaded, Banana_Linux will be created.

Run p1_navigation/report.ipynb

Enter the right path for the Unity Banan environment in report.ipynb. For example for a 64-bit Linux machine:

env = UnityEnvironment(file_name="../Banana_Linux/Banana.x86_64")

Run the remaining cell as ordered in report.ipynb to train the DQN agent.

banana-dqn's People

Contributors

jiewwantan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.