Skip to content

Instantly share code, notes, and snippets.

@pythonlessons
Created November 26, 2019 14:50
Show Gist options
  • Save pythonlessons/76e26cc89ebf16fa624f9e39943693dd to your computer and use it in GitHub Desktop.
Save pythonlessons/76e26cc89ebf16fa624f9e39943693dd to your computer and use it in GitHub Desktop.
1_Cartpole_DQN_remember_fucntion.py
def remember(self, state, action, reward, next_state, done):
self.memory.append((state, action, reward, next_state, done))
if len(self.memory) > self.train_start:
if self.epsilon > self.epsilon_min:
self.epsilon *= self.epsilon_decay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment