flatland.action_plan.action_plan_player module

class flatland.action_plan.action_plan_player.ControllerFromTrainrunsReplayer[source]

Bases: object

Allows to verify a DeterministicController by replaying it against a FLATland env without malfunction.

static replay_verify(ctl:flatland.action_plan.action_plan.ControllerFromTrainruns, env:flatland.envs.rail_env.RailEnv, call_back:Callable[[flatland.envs.rail_env.RailEnv], NoneType]=<function ControllerFromTrainrunsReplayer.<lambda> at 0x7f2d20eedd90>)[source]

Replays this deterministic ActionPlan and verifies whether it is feasible.

Parameters:
ctl
env
call_back

Called before/after each step() call. The env is passed to it.