Sets the state of the environment at the start of each episode. Args: physics: An instance of `Physics`.
(self, physics)
| 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.""" |
no test coverage detected