Skip to content

Repository files navigation

Reason to Play

Gameplay and conversation alongside human and model representational similarity matrices

Source code for Reason to Play: Behavioral and Brain Alignment Between Frontier LRMs and Human Game Learners.

Botos Csaba, Sreejan Kumar, Austin Tudor David Andrews, Laurence Hunt, Chris Summerfield, Joshua B. Tenenbaum, Rui Ponte Costa, Marcelo G. Mattar, Momchil Tomov

Landing Page · NeurIPS 2026 OpenReview · Behavioral & Representational Dataset

The study compares 32 human participants, scanned with fMRI, with models learning grid-world games written in VGDL. Participants and models infer the game rules through play. The analyses compare their behavior and internal representations.

TL;DR

  • Analyze the data: compare human and agent behavior or fit neural encoding models using the released dataset. Raw OpenNeuro downloads are not needed for these analyses.
  • Run new experiments: start with Setup and Quickstart for model gameplay and human replay. The workflow guides cover activation extraction and analysis.

For agent-assisted contributions, start with AGENTS.md.

Acknowledgement: This project would not have been possible without the invaluable contributions of the community. For projects that we heavily relied on are listed in THIRD_PARTY.md.

Setup

For behavioral and neural analysis from the derivative dataset:

python -m pip install -e '.[analysis]'

Minimal install (OpenRouter-backed gameplay and action-only human replay; no local GPU inference):

python -m pip install -e '.[lrm]'

For local model inference and activation extraction, follow the installation guide, including the GPU/runtime requirements for the selected model.

Quickstart

After installation, call the Python modules directly. Configuration overrides select the model, game, inputs and outputs. The workflow guide has the full examples and configuration details.

Generative gameplay uses an OpenRouter model and requires OPENROUTER_API_KEY:

python -m agents.lrm.play \
    game.game=bait_vgfmri4 \
    llm.backend=openrouter llm.model=<MODEL> \
    harness.rationale_mode=copied-reasoning

Human action-only replay (recorded keypresses, no model API call):

python -m agents.lrm.prepare_prompts \
    replay.subject=sub-01 \
    replay.data_dir=/absolute/path/to/behavior/human \
    harness.rationale_mode=action-only

Workflows

Task Guide
Run model gameplay or replay human actions Gameplay and replay
Extract model activations from replay traces Latent activation extraction
Preprocess fMRI and align behavior and features to scanner time Raw reconstruction and dataset analysis
Compare behavioral performance Behavioral analysis
Fit neural encoding models and aggregate their results Neural analysis
Run DDQN, EfficientZero and EMPA integrations Baselines
Align EfficientZero traces to processed BOLD samples EfficientZero features
Train EfficientZero with the optional pinned upstream submodule EfficientZero training

Use the documented Python modules and scripts directly. Workflow details live in these guides; AGENTS.md maps tasks to their implementations and tests. Keep the paper's study settings explicit when adapting an experiment. EfficientZero analysis and feature extraction use included code; only training requires initializing agents/efficientzero/training/.

Code layout

agents/              lrm/, ddqn/, efficientzero/, empa/
human/               Participant/game recordings and BOLD processing
analysis/            behavioral/ and neural/ comparisons
data/                Replay encoding, identifiers and value formats
environments/        VGDL interpreter and translated game definitions
experiments/         NeurIPS 2026 configurations by agent and analysis
reconstruction/      Optional processing from raw OpenNeuro data
docs/                Workflow guides, formats and preceding sources
tests/               Input, model and analysis checks
scripts/release/     Dataset inventory and catalogue preparation

Downloaded datasets live outside these source directories. Each agent's gameplay, training or feature extraction code lives with that agent; comparisons between humans and agents live in analysis/.

Data

The accompanying Hugging Face dataset contains human gameplay, model prompts and activations, processed fMRI, and analysis results. Use the verified snapshot for reproducible downloads. The dataset card describes the files and download examples.

The original raw human data are available in OpenNeuro ds004323 v1.0.0. Those datasets and LRM model weights are separate from this code checkout.

Citation

@inproceedings{botos2026reasontoplay,
  title = {Reason to Play: Behavioral and Brain Alignment Between Frontier {LRMs} and Human Game Learners},
  author = {Botos, Csaba and Kumar, Sreejan and Andrews, Austin Tudor David
            and Hunt, Laurence and Summerfield, Chris and Tenenbaum, Joshua B.
            and Ponte Costa, Rui and Mattar, Marcelo G. and Tomov, Momchil},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  note = {Accepted at NeurIPS 2026},
  url = {https://openreview.net/forum?id=Y1oX1yuaWM}
}

License

Original project code and newly created research artifacts are released jointly under MIT. Upstream material retains its existing terms: THIRD_PARTY.md records component licenses and attribution, including CC0 for the original OpenNeuro data and separate model-weight terms.

About

Source code for Reason to Play [NeurIPS '26]

Topics

Resources

Stars

8 stars

Watchers

1 watching

Forks

Contributors

Languages