This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''Solves Pong with Policy Gradients in Tensorflow.''' | |
# written October 2016 by Sam Greydanus | |
# inspired by karpathy's gist.github.com/karpathy/a4166c7fe253700972fcbc77e4ea32c5 | |
import numpy as np | |
import gym | |
import tensorflow as tf | |
# hyperparameters | |
n_obs = 80 * 80 # dimensionality of observations | |
h = 200 # number of hidden layer neurons |