Factory is now Battery Powered

This commit is contained in:
Steffen Illium
2021-11-11 18:42:48 +01:00
parent f9c05dc3bf
commit fcb765f447
11 changed files with 352 additions and 16 deletions

View File

@ -405,7 +405,7 @@ class BaseFactory(gym.Env):
y0, y1 = max(0, agent.y - r), min(agent.y + r + 1, self._level_shape[1])
# Other Agent Obs = oobs
oobs = obs_to_be_padded[:, x0:x1, y0:y1]
if oobs.shape[0:] != (d,) * 2:
if oobs.shape[0:] != (d, d):
if xd := oobs.shape[1] % d:
if agent.x > r:
x0_pad = 0

View File

@ -32,7 +32,9 @@ class Object:
else:
return self._name
def __init__(self, str_ident: Union[str, None] = None, enum_ident: Union[Enum, None] = None, is_blocking_light=False, **kwargs):
def __init__(self, str_ident: Union[str, None] = None, enum_ident: Union[Enum, None] = None,
is_blocking_light=False, **kwargs):
self._str_ident = str_ident
self._enum_ident = enum_ident