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

@ -51,6 +51,10 @@ class Inventory(IsBoundMixin, Collection):
def obs_tag(self):
return self.name
@property
def name(self):
return f'{self.__class__.__name__}[{self._bound_entity.name}]'
def __init__(self, agent: Agent, *args, **kwargs):
super(Inventory, self).__init__(*args, **kwargs)
self._collection = None