TL;DR
While the Atari Learning Environment (ALE) remains the gold standard benchmark for reinforcement learning (RL), its static nature makes it nearly impossible to evaluate out-of-distribution generalization or detect shortcut learning. HackAtari solves this by directly modifying Atari 2600 RAM states to create controlled variations—such as changing visuals, tweaking game physics, simplifying mechanics for curriculum learning, or injecting LLM-generated reward functions. Testing popular algorithms on HackAtari exposes severe goal misgeneralization and behavioral brittleness in standard deep RL agents.
What Problem Does This Paper Address?
Deep RL agents are notorious for "shortcut learning" (or goal misgeneralization): optimizing for an easier surrogate cue rather than the true objective. For instance, in Pong, an agent might simply mirror the opponent paddle’s position rather than actually tracking the ball.
Standard explainability tools (like saliency maps) can be deceptive. A heatmap highlighting the ball and paddle gives the illusion of comprehension, yet fails to explain how that visual feature informs decisions. Identifying true misalignments requires testing agents against environmental perturbations. However, the ALE provides no built-in variations, lacks open source code for direct engine modification, and has largely restricted researchers to testing agents on the exact environments they were trained on.
Methods
Instead of attempting to rewrite proprietary Atari source code, HackAtari builds on OCAtari and AtariARI to manipulate game properties via runtime RAM alteration:
- RAM Mapping & Injection: By modifying RAM addresses responsible for object coordinates, velocities, palettes, or game flags at step-time or reset-time, the authors introduce targeted variations without heavy computational overhead.
- Four Alteration Paradigms:
- Visual Domain Adaptation: Alters object or background palettes (via RAM or pixel mapping) to test reliance on color shortcuts.
- Dynamics Adaptation: Introduces gameplay shifts—such as downward gravity, ball drift, altered projectile speeds, or modified enemy policies (e.g., Lazy Enemy Pong, where the opponent paddle freezes after hitting the ball).
- Curriculum Reinforcement Learning (CRL): Disables hazards (e.g., removing falling barrels in Donkey Kong or freezing traffic in Freeway) to isolate core skills like basic navigation before progressively re-introducing complexity.
- Reward Signal Adaptation: Enables custom programmatic or Large Language Model (LLM)-generated reward functions using object-centric abstractions (e.g., prompting GPT-3.5 to create a pacifist reward function for Seaquest prioritizing diver rescue).
[Atari 2600 RAM]
│
(RAM Overwrite)
▼
┌────────────────────────────────────────────────────────┐
│ HackAtari │
├───────────────────┬───────────────────┬────────────────┤
│ Visual Shifts │ Dynamics Shifts │ Curriculum & │
│ (Colors, Sprites) │ (Drift, Gravity) │ Custom Rewards │
└───────────────────┴───────────────────┴────────────────┘
│
▼
[Agent Generalization & Robustness Evaluation]
Datasets
The authors introduce HackAtari, comprising 50 environment variations across 16 Atari games (including Pong, Freeway, Boxing, Kangaroo, Breakout, MsPacman, Seaquest, Frostbite, and Donkey Kong). These environments directly interface with Gymnasium, CleanRL, and Stable-Baselines.
Key Insights and Ideas
- Exposing Blind Spots: In Pong (Lazy Enemy), when the opponent stops moving after returning the shot, PPO’s performance collapses from $+16.0$ to $-12.6$, confirming that the agent relies on the enemy paddle rather than the ball's trajectory.
- The "Punching vs. Rescuing" Trap: In Kangaroo, standard PPO agents learn only to punch monkeys rather than rescuing the baby kangaroo. When monkeys and coconuts are removed (No Danger Kangaroo), human scores jump from $2,344$ to $12,200$, whereas PPO drops to $0$ because it never learned basic climbing/navigation.
- Memorization Over Navigation: In MsPacman, swapping to an alternate maze layout drops PPO scores from $2,312$ to $456$, proving agents memorize coordinate paths rather than learning spatial navigation.
- Unlocking Sparse Rewards: In Freeway, standard C51 agents struggle with exploration. Pre-training on Stopped Cars Freeway allows agents to master crossing in under 1M steps, enabling smooth curriculum transfer to moving traffic.
Key Results
The authors evaluated PPO and C51 agents against human baselines across original and modified environments (trained on 10M frames):
| Game (Variant) | PPO (Train Orig / Test Orig) | PPO (Train Orig / Test Variant) | PPO (Train Variant / Test Variant) | Human (Test Orig) | Human (Test Variant) |
|---|---|---|---|---|---|
| Boxing (One Armed) | $90.9 \pm 1.5$ | $\mathbf{1.9 \pm 10.2}$ | $82.2 \pm 9.3$ | $0.6 \pm 2.7$ | $-12.8 \pm 18.8$ |
| Donkey Kong (No Barrels) | $3480 \pm 1032$ | $\mathbf{0 \pm 0}$ | $0 \pm 0$ | $7320 \pm 3961$ | $\mathbf{50000 \pm 0}$ |
| Pong (Lazy Enemy) | $16.0 \pm 3.4$ | $\mathbf{-12.6 \pm 2.4}$ | $18.1 \pm 4.4$ | $-13.7 \pm 2.3$ | $-12.2 \pm 6.4$ |
| MsPacman (Swap Level) | $2312 \pm 465$ | $\mathbf{456 \pm 260}$ | $2228 \pm 428$ | $4592 \pm 3725$ | $\mathbf{6149 \pm 5097}$ |
| Freeway (Mono-Colored) | $31.4 \pm 1.5$ | $24.6 \pm 2.7$ | $32.7 \pm 0.8$ | $21.7 \pm 4.8$ | $29.3 \pm 1.5$ |
While humans quickly leverage simplified rules or transfer existing knowledge, deep RL agents suffer dramatic failures when facing even minor gameplay or visual shifts.
Limitations and Future Work
- Scope of Environments: The framework is currently restricted to the 2D Atari 2600 library; results may not translate directly to complex 3D or real-time strategy environments.
- Human Study Scale: The human baseline comparison relied on a small pool (at least 3 users per game); broader user studies are needed for finer-grained cognitive benchmarking.
- Computational Footprint: Integrating external foundation models (like vision-language models or LLMs for automated real-time reward shaping) adds noticeable latency and resource overhead.
Summary updated