(self, physics)
Sets the state of the environment at the start of each episode.

    Pole is set to a random angle between [-pi, pi).

    Args:
      physics: An instance of `Physics`.
Sets the state of the environment at the start of each episode.
Sets the state of the environment at the start of each episode .
def initialize_episode(self, physics):
    """Sets the state of the environment at the start of each episode.

    Pole is set to a random angle between [-pi, pi).

    Args:
      physics: An instance of `Physics`.

    """
    physics.named.data.qpos['hinge'] = self.random.uniform(-np.pi, np.pi)
    super().initialize_episode(physics)
def initialize_episode ( self , physics ) : physics . named . data . qpos [ 'hinge' ] = self . random . uniform ( - np . pi , np . pi ) super ( ) . initialize_episode ( physics )