Skip to content

Commit

Permalink
Use internal numpy random for wind index generation to control seed
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasKallehauge committed Mar 8, 2024
1 parent be40220 commit ffe78ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gymnasium/envs/box2d/lunar_lander.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,8 @@ def reset(
)

if self.enable_wind: # Initialize wind pattern based on index
self.wind_idx = np.random.randint(-9999, 9999)
self.torque_idx = np.random.randint(-9999, 9999)
self.wind_idx = self.np_random.integers(-9999, 9999)
self.torque_idx = self.np_random.integers(-9999, 9999)

# Create Lander Legs
self.legs = []
Expand Down

0 comments on commit ffe78ee

Please sign in to comment.