Adaptive staircase
Home in on a participant’s detection threshold by making trials harder after correct answers and easier after misses.
When to use it
Section titled “When to use it”Use this when the interesting quantity is a threshold (the faintest contrast, the shortest duration, the smallest difference a participant can still detect) rather than accuracy at one fixed difficulty. Presenting every difficulty level equally often wastes most trials far above or below the threshold, where performance is at ceiling or at chance and carries little information. An adaptive procedure concentrates trials where the participant’s limit actually lies, giving a usable estimate from far fewer trials. If you need a full psychometric function across the whole difficulty range, or difficulty cannot be expressed as an ordered set of rows, use a fixed design with random presentation instead.
Trial file
Section titled “Trial file”| type | title | content | stimFormat | stim1 | keyboard | key | responseWindow | staircase | button1 |
|---|---|---|---|---|---|---|---|---|---|
| instructions | Spot the ring | A faint ring will flash on each trial. Press SPACE as soon as you see it. If you saw nothing, wait and the next trial will start by itself. | NEXT | ||||||
| test | .png | ring_c90 | space | space | 1500 | detect: start 2 correct 2 incorrect 1 reversals 6 trials 30 | |||
| test | .png | ring_c70 | space | space | 1500 | detect | |||
| test | .png | ring_c50 | space | space | 1500 | detect | |||
| test | .png | ring_c35 | space | space | 1500 | detect | |||
| test | .png | ring_c25 | space | space | 1500 | detect | |||
| test | .png | ring_c15 | space | space | 1500 | detect | |||
| test | .png | ring_c10 | space | space | 1500 | detect | |||
| instructions | Done | Threshold block complete. Press NEXT to continue. | NEXT |
type,title,content,stimFormat,stim1,keyboard,key,responseWindow,staircase,button1 instructions,Spot the ring,"A faint ring will flash on each trial. Press SPACE as soon as you see it. If you saw nothing, wait and the next trial will start by itself.",,,,,,,NEXT test,,,.png,ring_c90,space,space,1500,detect: start 2 correct 2 incorrect 1 reversals 6 trials 30, test,,,.png,ring_c70,space,space,1500,detect, test,,,.png,ring_c50,space,space,1500,detect, test,,,.png,ring_c35,space,space,1500,detect, test,,,.png,ring_c25,space,space,1500,detect, test,,,.png,ring_c15,space,space,1500,detect, test,,,.png,ring_c10,space,space,1500,detect, instructions,Done,Threshold block complete. Press NEXT to continue.,,,,,,,NEXT
How it works
Section titled “How it works”The seven rows sharing the staircase ID detect form one contiguous block, ordered easiest to hardest: row position is the difficulty level, here ring images of decreasing contrast (basenames in stim1, the .png extension supplied by stimFormat). The parameters after the colon are read only from the first row of the block; the later rows just repeat the bare ID. Keep the ID to a single plain word, because parameter names are matched anywhere in the cell and an ID like my up 2 test would silently set a parameter.
Each trial is scored through the ordinary response machinery, which is what drives the steps. keyboard accepts only space, key marks that press correct, and the numeric responseWindow of 1500 records a timeout response when nothing is pressed in time, which fails the key check and counts as incorrect. With correct 2 and incorrect 1 the block runs a classic 2-down 1-up rule: two accumulated correct answers move one row down (harder), a single miss moves one row up (easier), and this rule converges near 71 per cent correct detection. start 2 begins at the second level rather than the hardest or easiest extreme. Until a move triggers, the same row simply repeats, and the counters reset after every move.
The staircase ends after 6 reversals, or once more than 30 trials have run, or when a step leaves the block’s row range. Its final trial is flagged in the staircaseResult results column, and the participant continues with the first trial after the block, here the closing instructions row. That row is not decoration: if nothing follows the staircase, the run stops with the error “Could not find the last trial of this staircase group”. Two side effects worth knowing: rows carrying a staircase value are exempt from shuffling, and staircase repetitions do not advance the sequential trial counter, so a progress bar stalls during the block.
Variations
Section titled “Variations”- Interleave two independent staircases by giving both the same
groupnumber instaircase(for example one starting easy and one starting hard); at each step a random unfinished member of the group runs next. - Let good performers descend faster before the first reversal with a
boostparameter instaircase, for exampleboost 2. - Shift the convergence point by changing the
correctcount instaircase:correct 3 incorrect 1tracks a higher accuracy level than 2-down 1-up. - Refine the difficulty grid by inserting more rows with the same
staircaseID; the block is defined by the contiguous rows that share it, and steps move through whatever levels you provide.