[MINOR] Fix issue with failure penalty in multiagent env#276
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request addresses a bug where failure penalties were not correctly applied in the PettingZoo multiagent environment when the rewarder omitted a reward for a satellite. Key changes include the addition of a new unit test to cover this edge case, modifications in the _get_reward method to correctly apply penalties, and an update to the release notes documenting the fix.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/unittest/test_gym_env.py | Added a test case (test_get_reward_missing_sat) for the failure penalty logic. |
| src/bsk_rl/gym.py | Adjusted the _get_reward logic and added a debug print statement. |
| docs/source/release_notes.rst | Updated release notes to include the bug fix. |
Mark2000
force-pushed
the
bugfix/fix-failure-penalty
branch
from
June 12, 2025 00:42
042df5b to
ae943b1
Compare
Mark2000
force-pushed
the
bugfix/fix-failure-penalty
branch
from
June 12, 2025 00:43
ae943b1 to
954f1bb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Fix an issue with failure penalties in the PettingZoo environment when the rewarder does not return a reward for a satellite.
Type of change
How should this pull request be reviewed?
How Has This Been Tested?
Added test to cover this case.
Future Work
None.
Checklist