Skip to content

Commit

Permalink
Fix death penalty mario
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasAlegre committed Jun 29, 2023
1 parent d98f068 commit 11015b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mo_gymnasium/envs/mario/mario.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ def step(self, action):
if "death" in self.objectives:
vec_reward[obj_idx] = death_r
obj_idx += 1
elif self.death_as_penalty:
vec_reward += death_r # add death reward to all objectives

# 4. coin
coin_r = 0.0
Expand All @@ -182,6 +180,8 @@ def step(self, action):
vec_reward[obj_idx] = enemy_r
obj_idx += 1

if self.death_as_penalty:
vec_reward += death_r # add death reward to all objectives
############################################################################

if self.done_when_dead:
Expand Down

0 comments on commit 11015b1

Please sign in to comment.