Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created July 7, 2019 12:22
Show Gist options
  • Save NMZivkovic/277953a473c9c8479503bed00189598a to your computer and use it in GitHub Desktop.
Save NMZivkovic/277953a473c9c8479503bed00189598a to your computer and use it in GitHub Desktop.
def act(self, state):
if np.random.rand() <= self.epsilon:
return enviroment.action_space.sample()
q_values = self.q_network.predict(state)
return np.argmax(q_values[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment