ray/rllib/examples/env/d4rl_env.py
Balaji Veeramani 7f1bacc7dc
[CI] Format Python code with Black (#21975)
See #21316 and #21311 for the motivation behind these changes.
2022-01-29 18:41:57 -08:00

46 lines
837 B
Python

"""
8 Environments from D4RL Environment.
Use fully qualified class-path in your configs:
e.g. "env": "ray.rllib.examples.env.d4rl_env.halfcheetah_random".
"""
import gym
try:
import d4rl
d4rl.__name__ # Fool LINTer.
except ImportError:
d4rl = None
def halfcheetah_random():
return gym.make("halfcheetah-random-v0")
def halfcheetah_medium():
return gym.make("halfcheetah-medium-v0")
def halfcheetah_expert():
return gym.make("halfcheetah-expert-v0")
def halfcheetah_medium_replay():
return gym.make("halfcheetah-medium-replay-v0")
def hopper_random():
return gym.make("hopper-random-v0")
def hopper_medium():
return gym.make("hopper-medium-v0")
def hopper_expert():
return gym.make("hopper-expert-v0")
def hopper_medium_replay():
return gym.make("hopper-medium-replay-v0")