From 10cab4661c27d6570e5057a60e5c2a8389297c91 Mon Sep 17 00:00:00 2001 From: vincentpierre Date: Mon, 29 Apr 2019 16:08:16 -0700 Subject: [PATCH] [Gym] Added no_graphics argument > Added the no_graphics argument to the gym interface. #1413 --- gym-unity/gym_unity/envs/unity_env.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gym-unity/gym_unity/envs/unity_env.py b/gym-unity/gym_unity/envs/unity_env.py index 72209209c4..2a6ed778b0 100755 --- a/gym-unity/gym_unity/envs/unity_env.py +++ b/gym-unity/gym_unity/envs/unity_env.py @@ -33,6 +33,7 @@ def __init__( uint8_visual=False, multiagent=False, flatten_branched=False, + no_graphics=False ): """ Environment initialization @@ -42,8 +43,9 @@ def __init__( :param uint8_visual: Return visual observations as uint8 (0-255) matrices instead of float (0.0-1.0). :param multiagent: Whether to run in multi-agent mode (lists of obs, reward, done). :param flatten_branched: If True, turn branched discrete action spaces into a Discrete space rather than MultiDiscrete. + :param no_graphics: Whether to run the Unity simulator in no-graphics mode """ - self._env = UnityEnvironment(environment_filename, worker_id) + self._env = UnityEnvironment(environment_filename, worker_id, no_graphics=no_graphics) self.name = self._env.academy_name self.visual_obs = None self._current_state = None