-
Notifications
You must be signed in to change notification settings - Fork 832
Closed
Description
Problem Description
Currently, dqn.py
and other scripts incorrectly set the environment seed to be always 0
Lines 69 to 81 in a1b5b71
def make_env(env_id, seed, idx, capture_video, run_name): | |
def thunk(): | |
env = gym.make(env_id) | |
env = gym.wrappers.RecordEpisodeStatistics(env) | |
if capture_video: | |
if idx == 0: | |
env = gym.wrappers.RecordVideo(env, f"videos/{run_name}") | |
env.seed(seed) | |
env.action_space.seed(seed) | |
env.observation_space.seed(seed) | |
return env | |
return thunk |
Line 135 in a1b5b71
envs = gym.vector.SyncVectorEnv([make_env(args.env_id, 0, 0, args.capture_video, run_name)]) |
The correct implementation should be
envs = gym.vector.SyncVectorEnv([make_env(args.env_id, args.seed, 0, args.capture_video, run_name)])
Metadata
Metadata
Assignees
Labels
No labels