safemdp.compute_S_hat0(s, world_shape, n_actions, altitudes, step_size, h)

Compute a valid initial safe seed.

s: int or nan
Vector index of the state where we start computing the safe seed from. If it is equal to nan, a state is chosen at random
world_shape: tuple
Size of the grid world (rows, columns)
n_actions: int
Number of actions available to the agent
altitudes: np.array
It contains the flattened n x m matrix where the altitudes of all the points in the map are stored
step_size: tuple
step sizes along each direction to create a linearly spaced grid
h: float
Safety threshold
S_hat: np.array
Boolean array n_states x (n_actions + 1).