Skip to content

Commit

Permalink
fix(builder): fix bug in builder (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
muchvo authored Aug 22, 2023
1 parent f499491 commit 9823134
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions safety_gymnasium/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,7 @@ def step(self, action: np.ndarray) -> tuple[np.ndarray, float, float, bool, bool

if self.render_parameters.mode == 'human':
self.render()

terminateds = {'agent_0': self.terminated, 'agent_1': self.terminated}
truncateds = {'agent_0': self.truncated, 'agent_1': self.truncated}

return self.task.obs(), reward, cost, terminateds, truncateds, info
return self.task.obs(), reward, cost, self.terminated, self.truncated, info

def _reward(self) -> float:
"""Calculate the current rewards.
Expand Down

0 comments on commit 9823134

Please sign in to comment.