[atari] Fix frame_skip=1 max-pool ghosting#370
Merged
Conversation
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.
Summary
frame_skip=1Atari steps were max-pooling the current frame with stale data frommaxpool_buf_[0], which leaves bright ball/paddle trails in RGB observations.frame_skip>1.frame_skip=1now emits the current frame without stale-frame ghosting, whileframe_skip>=2keeps the existing max-pool behavior.This is a minimal Atari-only fix for the one-frame max-pool edge case.
Technical Details
min(frame_skip_, 2)as the number of pooled frames, write the sole frame intomaxpool_buf_[0]whenframe_skip=1, and only callPushStack(..., maxpool=true)whenframe_skip_ > 1.envpool/atari/atari_env.hTest Plan
Automated
git diff --check: passedmake bazel-pip-requirement-dev && USE_BAZEL_VERSION=8.6.0 BAZEL_RULES_QT_DIR=/opt/homebrew/opt/qt@5 bazelisk test --test_output=errors --config=test --spawn_strategy=local --action_env=PATH=/Users/jiayi/.virtualenvs/openai/lib/python3.12/site-packages/cmake/data/bin:/Users/jiayi/.virtualenvs/openai/bin:/opt/homebrew/bin:/bin:/usr/bin:/usr/local/bin //envpool/atari:atari_env_test: passedSuggested Manual
frame_skip=1Atari RGB rollout and inspect a few frames/video to verify the ball and paddle no longer leave one-step trails.