Skip to content

Commit 40d3770

Browse files
authored
Update clean_rl_pqn_example.py
1 parent 70e2c0d commit 40d3770

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

examples/clean_rl_pqn_example.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,15 @@
2121

2222
@dataclass
2323
class Args:
24-
viz: bool = False
25-
"""Whether the exported Godot environment will displayed during training"""
2624
env_path: str = None
2725
"""Path to the Godot exported environment"""
26+
n_parallel: int = 1
27+
"""How many instances of the environment executable to
28+
launch (requires --env_path to be set if > 1)."""
29+
viz: bool = False
30+
"""Whether the exported Godot environment will displayed during training"""
31+
speedup: int = 8
32+
"""How much to speed up the environment"""
2833
exp_name: str = os.path.basename(__file__)[: -len(".py")]
2934
"""the name of this experiment"""
3035
seed: int = 1
@@ -116,9 +121,12 @@ def linear_schedule(start_e: float, end_e: float, duration: int, t: int):
116121

117122
# env setup
118123
envs = env = CleanRLGodotEnv(
119-
env_path=args.env_path # , show_window=args.viz, speedup=args.speedup, seed=args.seed, n_parallel=args.n_parallel,
124+
env_path=args.env_path,
125+
show_window=args.viz,
126+
speedup=args.speedup,
127+
seed=args.seed,
128+
n_parallel=args.n_parallel,
120129
)
121-
print(envs.single_action_space)
122130
assert isinstance(envs.single_action_space, gym.spaces.Discrete), "only discrete action space is supported"
123131

124132
args.num_envs = envs.num_envs

0 commit comments

Comments
 (0)