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
Background: The WCST
Section titled “Background: The WCST”History and purpose
Section titled “History and purpose”- 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
How it works
Section titled “How it works”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.
- Each card has three properties: colour, shape, and number of objects
- Cards must be sorted by one of these properties (e.g. all red cards on the red pile)
- Participants are told after each trial whether they matched correctly or incorrectly
- After a certain number of trials, the rule changes without warning; participants must notice and adapt
Key metrics
Section titled “Key metrics”| Metric | Description |
|---|---|
| Total errors | How often the participant matched incorrectly |
| Perseverative errors | Incorrect matches that would have been correct under the previous rule |
| Perseverative/total ratio | Proportion of errors explained by failure to adapt |
Part 1: Setting up the experiment
Section titled “Part 1: Setting up the experiment”Create a new project
Section titled “Create a new project”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.
Prepare your stimuli
Section titled “Prepare your stimuli”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.
Upload stimuli to Testable
Section titled “Upload stimuli to Testable”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.
Part 2: Setting up the trial file
Section titled “Part 2: Setting up the trial file”Access the trial file
Section titled “Access the trial file”Download the .csv from the Trial File section of your project, or open it directly in the built-in editor.
Define the sorting piles (static stimuli)
Section titled “Define the sorting piles (static stimuli)”The four pile images are displayed the same way every trial. Set them up using:
stim1,stim2,stim3,stim4: one column per pilestimFormat: the file extension for your images (e.g..jpg)
Each trial row will use the same four pile images.
Define the target card (dynamic stimulus)
Section titled “Define the target card (dynamic stimulus)”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.
Set up feedback
Section titled “Set up feedback”The feedback column defines what participants see after each trial. Format:
correct:RIGHT!;incorrect:WRONG!;timeout:TOO SLOW!| Option | When 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.
Set a response window
Section titled “Set a response window”Limit how long participants have to respond using the responseWindow column (in milliseconds). For example, 10000 gives participants 10 seconds per card.
Optional: display a trial counter
Section titled “Optional: display a trial counter”To show participants their live progress through the experiment, add a counterTrial column and enter 1 for each trial that should display the counter.
Optional: add custom condition columns
Section titled “Optional: add custom condition columns”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.
Part 3: Analysing WCST results
Section titled “Part 3: Analysing WCST results”Access your results
Section titled “Access your results”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.
Calculating total errors
Section titled “Calculating total errors”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.
Calculating perseverative errors
Section titled “Calculating perseverative errors”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:
- Create an alternative
keycolumn reflecting the previous rule. - Compare the actual
responsecolumn values to this alternative key. - 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.
Interpreting results
Section titled “Interpreting results”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.
Next steps
Section titled “Next steps”- Explore more trial file features in the Feature Manual
- Learn about Feedback for more complex feedback configurations
- Learn about Randomisation to vary trial order