Farama-Foundation / Minigrid

Simple and easily configurable grid world environments for reinforcement learning
https://minigrid.farama.org/
Other
2.09k stars 604 forks source link

Compatibility with new gym API + New wrapper for out-of-the box usage of RL libraries (e.g. stable_baselines3) #194

Closed saleml closed 2 years ago

saleml commented 2 years ago

In recent updates of gym, the API has changed significantly, creating backward compatibility issues with minigrid and enviornments based on it.

- I moved EmptyEnvWithExtraObs, that was defined in run_tests.py, to empty.py in order to be able to register it correctly with gym (I couldn't figure out how to register it if it wa defined in run_tests.py). Registering environments seem to be essential with the changes to the gym API (in order to be able to use render_mode argument when calling gym.make for example)

There should be no warning when running run_tests.py or manual_control.py.

saleml commented 2 years ago

I updated the setup and yaml files to use the new released version of gym (0.25). This new gym release also contains a Text spaces. There is no need for the StringGymSpace I had written anymore.

Note: With gym 0.25, the step function outputs a 5-tuple instead of a 4-tuple. gym raises a warning as minigrid still outputs a 4-tuple. I have not made the change to any step function.

pseudo-rnd-thoughts commented 2 years ago

This looks very impressive, sorry for not responding faster. We are planning on code review and merging your PR, after we have fixed the CI. Would you be interested in working on gym and minigrid more? If so, could you join the gym discord https://discord.gg/nHg2JRN489 and contact me pseudornd