Skip to content

Instantly share code, notes, and snippets.

Created Jul 20, 2019
What would you like to do?
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