Skip to content

Respect per-player action specs in ActionReader - #392

Open
sylvesterkaczmarek wants to merge 2 commits into
google-deepmind:mainfrom
sylvesterkaczmarek:fix/human-player-asymmetric-actions
Open

Respect per-player action specs in ActionReader#392
sylvesterkaczmarek wants to merge 2 commits into
google-deepmind:mainfrom
sylvesterkaczmarek:fix/human-player-asymmetric-actions

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor

Summary

Make the human-player ActionReader respect the action names actually available to each player.

The current implementation collects action names globally across the full DMLab2D action spec. When player action specs are asymmetric, selecting one player can therefore add action keys that do not exist for that player.

This change:

  • records action names per player prefix
  • reads only actions supported by the currently selected player
  • continues emitting zero values for the other valid action-spec keys
  • preserves existing behavior for symmetric player action specs
  • adds focused regression coverage

Testing

Added tests with asymmetric player action specs verifying that each selected player produces only its own valid action keys.

Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant