Suggestion: Alternative Multi-Agent API #88
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR references the multi-agent environment commit.
At present some flaws remain in this PR (namely it is presently not yet able to handle dictionary inputs as sequential) but that should not significantly affect its ability to provide another perspective on how multi-agent API could look.
Motivation
Multi-agent environments have an additional dimension over single-agent ones in that agents either take turns, act simultaneously (or have the option to do both).
To guide decisions along this dimension and streamline development, fundamental considerations like
should be exposed to the end developer while weakly encoding some broad preferences such as simultaneous execution over sequential execution.
Differences from this other PR
Many of the suggestions in this PR are quite similar to the ones here.
The main difference is conceptual:
where the two methods exist in complementary distribution in the other PR, this PR aims to increase flexibility of this combined interface by allowing sequential implementations to run with a simultaneous execution interface, and vice versa.
The other PR also appears to aim for an interface closer to that of PettingZoo. It is a good interface to start off of but it may be beneficial to make an interface that places the differences between sequential and simultaneous multi-agent environments front and centre (from the class definition perspective), while still maintaining convenience from the usage perspective.