small bugfixes and getting dirty

This commit is contained in:
steffen-illium
2021-05-12 14:52:30 +02:00
parent b16f316f08
commit 14741aa5a5
2 changed files with 16 additions and 10 deletions

@ -110,7 +110,7 @@ class BaseFactory:
return old_pos, valid
def agent_i_position(self, agent_i):
return np.argwhere(self.state[h.AGENT_START_IDX+agent_i] == h.IS_OCCUPIED_CELL)
return tuple(np.argwhere(self.state[h.AGENT_START_IDX+agent_i] == h.IS_OCCUPIED_CELL).flatten())
@property
def free_cells(self) -> np.ndarray: