xuance icon indicating copy to clipboard operation
xuance copied to clipboard

gym.error.NameNotFound: Environment Pong doesn't exist in namespace ALE.

Open wenzhangliu opened this issue 1 year ago • 1 comments

When I run a demo of Atari after correctly installing xuance, it raises an error:

raise error.NameNotFound( gym.error.NameNotFound: Environment Pong doesn't exist in namespace ALE.

wenzhangliu avatar Dec 14 '23 04:12 wenzhangliu

This issue can be solved by running

pip install gym[accept-rom-license]

wenzhangliu avatar Dec 14 '23 04:12 wenzhangliu

i'm trying to implement the Pong-v0 environment, i have already done your method but nothing happens can you show me what i should do next? raise error.NameNotFound( f"Environment {name} doesn't exist{namespace_msg}. {suggestion_msg}" This is the bug i have encountered.

ToiLaKiet avatar Dec 02 '24 07:12 ToiLaKiet

You can try to use "ALE/Pong-v5" as the env_id.

wenzhangliu avatar Dec 02 '24 07:12 wenzhangliu

Can you elaborate on ALE namespace? What is the module so that I can import it. I'm sorry for asking such questions because I am quite new to this. In addition, I would rather use Pong-v0 as my code works within its structure. Thank you a lot.

ToiLaKiet avatar Dec 02 '24 07:12 ToiLaKiet

I mean, you can use "ALE/Pong-v5" instead of "Pong-v0". For example:

env = gym.make("ALE/Pong-v5")  

However, this depends on the version of Gym you're using.

wenzhangliu avatar Dec 02 '24 07:12 wenzhangliu