Build Wisconsin Card Sorting Task

Hi, everyone. I am a beginner of PsychoPy and I don’t have any experience with coding and programming. I have little time to create WCST and have came crossed lots of problems when I building the experiment. These questions are very basic but I don’t know the answers. The first question is that whether I need to create stimuli by myself or I can import images as stimuli. The second question is that how to set the code so that the participant will be told that they have selected the wrong card.

Thank you in advance! It will be really appreciated if anyone can answer my questions!

Thank you! How can I contact with you?

Hi There,

Here is a pre-made WCST that might help you with your experiment. Julia Sadka / Wisconsin Card Sorting Task · GitLab

Hope this helps!

1 Like

Thank you for sharing!! I will check it as soon as possible:))

Best regards,

Hey Becca

Can I find BART, Tower London and Stroop as well? I have no coding experience and need the scripts due to less time. If possible can you help me with this

Hi There,

Search and look under the “Explore” tab there are lots of openly available experiments that could help you :slight_smile:


Hi Becca,

I am trying to run the task you mention above but am having problems (outlined in my post below)

Do you know why this error might be occurring?

Best wishes,


I’ve just done some work on the WCST task to get it working online in 2022.1.2 and also on mobile devices.

You can find it here

And also in the demo namespace

TY @wakecarter for this fully built WCST!

As a newbee I just have one question:

You have 3 blocks of 64 stimuli each. One block ends after 7 presentations (ntrials == 6). Does this mean that I could increase nReps=9 in the blocks prompt without showing the same stimuli again?

Why do I ask this? The task is rather short and I would love to have more blocks per experimental run to acquire more data per person…

Hi. At the moment I have a piece of code which says if trials.thisN == 6: trials_finished = true. This number could be increased if you wanted longer runs of the same rule. Alternatively, you can increase the nReps of the outer loop to repeat the set of three rules more often (currently nReps = 2).

I was getting an error on my iPhone6 for demo based on this task (, so I recoded the way it selects trials. However, this version (coded in 2021.1.2) seems to be fine. There is an issue that the fourth rule can be the same as the third since it runs through sets of three rules.

1 Like