This commit is contained in:
Chanumask 2023-12-01 11:51:15 +01:00
parent ab9fb8cd08
commit 24221f90d1
5 changed files with 8 additions and 5 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)