MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / initialize_episode

Method initialize_episode

dm_control/suite/humanoid.py:152–166  ·  view source on GitHub ↗

Sets the state of the environment at the start of each episode. Args: physics: An instance of `Physics`.

(self, physics)

Source from the content-addressed store, hash-verified

150 super().__init__(random=random)
151
152 def initialize_episode(self, physics):
153 """Sets the state of the environment at the start of each episode.
154
155 Args:
156 physics: An instance of `Physics`.
157
158 """
159 # Find a collision-free random initial configuration.
160 penetrating = True
161 while penetrating:
162 randomizers.randomize_limited_and_rotational_joints(physics, self.random)
163 # Check for collisions.
164 physics.after_reset()
165 penetrating = physics.data.ncon > 0
166 super().initialize_episode(physics)
167
168 def get_observation(self, physics):
169 """Returns either the pure state or a set of egocentric features."""

Callers

nothing calls this directly

Calls 1

after_resetMethod · 0.45

Tested by

no test coverage detected