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

Method assign

4-atari-hard/env_robustify.py:198–202  ·  view source on GitHub ↗

Stagger envs across a window below max_starting_point.

(self, envs)

Source from the content-addressed store, hash-verified

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."""
200 per = max(self.window // max(self.n_envs, 1), 1)
201 for i, e in enumerate(envs):
202 e.starting_point = max(self.max_starting_point - i * per, 0)
203
204 def record(self, starting_point, success):
205 # exponential-ish freshening: latest wins (atari-reset keeps last rate)

Callers 2

mainFunction · 0.95
updateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected