/Reinforcement_Learning_project

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

Primary LanguagePython

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