mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-07-05 09:01:36 +02:00
added itemagent test
This commit is contained in:
@ -4,6 +4,7 @@ from random import randint
|
||||
from tqdm import trange
|
||||
|
||||
from marl_factory_grid.algorithms.static.TSP_dirt_agent import TSPDirtAgent
|
||||
from marl_factory_grid.algorithms.static.TSP_item_agent import TSPItemAgent
|
||||
from marl_factory_grid.environment.factory import Factory
|
||||
|
||||
if __name__ == '__main__':
|
||||
@ -22,7 +23,7 @@ if __name__ == '__main__':
|
||||
if render:
|
||||
factory.render()
|
||||
action_spaces = factory.action_space
|
||||
agents = [TSPDirtAgent(factory, 0)]
|
||||
agents = [TSPDirtAgent(factory, 0), TSPItemAgent(factory, 1)]
|
||||
while not done:
|
||||
a = [randint(0, x.n - 1) for x in action_spaces]
|
||||
obs_type, _, _, done, info = factory.step(a)
|
||||
|
Reference in New Issue
Block a user