Skip to content

Instantly share code, notes, and snippets.

@dwhit
dwhit / pg-pong.py
Last active June 7, 2016 18:43 — forked from karpathy/pg-pong.py
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym.
I've edited the file so that the weights of different episodes are saved. They are
saved in the format:
save-<episode-number>--<running_reward>.p
This way its easy to see what epoch had the most effective weights.
Also, I've made the pickle file store the episode number, and running reward so