diff --git a/marl_factory_grid/testing/test_config.yaml b/marl_factory_grid/configs/test_config.yaml similarity index 100% rename from marl_factory_grid/testing/test_config.yaml rename to marl_factory_grid/configs/test_config.yaml diff --git a/marl_factory_grid/modules/destinations/rules.py b/marl_factory_grid/modules/destinations/rules.py index 4559e46..af1f97d 100644 --- a/marl_factory_grid/modules/destinations/rules.py +++ b/marl_factory_grid/modules/destinations/rules.py @@ -152,7 +152,7 @@ class SpawnDestinationOnAgent(Rule): """ super().__init__() - def on_reset(self, state: Gamestate): + def on_reset(self, state): state.print("Spawn Desitnations") for agent in state[c.AGENT]: destination = Destination(agent.pos, bind_to=agent) diff --git a/marl_factory_grid/utils/config_parser.py b/marl_factory_grid/utils/config_parser.py index ecedd51..68568be 100644 --- a/marl_factory_grid/utils/config_parser.py +++ b/marl_factory_grid/utils/config_parser.py @@ -152,9 +152,12 @@ class FactoryConfigParser(object): except AttributeError: class_or_classes = locate_and_import_class(action, self.custom_modules_path) try: + # print(action) parsed_actions.extend(class_or_classes) + # print(parsed_actions) for actions_class in class_or_classes: - conf_kwargs[actions_class.__name__] = conf_kwargs[action] + # break + conf_kwargs[actions_class.__name__] = conf_kwargs.get(action, {}) except TypeError: parsed_actions.append(class_or_classes) diff --git a/random_testrun.py b/random_testrun.py index 919a60c..adfb41a 100644 --- a/random_testrun.py +++ b/random_testrun.py @@ -14,7 +14,7 @@ if __name__ == '__main__': # Render at each step? render = False # Reveal all possible Modules (Entities, Rules, Agents[Actions, Observations], etc.) - explain_config = True + explain_config = False # Collect statistics? monitor = True # Record as Protobuf? @@ -29,7 +29,7 @@ if __name__ == '__main__': ce.save_all(run_path / 'all_available_configs.yaml') # Path to config File - path = Path('marl_factory_grid/configs/eight_puzzle.yaml') + path = Path('marl_factory_grid/configs/default_config.yaml') # Env Init factory = Factory(path) diff --git a/marl_factory_grid/testing/test_run.py b/test_run.py similarity index 93% rename from marl_factory_grid/testing/test_run.py rename to test_run.py index 91f7770..9d1f07e 100644 --- a/marl_factory_grid/testing/test_run.py +++ b/test_run.py @@ -11,7 +11,7 @@ if __name__ == '__main__': render = True # Path to config File - path = Path('test_config.yaml') + path = Path('marl_factory_grid/configs/test_config.yaml') # Env Init factory = Factory(path)