Can I use RLlib with a custom environment without registering it?

I am very new to the RLlib. I followed this tutorial . Though it was not clear for me how and why we need to register an environment (The registeration part of code did not work also). Basically I have written a custom environment (EnergySystem) and I am going to use it in the same script. Do I need to register it? If not, can you please provide a working example? The example in the documentation is not also detail for beginners (it is written that Custom env classes passed directly to the algorithm must take a single env_config parameter in their constructor but I do not know how this env_config should be). This post also is for multiagent. My environment class interacts with an external software so it takes around 50 seconds to step.

Hi, I’m not affiliated with Ray, but I thought this tutorial on MARL might help you:

In my humble understanding, “registering” initializes the environment as an object. It is a procedure inherited from gym custom environments. Here they explain briefly why gym environments need to be registered.

1 Like