16e9d8fe38d7d3b7edaf20fb5fd3413e7f865c93,slm_lab/agent/memory/replay.py,Replay,update,#Replay#Any#Any#Any#Any#,51

Before Change



    def update(self, action, reward, state, done):
        """interface method to update memory"""
        self.add_experience(self.last_state, action, reward, state, done)
        self.last_state = state

    def add_experience(self, state, action, reward, next_state, done, priority=1):
        """Implementation for update() to add experience to memory, expanding the memory size if necessary"""

After Change



    def update(self, action, reward, state, done):
        """Interface method to update memory"""
        if not np.isnan(reward):
            self.add_experience(self.last_state, action, reward, state, done)
        self.last_state = state

    def add_experience(self, state, action, reward, next_state, done, priority=1):
        """Implementation for update() to add experience to memory, expanding the memory size if necessary"""
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: kengz/SLM-Lab
Commit Name: 16e9d8fe38d7d3b7edaf20fb5fd3413e7f865c93
Time: 2017-12-27
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: e057512b1dd0ba6ca1b776e2e758c28e8ef937d8
Time: 2019-05-01
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: d670e94d3f8e938858e938b1d3efeac5389a26d3
Time: 2017-12-17
Author: lgraesser@users.noreply.github.com
File Name: slm_lab/agent/memory/replay.py
Class Name: Replay
Method Name: update