Card Games Experiments

About this project

This is an open-source experimental platform for studying how people learn compositional rules from examples. Participants see hands of playing cards labeled by category and must discover the hidden rule that generated them. Rules are specified in typed lambda calculus, enabling principled metrics of complexity and systematic study of transfer between structurally related rules.

The platform is part of a research project on self-explanation and program induction, investigating whether prompting learners to explain material to themselves shifts them from shallow feature-matching toward deeper compositional understanding. A companion computational modeling system (DreamCoder-inspired program synthesis) generates quantitative predictions that are tested against behavioral data collected here.

How this page is organized

The links below are organized into three groups. Main Experiments contains the two experimental paradigms that participants complete — these are the core data-collection instruments of the project. Analysis Tools provides interactive visualizations used for experiment design (selecting rule pairs, assessing confusability). Other includes standalone components (tutorial, protocol recording) that can be explored independently. Together, these components form the full experimental pipeline: we design rule sets using the analysis tools, deploy experiments via the main paradigms, and collect behavioral data that is compared against predictions from the companion computational model.

Active development (February 2026): This platform is under active development and is meant to showcase the current stage of the project. The standard experiment and two-category paradigm are functional, but the interface, rule set, and experimental flow may still be modified as the project progresses. Other components (self-explanation conditions, verbal protocol recording, analysis tools) are at various stages of completion — some may behave unexpectedly or show placeholder content. Source code: github.com/konukcan/card-games (MIT License).

Experiment Configuration

The experiment is fully configurable via URL parameters. The controls below let you adjust settings that are automatically appended to all experiment links on this page. For a quick preview, just leave the defaults and click any experiment link. Key options: Deck Size controls how many cards are in play (smaller decks make rank-based patterns more salient); Gallery Size sets how many labeled examples participants see initially; Self-Explain enables the self-explanation prompt (the core experimental manipulation); Neg. Sampling controls whether non-matching hands are generated by random draw or by mutating a single card from a matching hand (mutation creates harder, more controlled contrasts).

Main Experiments

Analysis Tools

Experimental

Other

Developer Tools

Common URL Parameters
ParameterValuesEffect
save=locallocalForce CSV download (no DataPipe)
clear=11Clear session state (fresh start)
deckSize52, 32, 28Deck size (32 = 7-A only)
gallerySize3, 4, 5Hands per category in gallery
negativeSamplingmutation, randomHow losing hands are generated
curriculum1-1 to 12-4Latin square condition
ruleRule IDSingle rule mode
testModeternary, binaryA/B/Neither or A/B only (two-cat)
stimulifixed, randomFixed JSON or random sampling (two-cat)
pairIde.g. r60x_r23xForce specific pair (two-cat single-pair)
conditionc1-1 to c2-8Latin square condition (two-cat curriculum)

Console Commands (F12)

DevTools.skip()
DevTools.skipToTest()
DevTools.skipToRule(2)
DevTools.skipToDemographics()
DevTools.info()

Example URLs

dispatcher.html?save=local&clear=1
experiment.html?rule=Sorted_by_rank&save=local
two_category_prototype.html?condition=c1-3&save=local
two_category_prototype.html?pairId=r60x_r23x&testMode=binary&save=local
experiment.html?curriculum=3-2&deckSize=32