openai / procgen

Procgen Benchmark: Procedurally-Generated Game-Like Gym-Environments
https://openai.com/blog/procgen-benchmark/
MIT License
990 stars 207 forks source link

invalid render mode human can not render"human" and "rgb_array" #90

Open xiezhipeng-git opened 1 year ago

xiezhipeng-git commented 1 year ago

invalid render mode human File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\Lib\site-packages\procgen\env.py", line 105, in init raise Exception(f"invalid render mode {render_mode}") File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\Lib\site-packages\procgen\env.py", line 246, in init super().init(num, env_name, options, kwargs) File "C:\Users\hasee\AppData\Local\Programs\Python\python-3.9.13\Lib\site-packages\procgen\env.py", line 265, in ProcgenEnv return ToBaselinesVecEnv(ProcgenGym3Env(num=num_envs, env_name=env_name, kwargs))

Name: procgen Version: 0.10.7 Summary: Procedurally Generated Game-Like RL Environments Home-page: https://github.com/openai/procgen Author: OpenAI Author-email:

Name: gym3 Version: 0.3.3 Summary: Vectorized Reinforcement Learning Environment Interface Home-page: https://github.com/openai/gym3 Author: OpenAI Name: gym Version: 0.26.2 Summary: Gym: A universal API for reinforcement learning environments Home-page: https://www.gymlibrary.dev/ Author: Gym Community Author-email: jkterry@umd.edu License: MIT

use human it has error and use rgb_array it is no render and self.env.render() two model also same

kaixin96 commented 5 months ago

It seems the rendered image is pushed into the info dict. https://github.com/openai/procgen/blob/5e1dbf341d291eff40d1f9e0c0a0d5003643aebf/procgen/src/vecgame.cpp#L270-L282

So it can be accessed by env.get_info()