Skip to content

Commit 9090d25

Browse files
committed
fix
1 parent ebc397f commit 9090d25

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

vmas/scenarios/joint_passage_size.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2022-2024.
1+
# Copyright (c) 2022-2025.
22
# ProrokLab (https://www.proroklab.org/)
33
# All rights reserved.
44
import math
@@ -453,11 +453,10 @@ def reward(self, agent: Agent):
453453
self.world.get_distance(a, passage)
454454
<= self.min_collision_distance
455455
] += self.collision_reward
456-
for wall in self.walls:
457-
self.collision_rew[
458-
self.world.get_distance(a, wall)
459-
<= self.min_collision_distance
460-
] += self.collision_reward
456+
for wall in self.walls:
457+
self.collision_rew[
458+
self.world.get_distance(a, wall) <= self.min_collision_distance
459+
] += self.collision_reward
461460

462461
# Energy reward
463462
if self.energy_reward_coeff != 0:

0 commit comments

Comments
 (0)