Skip to content

Commit

Permalink
Merge branch 'main' into multigoal
Browse files Browse the repository at this point in the history
  • Loading branch information
pengzhenghao committed Aug 20, 2024
2 parents abd1c1d + 880fcd0 commit c7ed1ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions metadrive/envs/metadrive_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
out_of_route_done=False,
out_of_road_done=True,
on_continuous_line_done=True,
on_broken_line_done=False,
crash_vehicle_done=True,
crash_object_done=True,
crash_human_done=True,
Expand Down Expand Up @@ -237,6 +238,8 @@ def _is_out_of_road(self, vehicle):
ret = ret or vehicle.out_of_route
elif self.config["on_continuous_line_done"]:
ret = ret or vehicle.on_yellow_continuous_line or vehicle.on_white_continuous_line or vehicle.crash_sidewalk
if self.config["on_broken_line_done"]:
ret = ret or vehicle.on_broken_line
return ret

def reward_function(self, vehicle_id: str):
Expand Down

0 comments on commit c7ed1ee

Please sign in to comment.