We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebc397f commit 9090d25Copy full SHA for 9090d25
vmas/scenarios/joint_passage_size.py
@@ -1,4 +1,4 @@
1
-# Copyright (c) 2022-2024.
+# Copyright (c) 2022-2025.
2
# ProrokLab (https://www.proroklab.org/)
3
# All rights reserved.
4
import math
@@ -453,11 +453,10 @@ def reward(self, agent: Agent):
453
self.world.get_distance(a, passage)
454
<= self.min_collision_distance
455
] += 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
+ for wall in self.walls:
+ self.collision_rew[
+ self.world.get_distance(a, wall) <= self.min_collision_distance
+ ] += self.collision_reward
461
462
# Energy reward
463
if self.energy_reward_coeff != 0:
0 commit comments