Skip to content

Commit

Permalink
fix: Fix seeding for gym v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
strakam committed Oct 12, 2024
1 parent 26a4747 commit c283488
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions generals/envs/gymnasium_generals.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ def reset(
) -> tuple[Observation, dict[str, Any]]:
if options is None:
options = {}
if seed is None:
seed = self.np_random_seed
super().reset(seed=seed)
if "grid" in options:
grid = self.grid_factory.grid_from_string(options["grid"])
Expand Down

0 comments on commit c283488

Please sign in to comment.