Created
December 12, 2017 00:45
-
-
Save d0znpp/ca7fc8a25e1c8d23746bcb78e5277567 to your computer and use it in GitHub Desktop.
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
def get_action(self, state): | |
return self.sess.run(self.predicted_action, {self.states: state}) | |
if random.random() < self.exploration: | |
return np.array([[random.sample(range(1, 35), 4*self.max_layers)]]) | |
else: | |
return self.sess.run(self.predicted_action, {self.states: state}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment