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 updates the CPP interface to allow a 2 player interface. Work for the 4 player interface is left as a future PR because that's quite a bit more complicated.
AFAICT, these are the 2 player games available:
And these are games with 4 players:
I believe we should be able to just copy the games that support multiplayer from the MALE repo since they already have the modifications required. I have modified Surround to support 2 player mode for the testing script below.
The more difficult question is how the Python interface for this should look, since, I presume, the gymnasium API is not sufficient.
Testing
Expected Behaviour:
Since the gymnasium API by default makes player B's actions NOOP, setting
mode=4
means that player B won't have any actions.Conversely, setting
mode=2
would mean that player B will be controlled by the emulator, therefore moving in random directions.