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

[BugFix] More flexible episode_reward computation in logger #136

Merged
merged 6 commits into from
Oct 4, 2024

Conversation

matteobettini
Copy link
Collaborator

@matteobettini matteobettini commented Oct 3, 2024

This PR fixes the way episode rewards are computed in BenchMARL

Here is an overview:

epispde_reward compuation

BenchMARL will be looking at the global done (always assumed to be set), which can usually be computed using any or all over the single agents dones.

In all cases the global done is what is used to compute the episode reward.

We log episode_reward min, mean, max over episodes at three different levels:

  • agent (disabled by default, can be turned on manually)
  • group averaged over agents in group
  • global averaged over agents in groups and gropus

Requiremment

When agents are done and the global done is not set, agents should be getting a reward of 0 (if you are not using global rewards)

Fixes #135

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 3, 2024
@matteobettini matteobettini mentioned this pull request Oct 3, 2024
@matteobettini matteobettini added the smacv2 Label to be assigned to run the SMACv2 tests label Oct 4, 2024
@matteobettini matteobettini marked this pull request as ready for review October 4, 2024 09:17
@matteobettini matteobettini changed the title [BugFix] More flexible reward computation in logger [BugFix] More flexible episode_reward computation in logger Oct 4, 2024
@matteobettini matteobettini merged commit b214375 into main Oct 4, 2024
13 checks passed
@matteobettini matteobettini deleted the better_logger branch October 4, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. smacv2 Label to be assigned to run the SMACv2 tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MAgent2 integration
2 participants