Abstract
Self-play is an unsupervised training procedure which enables reinforcement learning agents to explore the environment without requiring any external rewards. We augment the self-play setting by providing an external memory where the agent can store experience from previous tasks. This enables the agent to come up with more diverse self-play tasks resulting in faster exploration of the environment. The agent pretrained in the memory augmented self-play setting easily outperforms the agent pretrained in no-memory self-play setting.
Introduction
Reinforcement learning (RL) agents often struggle with sample inefficiency in environments where external rewards are sparse. Asymmetric self-play addresses this by using a "teacher" agent (Alice) to set goals for a "learner" agent (Bob). However, Alice typically lacks a mechanism to remember previously assigned tasks, leading to repetitive episodes that hinder exploration. This paper introduces Memory Augmented Self-Play, providing Alice with an external memory to track previous challenges and foster a more diverse automated curriculum.
Methodology
The authors extend the asymmetric self-play framework using the REINFORCE algorithm. Alice’s policy is conditioned on her starting state, current state, and an external memory module. Three memory implementations were evaluated:
- Last Episode Memory: Storing the feature vector from the most recent task.
- Last k Episode Memory: Averaging feature vectors from the last k tasks.
- LSTM Episode Memory: Passing previous task trajectories through a Long Short-Term Memory (LSTM) network.
The LSTM approach proved superior as it allowed the policy gradient algorithm to effectively disentangle historical task data from current action selection, incentivizing the proposal of novel trajectories.
Experimental Results
The approach was evaluated on Mazebase (a discrete grid-world) and Acrobot (a continuous control task).
Mazebase Performance
In the Mazebase environment, the memory-augmented agent demonstrated significantly faster convergence. As shown in Figure 1, it reached higher reward thresholds much earlier in the training process compared to standard self-play and no-self-play baselines.
Exploration Diversity in Acrobot
In the Acrobot task, the memory-augmented agent achieved a peak reward of -568.80, outperforming standard self-play (-611.72) and the baseline without self-play (-798.21). PCA visualization of the states Alice visited (Figure 2) reveals that memory-augmented self-play leads to a 5x increase in the mean Euclidean distance between start and end points. This confirms that memory encourages the teacher to push the learner into more distant and diverse regions of the state space.
Conclusion
Memory Augmented Self-Play effectively addresses the "amnesia" in traditional self-play. By remembering past tasks, the teacher agent creates a more challenging and diverse curriculum, leading to faster learning and better generalization. Future work will explore more complex memory architectures like Neural Turing Machines and high-dimensional robotic control tasks.
Summary updated