Created
July 20, 2019 10:34
-
-
Save NMZivkovic/41272b58f9185c39dfe0b09a64b6b9a6 to your computer and use it in GitHub Desktop.
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
def act(self, frame): | |
if np.random.rand() <= self.epsilon: | |
return self.enviroment.action_space.sample() | |
frame = np.expand_dims(np.asarray(frame).astype(np.float64), axis=0) | |
q_values = self.q_network.predict(frame) | |
return np.argmax(q_values[0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment