Repeat action, and sum reward
(self, action)
| 156 | self._skip = skip |
| 157 | |
| 158 | def step(self, action): |
| 159 | """Repeat action, and sum reward""" |
| 160 | total_reward = 0.0 |
| 161 | for i in range(self._skip): |
| 162 | # Accumulate reward and repeat the same action |
| 163 | obs, reward, done, trunk, info = self.env.step(action) |
| 164 | total_reward += reward |
| 165 | if done: |
| 166 | break |
| 167 | return obs, total_reward, done, trunk, info |
| 168 | |
| 169 | |
| 170 | class GrayScaleObservation(gym.ObservationWrapper): |
no outgoing calls
no test coverage detected