(self, act)
| 146 | pass # visualization for this env is through the viz= argument when creating the player |
| 147 | |
| 148 | def step(self, act): |
| 149 | oldlives = self.ale.lives() |
| 150 | r = 0 |
| 151 | for k in range(self.frame_skip): |
| 152 | if k == self.frame_skip - 1: |
| 153 | self.last_raw_screen = self._grab_raw_image() |
| 154 | r += self.ale.act(self.actions[act]) |
| 155 | newlives = self.ale.lives() |
| 156 | if self.ale.game_over() or \ |
| 157 | (self.live_lost_as_eoe and newlives < oldlives): |
| 158 | break |
| 159 | |
| 160 | isOver = self.ale.game_over() |
| 161 | if self.live_lost_as_eoe: |
| 162 | isOver = isOver or newlives < oldlives |
| 163 | |
| 164 | info = {'ale.lives': newlives} |
| 165 | return self._current_state(), r, isOver, info |
| 166 | |
| 167 | |
| 168 | if __name__ == '__main__': |
no test coverage detected