Git Product home page Git Product logo

taxi-extension's Introduction

Taxi Extension

Assignment on “Deep Reinforcement Learning and Application to the Intrusion Response Case”

Consider the following extension to the Taxi-v3 environment provided by OpenAI gym: the Taxi car has a fuel tank that can hold up to 10 (discrete) gallons of fuel.

  • When a new episode starts, the fuel tank contains a random amount of fuel (any discrete number from 1 to 10).
  • There is at least one gas station at distance 1 from the taxi.
  • There are at least 4 other gas stations in random positions on the map, totaling 5 gas stations.
  • Every move of the taxi requires 1 gallon of fuel.
  • When the taxi is in a position with a gas station, it can decide whether to make gas or to keep on going. If the decision is to make gas, the tank is completely replenished.
  • If the tank is empty, the episode terminates with a penalty.

The student is required to:

  • Design and develop such extension and train an agent on it using Q-Learning.
  • Write a short report (2 to 4 pages) explaining how the extension was designed and comparing the experimental results (feasibility of the problem, time to reach convergence, observed behavior) obtained by using the new environment with those obtained with the Taxi-v3 environment.

Solution

The new environment is implemented in the file taxi_ext.py. In order to train the agent, run the file train_ext.ipynb (Jupyter Notebook) for the extended environment and train_base.ipynb for the original environment. The results are saved in the folder stats and can be visualized with the file results.ipynb.

Requirements

The code is written with Python 3.9. The required packages are listed in the file requirements.txt.

Clone and Install

To clone the repository, run the following command:

git clone https://github.com/Marini97/taxi-extension.git

To install the required packages, run the following command:

pip install -r requirements.txt

taxi-extension's People

Contributors

marini97 avatar

Stargazers

 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.