Skip to content

Commit

Permalink
Fix so that flatten works
Browse files Browse the repository at this point in the history
  • Loading branch information
bpiwowar committed Nov 20, 2023
1 parent ae9506d commit 60a8c81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pystk2_gymnasium/envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def reset_race(
self.current_track = self.default_track
if self.current_track is None:
self.current_track = self.TRACKS[random.randint(0, len(self.TRACKS))]
logging.info("Selected %s", self.current_track)
logging.debug("Selected %s", self.current_track)
self.config = pystk2.RaceConfig(
num_kart=self.num_kart,
seed=random.randint(2**16),
Expand Down
3 changes: 2 additions & 1 deletion src/pystk2_gymnasium/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def __init__(self, space: gym.Space):
highs = []
counts = []

for key, value in space.items():
# Combine keys (sort them before hand)
for key, value in sorted(space.items(), key=lambda x: x[0]):
# Ignore the AI action
if key == "action":
continue
Expand Down

0 comments on commit 60a8c81

Please sign in to comment.