src/seals/diagnostics/proc_goal.py
def initial_state(self) -> np.ndarray:
        """Samples random agent position and random goal."""
        pos = self.rand_state.randint(low=-self._bounds, high=self._bounds, size=(2,))

        x_dist = self.rand_state.randint(self._distance)
        y_dist = self._distance - x_dist
        random_signs = 2 * self.rand_state.randint(2, size=2) - 1
        goal = pos + random_signs * (x_dist, y_dist)

        return np.concatenate([pos, goal]).astype(self.observation_space.dtype)
Samples random agent position and random goal.
Samples random agent position and random goal.
Samples random agent position and random goal .
def initial_state(self) -> np.ndarray:
        pos = self.rand_state.randint(low=-self._bounds, high=self._bounds, size=(2,))
        x_dist = self.rand_state.randint(self._distance)
        y_dist = self._distance - x_dist
        random_signs = 2 * self.rand_state.randint(2, size=2) - 1
        goal = pos + random_signs * (x_dist, y_dist)
        return np.concatenate([pos, goal]).astype(self.observation_space.dtype)
def initial_state ( self ) -> np . ndarray : pos = self . rand_state . randint ( low = - self . _bounds , high = self . _bounds , size = ( 2 , ) ) x_dist = self . rand_state . randint ( self . _distance ) y_dist = self . _distance - x_dist random_signs = 2 * self . rand_state . randint ( 2 , size = 2 ) - 1 goal = pos + random_signs * ( x_dist , y_dist ) return np . concatenate ( [ pos , goal ] ) . astype ( self . observation_space . dtype )
Samples random agent position and random goal.
Samples random agent position and random goal .
"""Samples random agent position and random goal."""
self