mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-05-23 07:16:44 +02:00
fixes
This commit is contained in:
parent
ab9fb8cd08
commit
24221f90d1
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)
|
Loading…
x
Reference in New Issue
Block a user