Skip to content

Tutorial: Wisconsin Card Sorting Test

This guide walks you through building the Wisconsin Card Sorting Test (WCST) from scratch in Testable. By the end you will know how to:

  • Set up stimulus presentation for the WCST
  • Enable participant click responses and control timings
  • Define sorting rules and feedback
  • Collect and analyse WCST data

  • Originally developed by David Grant and Esta Berg in 1948
  • Measures the ability to flexibly adapt to changing reinforcement schedules, that is, how fast someone can adapt to a new rule after a different rule was previously learned and rewarded
  • Routinely used as a measure of frontal lobe dysfunction

Participants see a deck of cards (the “target”) and must match each card to one of 4 piles. They are not told the sorting rule; they must discover it through trial and error.

  1. Each card has three properties: colour, shape, and number of objects
  2. Cards must be sorted by one of these properties (e.g. all red cards on the red pile)
  3. Participants are told after each trial whether they matched correctly or incorrectly
  4. After a certain number of trials, the rule changes without warning; participants must notice and adapt
MetricDescription
Total errorsHow often the participant matched incorrectly
Perseverative errorsIncorrect matches that would have been correct under the previous rule
Perseverative/total ratioProportion of errors explained by failure to adapt

Use the Quick project button on your project dashboard. Select click-on-stimulus as the response type (this is the default), so you won’t need a responseType column in the trial file.

The WCST uses only image stimuli representing cards. You need cards covering all combinations of:

  • Shape: star, circle, triangle, cross (4 options)
  • Colour: red, yellow, blue, green (4 options)
  • Number of shapes: 1, 2, 3, 4 (4 options)

That gives 4 × 4 × 4 = 64 cards with a unique feature combination.

Go to the Stimuli section of your project and upload all card images by dragging and dropping them onto the upload field, or by uploading a zip file of all images.


Download the .csv from the Trial File section of your project, or open it directly in the built-in editor.

The four pile images are displayed the same way every trial. Set them up using:

  • stim1, stim2, stim3, stim4: one column per pile
  • stimFormat: the file extension for your images (e.g. .jpg)

Each trial row will use the same four pile images.

Use the target column to specify a different target card for each trial. Each row should reference a different card that the participant needs to sort.

Define the correct response (sorting rule)

Section titled “Define the correct response (sorting rule)”

Use the key column to specify which pile is correct for each trial:

  • The leftmost pile = 1, rightmost pile = 4
  • Enter the pile number that matches the active sorting rule for that card

This is how you encode rule changes: simply change the key values in the trial file wherever the rule switches.

The feedback column defines what participants see after each trial. Format:

correct:RIGHT!;incorrect:WRONG!;timeout:TOO SLOW!
OptionWhen shown
correct:Participant sorted correctly
incorrect:Participant sorted incorrectly
timeout:Response window elapsed

Use feedbackTime to specify how long the feedback is displayed (in milliseconds). For example, feedbackTime = 1000 shows feedback for one second.

Limit how long participants have to respond using the responseWindow column (in milliseconds). For example, 10000 gives participants 10 seconds per card.

To show participants their live progress through the experiment, add a counterTrial column and enter 1 for each trial that should display the counter.

You can add your own columns such as condition1 to help organise your trial file. Custom columns do not affect the experiment and will be passed through to your results file.


Once participants have completed the WCST, download their results from the Results section. See Results Formats for the available download options.

The results file includes all trial file columns plus additional columns for participant responses, timings, and demographics.

The correct column records whether each response was accurate (1 = correct, 0 = incorrect). Treat timeouts as incorrect.

Total error count = total number of trials − sum of the correct column.

Perseverative errors occur when a participant sorts incorrectly under the current rule, but the response would have been correct under the previous rule, indicating failure to update their sorting strategy.

To calculate:

  1. Create an alternative key column reflecting the previous rule.
  2. Compare the actual response column values to this alternative key.
  3. Responses that match the previous rule (but not the current rule) are perseverative errors.

Example: 12 total errors, 4 of which are perseverative → perseverative/total ratio = 0.33.

A high perseverative/total ratio suggests the participant struggled to adapt to rule changes, which may indicate reduced cognitive flexibility associated with frontal lobe dysfunction.