Skip to content

Match to sample

Show a sample stimulus, then an array of choices in shuffled positions, scoring the matching choice correctly wherever it appears.

Use this for match-to-sample and delayed match-to-sample designs: a sample appears alone, disappears, and an array of choices follows; the participant picks the item that matches the sample. The choice positions must vary so the answer cannot be learned as a location, the sample itself must never wander into the array, and scoring must follow the matching stimulus wherever it lands. All of that fits in one trial row.

typecontentstimFormatstimstimScreensstimOrderpresTimeISIkeybutton1
instructionsYou will briefly see one picture, then four pictures. Click the one that matches.NEXT
test.jpgsampleA;matchA;foilA1;foilA2;foilA31+4random(pin 1@1)1000500stim2
test.jpgsampleB;matchB;foilB1;foilB2;foilB31+4random(pin 1@1)1000500stim2
test.jpgsampleC;matchC;foilC1;foilC2;foilC31+4random(pin 1@1)1000500stim2

Each row lists five stimuli in stim: the sample first, then the correct match, then three foils. stimScreens = 1+4 splits them into two screens, the sample alone and the four choices together, and the timing columns read plainly against that structure: presTime = 1000 shows the sample for one second, and with one entry fewer than the number of screens the choice array deliberately has no duration, staying up until the response. ISI = 500 is the retention gap between sample offset and array onset.

stimOrder = random(pin 1@1) pins the first authored stimulus (the sample) to position 1, and everything unpinned shuffles across the remaining positions. The effect is exactly the paradigm’s requirement: the sample always opens the trial, and the four choices land in a fresh arrangement drawn once per session, recorded in the stimOrder_actual results column so the analysis can see where the match actually appeared.

Scoring follows the content through the shuffle: key = stim2 names the authored second stimulus (the match), and with no keyboard, buttons, or response type on the row, the choice images are clickable; the trial scores correct when the clicked image is the match, whichever array position it occupies.

  • Longer retention intervals for delayed match to sample: raise ISI to 3000 or more; the structure is unchanged.
  • Simultaneous match to sample: stimScreens = 5 with a stimPos layout placing the sample centrally above the choices, keeping the same pin and scoring.
  • More or fewer choices: adjust the list and the second screen count (1+6 with five foils), leaving the pin and key = stim2 untouched.
  • A response deadline: responseWindow = 4000 records timeout and moves on when no choice is made.
  • Sample also floating: drop the pin entirely and every stimulus shuffles, or pin the match instead (random(pin 2@3)) to fix where the answer appears while the rest shuffle.