Abstract
Standard Deep Q-Networks (DQN) often achieve high performance in Atari games by exploiting specific weaknesses in static opponents rather than mastering the underlying game mechanics. This study investigates this "overfitting" phenomenon in Pong and introduces two self-play adversarial training schemes—Chainer and Pool. These methods force agents to develop robust, generalized strategies. Our results demonstrate that adversarial training leads to internal neural representations that better capture the game's physics, as evidenced by significantly higher accuracy in predicting ball trajectories.
Introduction
The success of DQN in mastering Atari games is a landmark in reinforcement learning. However, these agents often rely on "kill shots"—exploitative moves that take advantage of the built-in AI's limitations. In Pong, once an agent discovers an unreturnable angle, it ceases to learn broader game dynamics. This research explores whether such agents are truly learning the game or merely memorizing loopholes. By introducing dynamic, evolving opponents through self-play, we aim to regularize the learning process and produce more robust agents.
Methodology
We propose two distinct adversarial training frameworks to prevent agents from settling into exploitative local optima:
1. The Pool Scheme
In the Pool approach, the learning agent competes against a randomly selected "ancestor" from a fixed-size queue (size 5). Every 250,000 training steps, the current agent is frozen and added to the pool, replacing the oldest member. This ensures the learner faces a diverse and increasingly difficult set of strategies, preventing it from overfitting to a single opponent's behavior.
2. The Chainer Scheme
The Chainer scheme follows a sequential progression. An agent $A^n$ is trained exclusively against its immediate predecessor $A^{n-1}$. Once $A^n$ achieves a stable win threshold (averaging 15/21 points), it becomes the new fixed opponent, and a new learner $A^{n+1}$ is initialized from scratch. This creates a clear "arms race" of complexity.
Evaluation Metrics
To assess the quality of the learned representations, we employed two primary metrics:
- Robustness Score: We measured how quickly a new adversary, trained from scratch, could defeat the target agent. A higher "Adversary Score" indicates a more fragile target agent.
- Linear Probing: We applied linear regression to the activations of the network's final layer to predict the ball's landing position. This tests whether the agent's internal state encodes the physical trajectory of the ball.
Results and Discussion
Both adversarial schemes produced agents that significantly outperformed the standard DQN in direct competition, often achieving near-perfect scores.
Robustness to Adversaries
Standard DQN agents proved remarkably fragile. As shown in the robustness plots, a new learner can quickly exploit the standard DQN's fixed strategy. In contrast, agents from the Chainer and Pool schemes maintained defensive integrity for much longer, forcing the adversary to work harder to find weaknesses.
Internalized Physics
The linear probing results provided the most compelling evidence for generalized learning. While the standard DQN achieved an $R^2$ of 0.41 in predicting ball landing positions, the Pool and Chainer agents reached $R^2$ values of 0.55 and 0.57, respectively. This 35-40% improvement suggests that adversarial training forces the network to develop a deeper "understanding" of the environment's physics to remain competitive against evolving opponents.
Conclusion
This work highlights a critical limitation of training RL agents against static environments: the tendency to exploit rather than understand. By implementing self-play through the Chainer and Pool schemes, we successfully regularized the learning process in Pong. The resulting agents are not only more difficult to defeat but also possess internal representations that more accurately reflect the underlying game state. Future research will explore the scalability of these adversarial schemes to more complex, non-symmetric 3D environments.
Summary updated