Multi Agent PettingZoo : Agents with different Observations

Hello everyone !

I hope you’re all having a great day. I’m working on a project to model multi-agent learning using a PettingZoo MARL environment. The catch is that each there are two types of agents, each with their distinct observation spaces. When I run my setup, I get an error of the form:

AssertionError: Observation spaces for all agents must be identical. Perhaps SuperSuit’s pad_observations wrapper can help (useage: supersuit.aec_wrappers.pad_observations(env)

Doing a little digging, I discover that the error is raised by the ParallelPettingZooEnv wrapper that I’m using to translate a ParallelEnv to RLlib’s version. Here’s a MWE:

Pastebin for MWE

I’m currently on PettingZoo: 1.22.3, ray[rllib]==2.4.0 and gymnasium==0.28.1.

Can you guys help me find what to do, please? Thanks so much! Of course, if there’s any further information I can give, I’d love to!

Thanks again!

In any case, the excellent examples on the repo had the answer: I found this a bit late, but essentially ended up implementing something like this: (Example) Multi Agent Environment with Different Spaces