Closed elliottower closed 1 year ago
Note: this PR will be updated to use shimmy rather than utils.py once https://github.com/Farama-Foundation/Shimmy/pull/39 is merged. I am thinking it's probably best to also do a separate tutorial file (or other documentation) to demonstrate using melting pot with pettingzoo (using shimmy), and either mark that the SB3 tutorial is not currently working, or wait on merging this PR until SB3 is updated to support the updated gymnasium API (see https://github.com/DLR-RM/stable-baselines3/pull/780)
I've updated the pettingzoo stable-baselines3 (SB3) training script to work with the current pettingzoo API and use gymnasium rather than gym. I had to restructure
examples/pettingzoo/utils.py
but it now aligns better with other pettingzoo compatibility wrappers. I'm currently working on creating a PR in https://github.com/Farama-Foundation/Shimmy so that the conversion code can be more easily found and better documented. This will remove the need for utils.py, but I am keeping it as a placeholder for now.Note that this relies on a feature branch of SB3 which is not yet merged: https://github.com/DLR-RM/stable-baselines3/pull/1327 This also relies on a PR of supersuit which is not yet merged: https://github.com/Farama-Foundation/SuperSuit/pull/206
Once those two are merged I can update
requirements.txt
to reflect it, and/or modifyinstall_extras.sh
to include stable-baselines3 and supersuit.