Skip to content

Commit

Permalink
Rename info entry
Browse files Browse the repository at this point in the history
  • Loading branch information
RedTachyon committed Dec 5, 2023
1 parent ad3b1a3 commit 795508b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gymnasium/envs/box2d/car_racing.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,11 +567,11 @@ def step(self, action: Union[np.ndarray, int]):
if self.tile_visited_count == len(self.track) or self.new_lap:
# Termination due to finishing lap
terminated = True
info["finished"] = True
info["lap_finished"] = True
x, y = self.car.hull.position
if abs(x) > PLAYFIELD or abs(y) > PLAYFIELD:
terminated = True
info["finished"] = False
info["lap_finished"] = False
step_reward = -100

if self.render_mode == "human":
Expand Down

0 comments on commit 795508b

Please sign in to comment.