Skip to content

Instantly share code, notes, and snippets.

@d0znpp
Created December 12, 2017 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d0znpp/ca7fc8a25e1c8d23746bcb78e5277567 to your computer and use it in GitHub Desktop.
Save d0znpp/ca7fc8a25e1c8d23746bcb78e5277567 to your computer and use it in GitHub Desktop.
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