5ec418e8146079d6797bb15b0f5e777862815df6,env.py,Env,reset,#Env#,54

Before Change


  def reset(self):
    observation = self._reset()
    // Press fire (raw action 1) to reset game if needed
    if 1 in self.actions.keys():
      observation, _, done = self.step(1)
      if done:
        self._reset()
      observation, _, done = self.step(2)
      if done:
        self._reset()
    return observation
 
  def step(self, action):
    // Repeat action 4 times, max pool over last 2 frames

After Change


          self.ale.reset_game()
    // Process and return "initial" state
    observation = self._get_state()
    self.state_buffer.append(observation)
    self.lives = self.ale.lives()
    return torch.stack(list(self.state_buffer), 0)

  def step(self, action):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: Kaixhin/Rainbow
Commit Name: 5ec418e8146079d6797bb15b0f5e777862815df6
Time: 2018-05-07
Author: design@kaixhin.com
File Name: env.py
Class Name: Env
Method Name: reset


Project Name: pantsbuild/pants
Commit Name: 14759e1065e307c7760299670da30f64ffdbf783
Time: 2016-08-27
Author: stuhood@gmail.com
File Name: src/python/pants/engine/engine.py
Class Name: LocalMultiprocessEngine
Method Name: _submit_until


Project Name: pantsbuild/pants
Commit Name: 14759e1065e307c7760299670da30f64ffdbf783
Time: 2016-08-27
Author: stuhood@gmail.com
File Name: src/python/pants/engine/engine.py
Class Name: ThreadHybridEngine
Method Name: _submit_until