d6cf4323de0ecc9c04c1b6b5ad9b28deb2161b31,slm_lab/agent/memory/onpolicy.py,OnPolicyReplay,update,#OnPolicyReplay#Any#Any#Any#Any#Any#,64

Before Change


    @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)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: kengz/SLM-Lab
Commit Name: d6cf4323de0ecc9c04c1b6b5ad9b28deb2161b31
Time: 2019-04-24
Author: kengzwl@gmail.com
File Name: slm_lab/agent/memory/onpolicy.py
Class Name: OnPolicyReplay
Method Name: update


Project Name: kengz/SLM-Lab
Commit Name: d6cf4323de0ecc9c04c1b6b5ad9b28deb2161b31
Time: 2019-04-24
Author: kengzwl@gmail.com
File Name: slm_lab/agent/memory/replay.py
Class Name: Replay
Method Name: update


Project Name: kengz/SLM-Lab
Commit Name: d6cf4323de0ecc9c04c1b6b5ad9b28deb2161b31
Time: 2019-04-24
Author: kengzwl@gmail.com
File Name: slm_lab/agent/memory/onpolicy.py
Class Name: OnPolicyConcatReplay
Method Name: update