diff --git a/smac/env/starcraft2/starcraft2.py b/smac/env/starcraft2/starcraft2.py index aadabed7..656bc96e 100644 --- a/smac/env/starcraft2/starcraft2.py +++ b/smac/env/starcraft2/starcraft2.py @@ -822,7 +822,7 @@ def reward_battle(self): delta_enemy += prev_health - e_unit.health - e_unit.shield if self.reward_only_positive: - reward = abs(delta_enemy + delta_deaths) # shield regeneration + reward = max(0, delta_enemy + delta_deaths) # shield regeneration else: reward = delta_enemy + delta_deaths - delta_ally