GithubHelp home page GithubHelp logo

rodrigo-pena / rl-mountain-car Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 2.22 MB

Reinforcement learning solution for a mountain-car problem

License: MIT License

Python 2.09% Jupyter Notebook 97.91%

rl-mountain-car's Introduction

rl-mountain-car

Reinforcement learning solution with the SARSA(\lambda) algorithm for the mountain-car problem.

Goal: help an under-powered car find its way up a steep hill. Since the car has not enough power to directly climb the hill, it has to learn to swing back-and-forth to gain enough momentum to reach the summit.

Implementation: 2-layer neural network with reward-modulated plasticity.

Requirements

Make sure you have the follwing installed:

Alternatively, you can simply run this command to install those dependencies:

pip install -r requirements.txt

Running the code

The best way to get started is by running from the terminal the command

python starter.py

This will trigger an interactive view of the learning trials, using default parameters. The vector field plots will show, before and after training, the direction of the most likely action at evenly-spaced points in the s = (x [m], dx/dt [m/s]) state space of the car. The vectors are overlaid on a contour plot of the total energy of the car as a function of its state. The remaining plots (one for each trial) will depict the trajectories the car took in the state space, the force directions it applied, as well as the total energy at each step of the trial.

Alternatively, one could check the jupyter notebook experiments.ipynb or the script experyments.py for example of code usage and for reproduction of the figures in the report.

Notes

Developed as a mini-project for the course CS-434 "Unsupervised and Reinforcement Learning in Neural Networks", Fall 2016, EPFL.

References

  1. Richard S. and Barto, Andrew G. Reinforcement Learning: An Intro- duction. MIT Press, 1998. ISBN 0262193981. URL.

rl-mountain-car's People

Stargazers

 avatar

Watchers

James Cloos avatar Rodrigo C. G. Pena 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.