[rllib] improve custom env docs (#1447)

* env docs

* add env

* update env

* Fri Jan 19 18:55:34 PST 2018
This commit is contained in:
Eric Liang
2018-01-19 21:36:18 -08:00
committed by GitHub
parent d7dfb16cc8
commit 424bd7f74d
4 changed files with 76 additions and 15 deletions
+1 -1
View File
@@ -128,7 +128,7 @@ def get_preprocessor(space):
obs_shape = space.shape
print("Observation shape is {}".format(obs_shape))
if obs_shape == ():
if isinstance(space, gym.spaces.Discrete):
print("Using one-hot preprocessor for discrete envs.")
preprocessor = OneHotPreprocessor
elif obs_shape == ATARI_OBS_SHAPE: