Skip to content

Instantly share code, notes, and snippets.

@kengz
Created September 5, 2018 05:51
Show Gist options
  • Save kengz/4e649866a88378525fd51b7e3ba029d1 to your computer and use it in GitHub Desktop.
Save kengz/4e649866a88378525fd51b7e3ba029d1 to your computer and use it in GitHub Desktop.
def run_episode(self):
self.env.clock.tick('epi')
reward, state, done = self.env.reset()
self.agent.reset(state)
while not done:
self.env.clock.tick('t')
action = self.agent.act(state)
reward, state, done = self.env.step(action)
self.agent.update(action, reward, state, done)
self.agent.body.log_summary()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment