eugenevinitsky / sequential_social_dilemma_games

Repo for reproduction of sequential social dilemmas
MIT License
380 stars 134 forks source link

Added PettingZoo support #197

Closed Rohan138 closed 2 years ago

Rohan138 commented 2 years ago

Changes: New pettingzoo_env and test_pettingzoo files adding PettingZoo wrapper Updated setup.py and requirements.txt Fixed update_custom_actions so custom actions e.g. fire are resolved randomly over agents to eliminate bias towards agents with lower ids, similar to how update_moves resolves conflicts randomly Ran black, isort and flake8

Rohan138 commented 2 years ago

Hi @benblack769, could you review the episode termination logic in pettingzoo_env.py and test_pettingzoo.py?

Note: I've updated it for pettingzoo==1.12.0 and corrected the env.agents issue at episode termination, but I'd still prefer it if you could take a look whenever you can

benblack769 commented 2 years ago

Looks good to me.

jkterry1 commented 2 years ago

@eugenevinitsky could you please take a look at this?