OpenAI Gym¶
-
class
tensorforce.environments.
OpenAIGym
(level, visualize=False, max_episode_steps=None, terminal_reward=0.0, reward_threshold=None, tags=None, drop_states_indices=None, visualize_directory=None, **kwargs)[source]¶ OpenAI Gym environment adapter (specification key:
gym
,openai_gym
).May require:
pip3 install gym pip3 install gym[all]
Parameters: - level (string | gym.Env) – Gym id or instance (required).
- visualize (bool) – Whether to visualize interaction (default: false).
- max_episode_steps (false | int > 0) – Whether to terminate an episode after a while, and if so, maximum number of timesteps per episode (default: Gym default).
- terminal_reward (float) – Additional reward for early termination, if otherwise indistinguishable from termination due to maximum number of timesteps (default: Gym default).
- reward_threshold (float) – Gym environment argument, the reward threshold before the task is considered solved (default: Gym default).
- tags (dict) – Gym environment argument, a set of arbitrary key-value tags on this environment, including simple property=True tags (default: Gym default).
- drop_states_indices (list[int]) – Drop states indices (default: none).
- visualize_directory (string) – Visualization output directory (default: none).
- kwargs – Additional Gym environment arguments.