Refactoring of Collision checking bug fixes

This commit is contained in:
steffen-illium
2021-05-12 12:08:19 +02:00
parent c539e5dddd
commit 51d79d8ab3
3 changed files with 39 additions and 19 deletions

View File

@ -30,7 +30,7 @@ class GettingDirty(BaseFactory):
self.state = np.concatenate((self.state, dirt_slice)) # dirt is now the last slice
self.spawn_dirt()
def step_core(self, collisions_vecs, actions, r):
def calculate_reward(self, collisions_vecs, actions, r):
for agent_i, cols in enumerate(collisions_vecs):
cols = np.argwhere(cols != 0).flatten()
print(f't = {self.steps}\tAgent {agent_i} has collisions with '