Пример #1
0
 def __init__(self, config) -> None:
     super().__init__(config)
     self._config = config if config is not None else {}
     self._builder = ConflictPriorityShortestPathObservationBuilder(
         predictor=get_predictor(config=config),
         encode_one_hot=True,
         asserts=self._config.get("asserts", False))
Пример #2
0
 def __init__(self, config) -> None:
     super().__init__(config)
     self._builder = FixedTreeObsWrapper(
         TreeObsForRailEnv(max_depth=config['max_depth'],
                           predictor=get_predictor(config=config)),
         small_tree=config.get('small_tree', None),
         search_strategy=config.get('search_strategy', 'dfs'))
Пример #3
0
 def __init__(self, config) -> None:
     super().__init__(config)
     self._builder = PriorityTreeObsWrapper(
         PriorityTreeObs(max_depth=config['max_depth'],
                         predictor=get_predictor(config=config),
                         use_priority=True),
         config.get('normalize_fixed', 100),
     )
Пример #4
0
 def __init__(self, config) -> None:
     super().__init__(config)
     self._concat_agent_id = config.get('concat_agent_id', False)
     self._concat_status = config.get('concat_status', False)
     self._num_agents = config.get('num_agents', 5)
     self._builder = TreeObsForRailEnvRLLibWrapper(
         DoneRemovedTreeObsForRailEnv(
             max_depth=config['max_depth'],
             predictor=get_predictor(config=config)),
         config.get('normalize_fixed', None), self._concat_agent_id,
         self._concat_status, self._num_agents)
Пример #5
0
 def __init__(self, config) -> None:
     super().__init__(config)
     self._builder = PriorityFixedTreeObsWrapper(
         PriorityTreeObs(max_depth=config['max_depth'],
                         predictor=get_predictor(config=config)),
         search_strategy=config.get('search_strategy', 'dfs'))