mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-07-05 09:01:36 +02:00
fixed globalpos and 2rooms1door destination spawning
This commit is contained in:
@ -9,10 +9,10 @@ from marl_factory_grid.environment.factory import Factory
|
||||
|
||||
if __name__ == '__main__':
|
||||
# Render at each step?
|
||||
render = False
|
||||
render = True
|
||||
|
||||
# Path to config File
|
||||
path = Path('marl_factory_grid/configs/test_config.yaml')
|
||||
path = Path('marl_factory_grid/configs/two_rooms_one_door.yaml')
|
||||
|
||||
# Env Init
|
||||
factory = Factory(path)
|
||||
@ -23,7 +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 = [TSPDirtAgent(factory, 0), TSPItemAgent(factory, 1), TSPTargetAgent(factory, 2)]
|
||||
agents = [TSPTargetAgent(factory, 0), TSPTargetAgent(factory, 1)]
|
||||
while not done:
|
||||
a = [x.predict() for x in agents]
|
||||
obs_type, _, _, done, info = factory.step(a)
|
||||
|
Reference in New Issue
Block a user