def make_mujoco_env(env_id, seed, reward_scale=<NUM_LIT:1.0>):
rank = MPI.COMM_WORLD.Get_rank()<EOL>myseed = seed  + <NUM_LIT:1000> * rank if seed is not None else None<EOL>set_global_seeds(myseed)<EOL>env = gym.make(env_id)<EOL>logger_path = None if logger.get_dir() is None else os.path.join(logger.get_dir(), str(rank))<EOL>env = Monitor(env, logger_path, allow_early_resets=True)<EOL>env.seed(seed)<EOL>if reward_scale != <NUM_LIT:1.0>:<EOL><INDENT>from baselines.common.retro_wrappers import RewardScaler<EOL>env = RewardScaler(env, reward_scale)<EOL><DEDENT>return env<EOL>
Create a wrapped, monitored gym.Env for MuJoCo.