Fixed agent observation and inventory init

This commit is contained in:
Steffen Illium
2023-11-20 14:59:37 +01:00
parent 467cc3f793
commit 604c0c6f57
8 changed files with 89 additions and 7 deletions

View File

@ -5,6 +5,12 @@ from marl_factory_grid.environment.groups.collection import Collection
class Agents(Collection):
_entity = Agent
@property
def obs_pairs(self):
pair_list = [(self.name, self)]
pair_list.extend([(a.name, a) for a in self])
return pair_list
@property
def spawn_rule(self):
return {}