Skip to content

Commit 17a4f67

Browse files
[Gym] Added no_graphics argument (#1997)
> Added the no_graphics argument to the gym interface. #1413
1 parent f736fed commit 17a4f67

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gym-unity/gym_unity/envs/unity_env.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def __init__(
3333
uint8_visual=False,
3434
multiagent=False,
3535
flatten_branched=False,
36+
no_graphics=False
3637
):
3738
"""
3839
Environment initialization
@@ -42,8 +43,9 @@ def __init__(
4243
:param uint8_visual: Return visual observations as uint8 (0-255) matrices instead of float (0.0-1.0).
4344
:param multiagent: Whether to run in multi-agent mode (lists of obs, reward, done).
4445
:param flatten_branched: If True, turn branched discrete action spaces into a Discrete space rather than MultiDiscrete.
46+
:param no_graphics: Whether to run the Unity simulator in no-graphics mode
4547
"""
46-
self._env = UnityEnvironment(environment_filename, worker_id)
48+
self._env = UnityEnvironment(environment_filename, worker_id, no_graphics=no_graphics)
4749
self.name = self._env.academy_name
4850
self.visual_obs = None
4951
self._current_state = None

0 commit comments

Comments
 (0)