Giter Site home page Giter Site logo

r1j1t / reinforcement_learning_project Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 0.0 29.42 MB

Reinforcement learning implementation for 2 very popular games namely Pong and cartpole via Deep Q learning and Policy gradient

Python 100.00%
reinforcement-learning policy-gradient q-learning openai-gym pong cartpole-v1 keras

reinforcement_learning_project's Introduction

Reinforcement_Learning_project

This repository holds our Reinforcement learning implementation for 2 very popular games namely Pong and cartpole. We have used Keras for model building. Two different types of algorithms are used to play the game, the first is Deep Q learning and second was Policy gradient. They both have there advantages and disadvantages. You can read more about them on wikipedia or research papers (preferred option).

All the algorithms were trained on 8 GB Nvdia GeForce GTX 1080 GPU. The results shown below do mention the training time as well. To differentiate the two algorithms we have used the following conventions.

  • Game_DQN = implementation of "Game" by Deep Q-learning. This implementation is based on the famous paper on Deep Q learning published in Nature.

  • Game_PG = implementation of "Game" by policy gradient. This code is based on Andrej Karpathy blog on policy gradient.

Results for cartpole

Model training took less than 5 mins on GPU

Trained model for Pong

These results were achieved after 6-7 hrs of Training on GPU

Dependencies:

  • Keras (2.1.5+)
  • OpenAI Gym (0.10.3)
  • Python (3.5+)

Further Reading

  1. Reinforcement Learning: An Introduction by Richard S. Sutton and Andrew G. Barto
  2. Andrej Karpathy blog on policy gradient
  3. Deep Q learning paper

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.