NeuralMMO / environment

Neural MMO - A Massively Multiagent Environment for Artificial Intelligence Research
https://neuralmmo.github.io
MIT License
499 stars 67 forks source link

[Feature Request] Update PettingZoo version #72

Open elliottower opened 1 year ago

elliottower commented 1 year ago

Eventually, feature requests will be treated as a scrum board for open-source contributors. At the current scale, you should come chat with us on the Discord #development channel before writing one of these.

Hi, would it be possible to update this repo to use the most recent version of PettingZoo? This project is listed in PettingZoo's third-party-environments, but we only want to include environments which work with the current version.

If you need any help working out issues due to different versions feel free to ask, there were some breaking changes in version 1.2, so it requires a bit of code changes to adapt. The previous API returned done in the step() function, whereas the new one returns truncated and terminated (matching gymnasium). There is a migration guide for gymnasium explaining the changes further, the steps should be basically the same (we're working on making resources for updating old PettingZoo repositories as well): https://gymnasium.farama.org/content/migration-guide/

I am trying to: Use NeuralMMO with current PettingZoo/Gymnasium versions

**It is hard/impossible because:" There have been breaking changes since the version used (v1.19.0 of PettingZoo)

The solution should look like: The internal logic needs to switch to using terminated and truncated instead of done.

jsuarez5341 commented 10 months ago

Hi,

Working on this. It is difficult. There are tons of breaking changes between 0.19 and gymnasium. Supporting Gymnasium requires me to first update PufferLib not only to support the latest version, but also all of the intermediate ones too. Once that is done, I can update NMMO as well.

elliottower commented 10 months ago

Great to hear, if you need any help with things related specifically to PettingZoo and/or Gymnasium let me know--would love to help however possible. Gymnasium is nearing its 1.0.0 release and will have an alpha release prior to that FYI, mainly improvements and new features but may be worth double checking to see that there isn't anything that would make things difficult to update.

We've been working on adding training tutorials and more resources for beginners for Gymnasium and PettingZoo, would love to promote any sort of updated starting scripts/tutorials for NeuralMMO to new users asking in our discord and such

kywch commented 1 month ago

Hi Elliot, Neural MMO 2.1 has moved to pettingzoo==1.24.1 and gymnasium==0.29.1, we are currently testing it.

The 2.1 passes pettingzoo's parallel_api_test -- https://github.com/NeuralMMO/environment/blob/2.1/tests/test_pettingzoo.py

Thanks!