mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-06-20 03:08:08 +02:00
Refactoring of Collision checking bug fixes
This commit is contained in:
@ -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 '
|
||||
|
Reference in New Issue
Block a user