[rllib] Upgrade to OpenAI Gym 0.10.3 (#1601)

This commit is contained in:
butchcom
2018-03-06 00:31:02 -08:00
committed by Richard Liaw
parent 162d063f0d
commit 936bebef99
11 changed files with 63 additions and 49 deletions
+6 -6
View File
@@ -143,21 +143,21 @@ class CarlaEnv(gym.Env):
if config["discrete_actions"]:
self.action_space = Discrete(len(DISCRETE_ACTIONS))
else:
self.action_space = Box(-1.0, 1.0, shape=(2,))
self.action_space = Box(-1.0, 1.0, shape=(2,), dtype=np.float32)
if config["use_depth_camera"]:
image_space = Box(
-1.0, 1.0, shape=(
config["y_res"], config["x_res"],
1 * config["framestack"]))
1 * config["framestack"]), dtype=np.float32)
else:
image_space = Box(
0.0, 255.0, shape=(
0, 255, shape=(
config["y_res"], config["x_res"],
3 * config["framestack"]))
self.observation_space = Tuple(
3 * config["framestack"]), dtype=np.uint8)
self.observation_space = Tuple( # forward_speed, dist to goal
[image_space,
Discrete(len(COMMANDS_ENUM)), # next_command
Box(-128.0, 128.0, shape=(2,))]) # forward_speed, dist to goal
Box(-128.0, 128.0, shape=(2,), dtype=np.float32)])
# TODO(ekl) this isn't really a proper gym spec
self._spec = lambda: None