Code used to obtain these results can be found at the url https://github.com/lusob/DQN_TensorFlow_OpenAI_Gym
I used TensorFlow for network training and a double deep Q network with memory replay algorithm to optimize a 4 layers neural network.
Intall dependencies
sudo apt-get -y -qq install python-pip python-dev libopencv-dev python-opencv python-scipy python-numpy python-pygame build-essential cmake zlib1g-dev libjpeg-dev libboost-all-dev gcc
Install OpenAI Gym with atari env
pip install gym[atari]
Install TensorFlow
TensorFlow CPU version
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl
Or uncommented below line to install TensorFlow GPU version
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl
Clone this project
git clone https://github.com/lusob/DQN_TensorFlow_OpenAI_Gym ~/DQN_TF_OpenAI
Start training
python main_multithread_openai.py -visualize n -network_type nature
To eval and record on video a trained model
python main_multithread_openai.py -visualize n -record_eval y -only_eval y -weight ckpt/your_trained_model
You can also set -visualize y to enable video rendering, but it will be slow.