【错误解决】GYM下引入Atari环境错误

【错误解决】GYM下引入Atari环境错误,第1张

错误解决】GYM下引入Atari环境错误 报错显示:

We're Unable to find the game "MsPacman". Note: Gym no longer distributes ROMs. If you own a license to use the necessary ROMs for research purposes you can download them via `pip install gym[accept-rom-license]`. Otherwise, you should try importing "MsPacman" via the command `ale-import-roms`. If you believe this is a mistake perhaps your copy of "MsPacman" is unsupported. To check if this is the case try providing the environment variable `PYTHonWARNINGS=default::importWarning:ale_py.roms`. For more information see: https://github.com/mgbellemare/Arcade-Learning-Environment#rom-management

解决方法:

在综合搜索之后,发现可行组合。值得一试

1.安装指定版本的gym和altari-py

pip install gym==0.19.0
pip install atari_py==0.2.6

 2.安装rom

官方参考

https://github.com/openai/atari-py#roms

中文参考:

Exception: ROM is missing for ms_pacman, see https://github.com/openai/atari-py#roms for instruction_CSU_FuChou的博客-CSDN博客

测试代码:
import gym
#更换为所需的环境
env = gym.make("MsPacman-v0")
print(env.action_space.n)
env.render()
env.close()

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5721178.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-18
下一篇 2022-12-18

发表评论

登录后才能评论

评论列表(0条)

保存