Giter Club home page Giter Club logo

pieromacaluso / navigation Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 12.4 MB

Implementation of Deep Q Network for the Banana environment in the context of "Navigation", the first Udacity Deep Reinforcement Learning Nanodegree project.

License: GNU General Public License v3.0

Python 47.82% TeX 52.18%
deep-reinforcement-learning reinforcement-learning udacity-nanodegree udacity udacity-deep-reinforcement-learning deep-learning machine-learning unity

navigation's Introduction

Project 1: Navigation

avatar Piero Macaluso - pieromacaluso

Project Cover

Introduction

This project is mainly focused on training an agent to navigate and collect bananas in a large square world.

This document is mainly focused on the description of the environment and how to setup the experiments. Further information about the algorithm used to train the agent can be retrieved by reading the report.pdf document in the root of this repository

Environment Details

The state space has 37 dimensions and contains the agent's velocity, along with ray-based perception of objects around agent's forward direction.

The agent has four discrete actions to select, corresponding to:

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

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.

The task is episodic, the environment can be considered as solved when the agent reaches an average score of +13 over 100 consecutive episodes.

Getting Started

Environment Download and Setup

Preamble

The work in this repository has been tested on Python 3.6.13, by using Poetry, a tool for dependency management and packaging in Python. However, it is possible to use virtualenv or other dependency management systems thanks to the presence of the requirements.txt file in the root folder.

Instruction

  1. Download the environment from one of the links below. You need only select the environment that matches 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.

  2. Place the file in the root folder of this GitHub repository and decompress the file.

  3. Two alternatives there:

    • Poetry: Run poetry install in the root directory.
    • Other dependency management tools: Install the requirements listed in the requirements.txt file.

How-to start the training of the agent

To train the agent it is necessary to go to the root folder of the project and run python train.py.

The code will start to create checkpoints in the appropriate folder.

How-to test the agent

The best parameters of the network found in the training are available in the file checkpoint.pth in the root folder of this repository.

In order to test the network it is possible to go to the root folder and run python test.py

navigation's People

Contributors

pieromacaluso avatar

Watchers

 avatar  avatar  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.