JMLR

Memory Gym: Towards Endless Tasks to Benchmark Memory Capabilities of Agents

Authors
Marco Pleines Matthias Pallasch Frank Zimmer Mike Preuss
Paper Information
  • Journal:
    Journal of Machine Learning Research
  • Added to Tracker:
    Jul 15, 2025
Abstract

Memory Gym presents a suite of 2D partially observable environments, namely Mortar Mayhem, Mystery Path, and Searing Spotlights, designed to benchmark memory capabilities in decision-making agents. These environments, originally with finite tasks, are expanded into innovative, endless formats, mirroring the escalating challenges of cumulative memory games such as “I packed my bag”. This progression in task design shifts the focus from merely assessing sample efficiency to also probing the levels of memory effectiveness in dynamic, prolonged scenarios. To address the gap in available memory-based Deep Reinforcement Learning baselines, we introduce an implementation within the open-source CleanRL library that integrates Transformer-XL (TrXL) with Proximal Policy Optimization. This approach utilizes TrXL as a form of episodic memory, employing a sliding window technique. Our comparative study between the Gated Recurrent Unit (GRU) and TrXL reveals varied performances across our finite and endless tasks. TrXL, on the finite environments, demonstrates superior effectiveness over GRU, but only when utilizing an auxiliary loss to reconstruct observations. Notably, GRU makes a remarkable resurgence in all endless tasks, consistently outperforming TrXL by significant margins. Website and Source Code: https://marcometer.github.io/jmlr_2024.github.io/

Author Details
Marco Pleines
Author
Matthias Pallasch
Author
Frank Zimmer
Author
Mike Preuss
Author
Citation Information
APA Format
Marco Pleines , Matthias Pallasch , Frank Zimmer & Mike Preuss . Memory Gym: Towards Endless Tasks to Benchmark Memory Capabilities of Agents. Journal of Machine Learning Research .
BibTeX Format
@article{JMLR:v26:24-0043,
  author  = {Marco Pleines and Matthias Pallasch and Frank Zimmer and Mike Preuss},
  title   = {Memory Gym: Towards Endless Tasks to Benchmark Memory Capabilities of Agents},
  journal = {Journal of Machine Learning Research},
  year    = {2025},
  volume  = {26},
  number  = {6},
  pages   = {1--40},
  url     = {http://jmlr.org/papers/v26/24-0043.html}
}
Related Papers