@lab_api
def update(self, state, action, reward, next_state, done):
"""Interface method to update memory"""
if np.isnan(reward): // start of episode
self.epi_reset(next_state)
else:
self.add_experience(state, action, reward, next_state, done)
After Change
@lab_api
def update(self, state, action, reward, next_state, done):
"""Interface method to update memory"""
if not self.body.env.is_venv and np.isnan(reward): // start of episode (venv is not episodic)
self.epi_reset(next_state)
else:
self.add_experience(state, action, reward, next_state, done)