p3_collab-compet/ddpg_agent.py
def step(self, state, action, reward, next_state, t_step, done):
        """Save experience in replay memory, and use random sample from buffer to learn."""
        # after each time step, each agent save experience / reward to the memory
        self.memory.add(state, action, reward, next_state, done)
        # Learn every UPDATE_EVERY time steps.
        if (t_step% UPDATE_EVERY == 0) and (len(self.memory) > BATCH_SIZE):
            for i in range(NUM_UPDATES): # update NUM_UPDATES times 
                experiences = self.memory.sample()
                self.learn(experiences, GAMMA)
Save experience in replay memory, and use random sample from buffer to learn.
Save experience in replay memory, and use random sample from buffer to learn.
Save experience in replay memory and use random sample from buffer to learn .
def step(self, state, action, reward, next_state, t_step, done):
        self.memory.add(state, action, reward, next_state, done)
        if (t_step% UPDATE_EVERY == 0) and (len(self.memory) > BATCH_SIZE):
            for i in range(NUM_UPDATES): 
                experiences = self.memory.sample()
                self.learn(experiences, GAMMA)
def step ( self , state , action , reward , next_state , t_step , done ) : self . memory . add ( state , action , reward , next_state , done ) if ( t_step % UPDATE_EVERY == 0 ) and ( len ( self . memory ) > BATCH_SIZE ) : for i in range ( NUM_UPDATES ) : experiences = self . memory . sample ( ) self . learn ( experiences , GAMMA )
Save experience in replay memory, and use random sample from buffer to learn.
Save experience in replay memory and use random sample from buffer to learn .
"""Save experience in replay memory, and use random sample from buffer to learn.""" # after each time step, each agent save experience / reward to the memory # Learn every UPDATE_EVERY time steps. # update NUM_UPDATES times 
self
state
action
reward
next_state
t_step
done