Closed asd3200asd closed 3 years ago
Check docs on custom environments, especially the use of check_env
utility to make sure that your environment works as expected.
The following program does not run in my program
from stable_baselines.common.env_checker import check_env
env = FooEnv()
# It will check your custom environment and output additional warnings if needed
check_env(env)
Is the stable baselines's environment different from the gym's environment?
No, stable-baselines uses the same API as presented in OpenAI Gym. check_env
attempts to check that the environment follows the API. If you are getting an error with that code, it likely means there is something off in your environment (check the error message).
foo Gym is my customized Gym environment There is a problem when setting the observation_space
There is an error in my program ValueError: Cannot feed value of shape (1,) for Tensor 'deepq/input/Ob:0', which has shape '(?, 5)'
I think my observation_space set format is the same as CartPole-v1
================================== and there are CartPole-v1 environmental's observation_space
================================== and there are environmental programs's observation_space
================================== and there are main programs (stable_baselines dqn example,Only change foo Gym )