mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00

* Remove all __future__ imports from RLlib. * Remove (object) again from tf_run_builder.py::TFRunBuilder. * Fix 2xLINT warnings. * Fix broken appo_policy import (must be appo_tf_policy) * Remove future imports from all other ray files (not just RLlib). * Remove future imports from all other ray files (not just RLlib). * Remove future import blocks that contain `unicode_literals` as well. Revert appo_tf_policy.py to appo_policy.py (belongs to another PR). * Add two empty lines before Schedule class. * Put back __future__ imports into determine_tests_to_run.py. Fails otherwise on a py2/print related error.
29 lines
709 B
Python
29 lines
709 B
Python
from deepmind_lab import dmenv_module
|
|
|
|
from ray.rllib import env
|
|
|
|
|
|
class Watermaze(env.DMEnv):
|
|
def __init__(self, env_config):
|
|
lab = dmenv_module.Lab(
|
|
"contributed/dmlab30/rooms_watermaze",
|
|
["RGBD"],
|
|
config=env_config,
|
|
)
|
|
super(Watermaze, self).__init__(lab)
|
|
|
|
|
|
env = Watermaze({"width": "320", "height": "160"})
|
|
print(env.action_space)
|
|
|
|
for i in range(2):
|
|
print(
|
|
env.step({
|
|
"CROUCH": 0.,
|
|
"FIRE": 0.,
|
|
"JUMP": 0.,
|
|
"LOOK_DOWN_UP_PIXELS_PER_FRAME": 0.,
|
|
"LOOK_LEFT_RIGHT_PIXELS_PER_FRAME": 0.,
|
|
"MOVE_BACK_FORWARD": 0.,
|
|
"STRAFE_LEFT_RIGHT": 0.
|
|
}))
|