Skip to content

Fix sparse Wipe marker rewards - #822

Open
tandede wants to merge 1 commit into
ARISE-Initiative:masterfrom
tandede:fix/wipe-sparse-unit-reward
Open

Fix sparse Wipe marker rewards#822
tandede wants to merge 1 commit into
ARISE-Initiative:masterfrom
tandede:fix/wipe-sparse-unit-reward

Conversation

@tandede

@tandede tandede commented Aug 25, 2026

Copy link
Copy Markdown

What this does

Fixes #418.

Wipe.reward() documents unit_wiped_reward as a discrete reward for every marker wiped during the current step. The normalization factor also includes num_markers * unit_wiped_reward, so that component is part of the intended return for both reward modes. However, the implementation added it only when reward_shaping=True. With sparse rewards, newly wiped markers were made transparent and recorded in wiped_markers, but contributed no reward unless the final marker also completed the task.

This change moves only the per-marker increment outside the dense-reward condition. Dense rewards keep their existing distance, contact, force, acceleration, and completion components; sparse rewards now receive the documented marker reward while retaining the existing collision and completion behavior.

A focused regression invokes the reward calculation with a minimal simulated Wipe state and verifies that, with reward_shaping=False, a newly wiped marker:

  • contributes exactly one unit_wiped_reward;
  • is recorded in wiped_markers; and
  • has its visual geometry hidden.

How it was tested

  • python -m pytest tests/test_environments/test_wipe_reward.py tests/test_environments (5 passed)
  • python -m pytest (262 passed, 61 skipped)
  • pre-commit run --files robosuite/environments/manipulation/wipe.py tests/test_environments/test_wipe_reward.py
  • The two flake8 commands used by .github/workflows/run-tests.yaml (strict error count: 0)
  • git diff --check

How to checkout & try? (for the reviewer)

python -m pytest tests/test_environments/test_wipe_reward.py

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.

Unit wiped reward not considered for sparse reward in wipe environment

1 participant