MCPcopy Create free account
hub / github.com/rlcode/reinforcement-learning / __init__

Method __init__

4-atari-hard/env_robustify.py:185–196  ·  view source on GitHub ↗
(self, demo, n_envs, *, move_threshold=0.1, nudge=100, window=None)

Source from the content-addressed store, hash-verified

183 finishes to march max_starting_point backward."""
184
185 def __init__(self, demo, n_envs, *, move_threshold=0.1, nudge=100, window=None):
186 self.n = len(demo["actions"])
187 self.n_envs = n_envs
188 self.move_threshold = move_threshold
189 self.nudge = nudge
190 # window = the span of staggered starting points (atari-reset nrstartsteps).
191 # The move target is move_threshold*window of cumulative success mass.
192 self.window = window or max(n_envs, 32)
193 self.max_starting_point = self.n - 1
194 self.max_max = self.n - 1
195 # latest success-rate per starting-point index
196 self.success = np.zeros(self.n + 1, dtype=np.float64)
197
198 def assign(self, envs):
199 """Stagger envs across a window below max_starting_point."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected