##Overview This is the code for the SF Python meetup group tutorial on reinforcement learning. We will build the game of Pong using Pygame and then build a Deep Q Network using OpenCV and Tensorflow. Then we will train the network to play the game. The DQN is a convolutional neural network that reads in pixel data from the game and the game score.
##Installation
- Install Continuum miniconda (https://conda.io/miniconda.html)
- Run
conda env create - Run
source activate pong
This should install all necessary dependencies in a painless way.
For manual install, here are the required dependencies and links to install them:
- python=2.7
- numpy>=1.7
- opencv>=2.4.8 (http://www.pyimagesearch.com/2015/06/15/install-opencv-3-0-and-python-2-7-on-osx/)
- pygame>=1.9.3 (https://www.pygame.org/download.shtml)
- tensorflow>=1.0.0 (https://www.tensorflow.org/install/)
##Usage Once you've completed the exercises, you can run it like in terminal:
python RL.py
The longer you let it run, the better it will get.
##Solutions Solution code is provided in the solutions folder.
##Credits
Code originally developed by malreddysid, updated by llSourcell. I've adapted it to TF 1.0, Anaconda python and adapted to be used for an exercise.
##References