safemdp.path_to_boolean_matrix(path, graph, S)

Computes a S-like matrix for approaches where performances is based on the trajectory of the agent (e.g. unsafe or random exploration) Parameters ———- path: np.array

Contains the nodes that are visited along the path
graph: networkx.DiGraph
Graph that indicates the dynamics
S: np.array
Array describing the safe set (needed for initialization)

bool_mat: np.array

S-like array that is true for all the states and state-action pairs along the path