added fallback action attribute to agents and set standard fallback action to noop

This commit is contained in:
Chanumask
2024-04-29 11:03:59 +02:00
parent 0bbf0dafdb
commit 5ee39eba8d
5 changed files with 16 additions and 5 deletions

View File

@ -12,7 +12,7 @@ if __name__ == '__main__':
render = True
# Path to config File
path = Path('marl_factory_grid/configs/test_config.yaml')
path = Path('marl_factory_grid/configs/simple_crossing.yaml')
# Env Init
factory = Factory(path)
@ -23,8 +23,8 @@ if __name__ == '__main__':
if render:
factory.render()
action_spaces = factory.action_space
agents = [TSPDirtAgent(factory, 0), TSPItemAgent(factory, 1), TSPTargetAgent(factory, 2)]
# agents = [TSPTargetAgent(factory, 0), TSPTargetAgent(factory, 1)]
# agents = [TSPDirtAgent(factory, 0), TSPItemAgent(factory, 1), TSPTargetAgent(factory, 2)]
agents = [TSPTargetAgent(factory, 0), TSPTargetAgent(factory, 1)]
# agents = [TSPTargetAgent(factory, 0)]
while not done:
a = [x.predict() for x in agents]