Instantly share code, notes, and snippets.
- Vana
sebasibarguen /rl_pong.py
CreatedMay 17, 2018 03:54 — forked fromgreydanus/rl_pong.py
Solves Pong with Policy Gradients in Tensorflow. This file contains hidden or 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 | |
importnumpyasnp | |
importgym | |
importtensorflowastf | |
# hyperparameters | |
n_obs=80*80# dimensionality of observations | |
h=200# number of hidden layer neurons |
This file contains hidden or 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
body { | |
background-color: white; | |
} | |
h1, h2 { | |
color: black; | |
} | |
.lesson { | |
padding: 10px; | |
margin: 10px; |
sebasibarguen /gist:6040393
CreatedJuly 19, 2013 16:13
This file contains hidden or 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
fromgoogle.appengine.extimportndb | |
form=generate_form(MyModel) | |
>>>printform | |
[ {'Email' :'<input type="text" name="email">'} ] |