Agents not smear Dirt

This commit is contained in:
steffen-illium 2021-07-13 17:13:07 +02:00
parent 4841336e31
commit 0161197cd8

View File

@ -281,7 +281,7 @@ class BaseFactory(gym.Env):
else: else:
obs = self._obs_cube obs = self._obs_cube
if self.combin_agent_slices_in_obs and self.n_agents >= 1: if self.combin_agent_slices_in_obs and self.n_agents > 1:
agent_obs = np.sum(obs[[key for key, slice in self._slices.items() if c.AGENT.name in slice.name and agent_obs = np.sum(obs[[key for key, slice in self._slices.items() if c.AGENT.name in slice.name and
(not self.omit_agent_slice_in_obs and slice.name != agent.name)]], (not self.omit_agent_slice_in_obs and slice.name != agent.name)]],
axis=0, keepdims=True) axis=0, keepdims=True)