MCPcopy Create free account
hub / github.com/YeWR/EfficientZero / __init__

Method __init__

core/utils.py:62–70  ·  view source on GitHub ↗

Sample initial states by taking random number of no-ops on reset. No-op is assumed to be action 0.

(self, env, noop_max=30)

Source from the content-addressed store, hash-verified

60
61class NoopResetEnv(gym.Wrapper):
62 def __init__(self, env, noop_max=30):
63 """Sample initial states by taking random number of no-ops on reset.
64 No-op is assumed to be action 0.
65 """
66 gym.Wrapper.__init__(self, env)
67 self.noop_max = noop_max
68 self.override_num_noops = None
69 self.noop_action = 0
70 assert env.unwrapped.get_action_meanings()[0] == 'NOOP'
71
72 def reset(self, **kwargs):
73 """ Do no-op action for a number of steps in [1, noop_max]."""

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected