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

Method initialize_episode

dm_control/suite/quadruped.py:328–339  ·  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

326 super().__init__(random=random)
327
328 def initialize_episode(self, physics):
329 """Sets the state of the environment at the start of each episode.
330
331 Args:
332 physics: An instance of `Physics`.
333
334 """
335 # Initial configuration.
336 orientation = self.random.randn(4)
337 orientation /= np.linalg.norm(orientation)
338 _find_non_contacting_height(physics, orientation)
339 super().initialize_episode(physics)
340
341 def get_observation(self, physics):
342 """Returns an observation to the agent."""

Callers 2

initialize_episodeMethod · 0.45
initialize_episodeMethod · 0.45

Calls 1

Tested by

no test coverage detected