Created
June 15, 2018 05:11
-
-
Save pyliaorachel/26affd3b6cfbf68e3b2e408b91401358 to your computer and use it in GitHub Desktop.
OpenAI Gym CartPole - Deep Q-Learning (cartpole env)
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
... | |
if not done: | |
reward = 1.0 | |
elif self.steps_beyond_done is None: | |
# Pole just fell! | |
self.steps_beyond_done = 0 | |
reward = 1.0 | |
else: | |
self.steps_beyond_done += 1 | |
reward = 0.0 | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment