mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-11-02 21:47:25 +01:00
Fixed agent observation and inventory init
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from .actions import CleanUp
|
||||
from .actions import Clean
|
||||
from .entitites import DirtPile
|
||||
from .groups import DirtPiles
|
||||
from .rules import EntitiesSmearDirtOnMove, DoneOnAllDirtCleaned
|
||||
|
||||
@@ -8,7 +8,7 @@ from marl_factory_grid.modules.clean_up import constants as d, rewards as r
|
||||
from marl_factory_grid.environment import constants as c
|
||||
|
||||
|
||||
class CleanUp(Action):
|
||||
class Clean(Action):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(d.CLEAN_UP, r.CLEAN_UP_VALID, r.CLEAN_UP_FAIL)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user