I am trying to create a custom multi agent environment, but get the following error:
Traceback (most recent call last):
File "server.py", line 134, in <module>
env = gym.make("rl_agent-v0")
File "/home/aviskarkc10/.local/lib/python3.8/site-packages/gym/envs/registration.py", line 145, in make
return registry.make(id, **kwargs)
File "/home/aviskarkc10/.local/lib/python3.8/site-packages/gym/envs/registration.py", line 90, in make
env = spec.make(**kwargs)
File "/home/aviskarkc10/.local/lib/python3.8/site-packages/gym/envs/registration.py", line 65, in make
env.unwrapped.spec = spec
AttributeError: 'RLAgent_v0' object has no attribute 'unwrapped'
The agent works fine if I use the gym.Env subclass but it doesn’t when I use MultiAgentEnv subclass from rllib. So I was hoping I’d get some information here.
I have opened an issue in openai/gym GitHub repo as well. Thanks.
The rllib defined environment classes (MultiagentEnv, RemoteEnv, VectorEnv) do not use the gym make interface. You just construct it manually. Something like: