MCPcopy Index your code
hub / github.com/pytorch/tutorials / step

Method step

intermediate_source/mario_rl_tutorial.py:158–167  ·  view source on GitHub ↗

Repeat action, and sum reward

(self, action)

Source from the content-addressed store, hash-verified

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
170class GrayScaleObservation(gym.ObservationWrapper):

Callers 15

fnFunction · 0.80
foreach_map.pyFile · 0.80
train_modelFunction · 0.80
profiler_recipe.pyFile · 0.80
amp_recipe.pyFile · 0.80
train_func_per_workerFunction · 0.80
trainFunction · 0.80
run_training_acFunction · 0.80
run_training_cleanFunction · 0.80
run_training_with_bugFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected