mirror of
https://github.com/wassname/ray.git
synced 2026-08-05 13:21:03 +08:00
[rllib] Upgrade to OpenAI Gym 0.10.3 (#1601)
This commit is contained in:
@@ -4,6 +4,7 @@ from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import numpy as np
|
||||
import gym
|
||||
from gym.spaces import Discrete, Box
|
||||
from gym.envs.registration import EnvSpec
|
||||
@@ -22,7 +23,8 @@ class SimpleCorridor(gym.Env):
|
||||
self.end_pos = config["corridor_length"]
|
||||
self.cur_pos = 0
|
||||
self.action_space = Discrete(2)
|
||||
self.observation_space = Box(0.0, self.end_pos, shape=(1,))
|
||||
self.observation_space = Box(
|
||||
0.0, self.end_pos, shape=(1,), dtype=np.float32)
|
||||
self._spec = EnvSpec("SimpleCorridor-{}-v0".format(self.end_pos))
|
||||
|
||||
def _reset(self):
|
||||
|
||||
Reference in New Issue
Block a user