states_to_nodes¶
-
safemdp.
states_to_nodes
(states, world_shape, step_size)¶ Convert physical states to node numbers.
Parameters: states: np.array
States with physical coordinates
world_shape: tuple
The size of the grid_world
step_size: tuple
The step size of the grid world
Returns: nodes: np.array
The node indices corresponding to the states