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._reset_buffer()
self.ale.reset_game()
// Perform up to 30 random no-ops before starting
for _ in range(random.randrange(30)):
self.ale.act(0) // Assumes raw action 0 is always no-op
if self.ale.game_over():
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)
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: estnltk/estnltk
Commit Name: fc3054e38f307f1ca20e04e156b0023ef2008866
Time: 2015-06-08
Author: komasing@gmail.com
File Name: estnltk/wordnet/wn.py
Class Name:
Method Name: all_synsets
Project Name: AllenCellModeling/pytorch_fnet
Commit Name: c120b5efac802ea97a28d674664073f022dddad7
Time: 2018-01-30
Author: chek.o@outlook.com
File Name: fnet/transforms.py
Class Name: Cropper
Method Name: _adjust_shape_crop