flatland.envs.rail_env_policies module#
- class flatland.envs.rail_env_policies.ShortestPathPolicy[source]#
Bases:
RailEnvPolicy
[RailEnv
,RailEnv
,RailEnvActions
]- act_many(handles: List[int], observations: List[RailEnv], **kwargs)[source]#
Get action_dict for all agents. Default implementation calls act() for each handle in the list.
Override if you need to initialize before / cleanup after calling act() for individual agents.
Parameters#
- handles: List[int]
the agents’ handles
- observations: List[Any]
the agents’ observations
- kwargs
forward compatibility placeholder
Returns#
- Dict[int, Any]
the action dict