RobertTLange / gymnax

RL Environments in JAX 🌍
Apache License 2.0
616 stars 61 forks source link

Elegant registration of environments #13

Closed RobertTLange closed 2 years ago

RobertTLange commented 3 years ago

As of right now the registration of an env is done via an import and string conditional. This is probably the worst way of doing it and can't scale or enable spin-offs/easy integration of new envs.

https://github.com/RobertTLange/gymnax/blob/730c86c0862a26d5e8ad538ea84bee46c678a0a5/gymnax/environments/registration.py#L30

Mimic the full gym registry pipeline so that people can follow that standard registration setup.

https://github.com/openai/gym/blob/a5a6ae6bc0a5cfc0ff1ce9be723d59593c165022/gym/envs/registration.py#L73