MemoryGame is an environment for evaluating agents on the classic memory/concentration card-matching game. This environment wraps the MemoryGame implementation from TextArena, a framework for text-based game environments.
- Memory retention and recall
- Pattern recognition and matching
- Sequential reasoning and state tracking
- Two-player competitive gameplay against an LLM opponent
MemoryGame does not require a sandbox. It has minimal compute requirements.
MIT.
There are two splits: train (450 tasks) and test (450 tasks). Each split contains 50 tasks across each of 9 variants:
- MemoryGame-v0
- MemoryGame-v0-hard
- MemoryGame-v0-hard-raw
- MemoryGame-v0-hard-train
- MemoryGame-v0-medium
- MemoryGame-v0-medium-raw
- MemoryGame-v0-medium-train
- MemoryGame-v0-raw
- MemoryGame-v0-train
Each task is seeded for reproducibility.
This is a sparse reward environment. Rewards are mapped from TextArena's native range of {-1, 0, 1} to {0.0, 0.5, 1.0} via (raw + 1) / 2.
We do not use LLM graders for this environment; reward is determined programmatically.
Game state is generated procedurally by the TextArena engine using seeded randomness. No external data files are required.
Agents are given a single tool:
flip_cards(row1, col1, row2, col2): Flip two cards by specifying their positions (row1, col1) and (row2, col2). Cards are in a grid with rows and columns starting at 0.
MemoryGame is a multi-turn environment.
Easy to Moderate. Memory Game tests recall and pattern recognition, with difficulty scaling based on board size. The core mechanic is straightforward but requires tracking previously revealed cards.
This environment requires an OpenAI API key (passed via secrets) to power the LLM opponent.
Agents in MemoryGame interact only with a card-matching game and have no access to external systems, the internet, or sensitive data. The environment does not present safety risks.
@software{textarena2024,
author = {Guertler, Leon and Banting, Wilfried and Pignatelli, Eduardo},
title = {TextArena},
year = {2024},
publisher = {GitHub},
url = {https://github.com/LeonGuertler/TextArena}
}