Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Simplified multiagent config with asymmetric observation spaces #21286

Closed
2 tasks done
mgerstgrasser opened this issue Dec 28, 2021 · 2 comments
Closed
2 tasks done
Labels
enhancement Request for new feature and/or capability P2 Important issue, but not time-critical rllib RLlib related issues rllib-connectorv2 Connector related issues rllib-env rllib env related issues

Comments

@mgerstgrasser
Copy link
Contributor

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

In #16565 and #17046 an improvement was made to allow RLLib to determine the observation and action space from the environment in multiagent environments. This only works when the spaces are the same for all agents though. I want to propose extending this to allow for different spaces for each agent. This could be implemented as a relatively small change, by letting env.observation_space and env.action_space be multiagent dicts holding the respective spaces for each agent.

Use case

Similar to the original PRs mentioned, this would simplify configuration in multiagent settings, and obviate the need to create a dummy env at configuration time just to read off each agent's action and observation space. The original PRs addressed this for symmetric spaces, this would bring the same benefits to environment with different spaces for each agent.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@mgerstgrasser mgerstgrasser added the enhancement Request for new feature and/or capability label Dec 28, 2021
@matthewdeng matthewdeng added the rllib RLlib related issues label Dec 30, 2021
@mgerstgrasser
Copy link
Contributor Author

@sven1977 I think you probably know the most about this since you wrote the original PRs referenced. I think it's a relatively small change and I'd be happy to submit a PR for it, but I wanted to check what you thought first. Particularly since it slightly changes what env.action_space and env.observation_space (can) mean in a multiagent env. I don't know of anything else that touches either of these so I don't think making these multiagent dicts should break anything, and in practice with our own code it works, but I might have missed something of course.

@gjoliver gjoliver added P2 Important issue, but not time-critical rllib-env rllib env related issues labels Apr 9, 2022
@gjoliver
Copy link
Member

gjoliver commented Apr 9, 2022

The code base may have this assumption baked in at a lot of places.
We are planning some work for RLlib 2.0 that should make it lot easier to use different policy and spaces for different agents from the env.

@gjoliver gjoliver added the rllib-connectorv2 Connector related issues label Apr 9, 2022
@avnishn avnishn closed this as completed Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Request for new feature and/or capability P2 Important issue, but not time-critical rllib RLlib related issues rllib-connectorv2 Connector related issues rllib-env rllib env related issues
Projects
None yet
Development

No branches or pull requests

4 participants