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

Adds reward groups to the reward manager #729

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
ObservationGroupCfg,
ObservationTermCfg,
RandomizationTermCfg,
RewardGroupCfg,
RewardTermCfg,
TerminationTermCfg,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,15 @@ class RewardTermCfg(ManagerTermBaseCfg):
"""


@configclass
class RewardGroupCfg:
"""Configuration for a reward group.

Reward groups can be used to compute sets of reward terms independently.
This can be useful to compute separate rewards in multi-agent scenarios.
"""


Comment on lines +267 to +269
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"""
"""
pass

##
# Termination manager.
##
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def compute_group(self, group_name: str) -> torch.Tensor | dict[str, torch.Tenso
Raises:
ValueError: If input ``group_name`` is not a valid group handled by the manager.
"""
# check ig group name is valid
# check if group name is valid
if group_name not in self._group_obs_term_names:
raise ValueError(
f"Unable to find the group '{group_name}' in the observation manager."
Expand Down
Loading
Loading