Comments, small bugfixes removed legacy elements

This commit is contained in:
Steffen Illium
2023-11-17 12:27:03 +01:00
parent fea327861e
commit 467cc3f793
27 changed files with 569 additions and 64 deletions

View File

@ -11,15 +11,33 @@ from marl_factory_grid.environment.entity.object import Object
class PlaceHolder(Object):
def __init__(self, *args, fill_value=0, **kwargs):
"""
TODO
:return:
"""
super().__init__(*args, **kwargs)
self._fill_value = fill_value
@property
def can_collide(self):
def var_can_collide(self):
"""
TODO
:return:
"""
return False
@property
def encoding(self):
"""
TODO
:return:
"""
return self._fill_value
@property
@ -29,14 +47,30 @@ class PlaceHolder(Object):
class GlobalPosition(Object):
@property
def obs_tag(self):
return self.name
@property
def encoding(self):
"""
TODO
:return:
"""
if self._normalized:
return tuple(np.divide(self._bound_entity.pos, self._shape))
else:
return self.bound_entity.pos
def __init__(self, agent, level_shape, *args, normalized: bool = True, **kwargs):
"""
TODO
:return:
"""
super(GlobalPosition, self).__init__(*args, **kwargs)
self.bind_to(agent)
self._normalized = normalized