socialfoundations / whynot

A Python sandbox for decision making in dynamics
MIT License
412 stars 45 forks source link

Moving to gymnasium compatibility #32

Open marimeireles opened 1 year ago

marimeireles commented 1 year ago

I'm creating this issue to discuss my current ideas/progress on making whynot compatible with the latest version of gymnasium.

I'm thinking about erasing registration.py and instead just initializing the environment on the main file, like the examples in the petting zoo:

from tutorial3_action_masking import CustomEnvironment

from pettingzoo.test import parallel_api_test

if __name__ == "__main__":
    env = CustomEnvironment()
    parallel_api_test(env, num_cycles=1_000_000)

There's no longer support for registration. This doesn't seem really necessary? But maybe I'm missing something and we should support registration ourselves?

marimeireles commented 1 year ago

See #34. This seems like the right approach to me.