Cognitive Science and Education Research Open access Peer reviewed

The samplr package: A tool for modeling human cognition with sampling algorithms

Lucas Castillo, Yun-Xiao Li, Adam N. Sanborn

Behavior Research Methods | Oct 14, 2026

Scollr summary

What this paper is about

The samplr package, which includes a variety of sampling algorithms and cognitive models built upon them, is introduced, which shows how models in this package can match qualitative patterns found in human data, and walks readers through examples of how to compare these models quantitatively to human data.

Full abstract

Read the full abstract

Many models of cognition have sampling as a central component. Researchers have used them to explain human performance across a wide range of tasks involving perception, probability reasoning, and choice. One family of these models takes inspiration from sampling approaches developed in statistics, either by adjusting samples with prior beliefs or by implementing a sampling algorithm that overcomes the difficulty of independent samples at the expense of autocorrelation. While these models have been successful in modeling human behavior, their adoption has been slowed by the technical difficulties in applying them. Here, we introduce the samplr package, which includes a variety of these algorithms and cognitive models built upon them. We show how models in this package can match qualitative patterns found in human data, and walk readers through examples of how to compare these models quantitatively to human data. This tool aims to make these methods accessible to many more researchers.

Direct answer

What can I do from this paper page?

Use this page to scan "The samplr package: A tool for modeling human cognition with sampling algorithms" quickly: start with the summary and abstract, then check the authors, source, topics, and related papers. From here, open Scollr to follow Cognitive Science and Education Research, save the paper, or map adjacent work.

Authors

Researchers on this paper

Lucas Castillo

first | University of Warwick | ORCID 0000-0003-0274-0777

Yun-Xiao Li

middle | University of Warwick | ORCID 0000-0002-3509-6618

Adam N. Sanborn

last | University of Warwick | ORCID 0000-0003-0442-4372

Research areas

Follow related topics

Citation

BibTeX

@article{Castillo2026samplr,
  title = {The samplr package: A tool for modeling human cognition with sampling algorithms},
  author = {Lucas Castillo and Yun-Xiao Li and Adam N. Sanborn},
  journal = {Behavior Research Methods},
  year = {2026},
  doi = {10.3758/s13428-026-03188-6},
  url = {https://doi.org/10.3758/s13428-026-03188-6}
}

FAQ

Using this paper in a discovery workflow

How do I find related work for this paper?

Use the related papers and topic links on this page as starting points. In Scollr, you can also open the paper and build a literature map around its references, citing papers, and related work.

How can I keep up with new Cognitive Science and Education Research papers?

Follow Cognitive Science and Education Research in Scollr. New papers from the topic flow into a personalized feed, and you can save useful studies to revisit later.

Can I cite this paper from this page?

This page includes a static BibTeX block for The samplr package: A tool for modeling human cognition with sampling algorithms. Always verify the DOI, source, and publication details against the publisher record before submitting a manuscript.

Follow this research in Scollr

Follow the topics and authors behind this paper, save useful studies, and build a literature map when you are ready to go deeper.

Get the app