Need a Cognitive Psychology Task? You’ve Come to The Right Place!

Overview

These are the tasks I made in PyCharm. I included both the .exe and .py files so you can either edit them for your own needs or run them as is. I want to let you know that the button inputs for these tasks were designed to use a Customized Bluetooth Number Pad, a Dioche Wired Button Pad, or an 8bitdo microcontroller in keyboard mode. I colored all of these for ease of access, but if you use a standard keyboard, the button layout may feel cramped. I will update and design some tasks specifically for keyboard users. (A Navon Task would be so much easier with a keyboard than with a gaming controller with paint on it) I think using controllers or an additional button is better than a standard keyboard for data collection, as the buttons are easier to learn and have a more comfortable, intuitive design.

I want to compare Python IDEs to Psytoolkit, an incredible website. Python has its benefits: it is more customizable than Psytoolkit and faster, but Psytoolkit is more comprehensive, easier to learn, and offers a more convenient way to save and share documents. You should try out both and use both. Psytoolkit has a beginner-friendly language and includes a library of about 50 prebuilt tasks/experiments that you can easily adapt for your own needs. I was able to make the RTID and the Attractive Lexical Decision Task on the same night on the website.

My final novice-level coding advance is that writing reference code is a great idea. Many of these scripts were patched from previous scripts I crafted. Do not be afraid or ashamed of vibe coding or using AI. I did that for most of these scripts. I tried to remove the AI-generated comments to improve the code. I, however, do not want to take credit for something that was AI-assisted or misrepresent my skillset. I am still learning and in the early phase of coding. That being said, if I can do this, you absolutely can too. So if you are interested, take the plunge, you can do it!

For peace of mind, the keyboard buttons are listed below.

| Green: i | Red: g | Blue: j | Yellow: h | White: l |

This link contains a skeleton outline of a typical Python script for experiments. I included instructions to explain what each section does. I'm no expert on Python; in fact, I'd consider myself a novice, but that's a good thing. If I can do this, then you can too. You do not need to be a master coder to use Python, nor should you. Python is something you should learn the basics of and take your time mastering, like everything else in life. But this code will serve as a useful baseline for tasks.

The next thing I want to learn is Django and HTML so that I can embed these tasks here.

Stroop Task

Rationale and Discussion

The Stroop task is a measure of executive function and impulse regulation. You will be shown words in blue, red, green, or yellow ink and must press the corresponding button. There are some variations of the Stroop Task, such as the Drug Stroop (Carpenter et al., 2006) and a Pain-Salient version (Roelofs et al., 2002).

I also include a scary stroop, which displays a frightening image for 300 milliseconds and then proceeds to the standard Stroop task. A task designed to mimic traumatic events as a way of measuring how similar stimuli can affect cognitive processing ability. There are multiple kinds of strops that can be accessed, including salient terms related to past traumatic events (Fan & Kang, 2025; Khanna et al., 2017; Ueda et al., 2025).

Face Emotional Recognition Task

Py File

pythonFERT

Executable files

FERT.exe

Keyboard version of executable

KeyboardFert.exe

Rationale and Discussion

The FERT is a task designed to assess bias in emotional processing by presenting different facial expressions alongside several other faces. This task asks you to sort faces into different emotional categories. Reaction time and accuracy are both assessed. Zhang and colleagues (2016) found that individuals with different personality disorders responded differently to the task. Individuals with Narsissistic Personality Disorder had worse performance on happy faces, and individuals with Anti-social Personality Disorder had only accuracy overall. Borderline personality disorder was not investigated, but has been investigated by other researchers (Wrege et al., 2021; Daros et al., 2013). Major Depressive Disorder was also investigated by Krause and colleagues (2021).

I would like to discuss some shortcomings in this task. I used AI to create the faces, and AI is not great at human emotions. Additionally, I intended this task to be diverse, but I included only three races and no ethnic subgroups, so it’s less diverse and therefore less transferable to real-world contexts. Although the differences in facial identification between individuals of different ethnic backgrounds are not major in real life, they are measured in milliseconds. Wong and colleagues (2020) discuss this more.

Postscript. I named the AI people April, June, May (for the women), and Julius, Augustus, and Caesar (for the men). I preferred themed names, so I chose the months/Roman emperors whose months were named after them.

Reaction Time Instrument for Depression

Py File

pythonRTID

Executable file

RTID.exe

Rationale and Discussion

My professor designed this task as an example of negativity bias in individuals with depression. Negativity bias is associated with certain symptoms of depression (Beevers et al., 2020). It’s a great task, and the code is a great reference for future codes.

Flanker

Py File

Here is the python file, feel free to download and edit.

Executable files

Because the flanker task requires only two buttons I just used the keyboard. I used the P and Q keys and the side of the keyboard they are match the direction of the middle flanker.

Flanker.exe

Rationale and Discussion

Dillon and colleagues (2015) investigated 100 subjects with MDD and 40 control subjects. They found that subjects with MDD were, on average, more accurate with incongruent (80% vs 76%) and were, on average, 30 milliseconds slower.

This was found to be significant in the study; however, the clusters remain very close together.

Li and colleagues (2024) found that individuals with schizophrenia showed greater flanker interference.

Overall, the flanker task shows little sensitivity and specificity across different psychopathologies. However, the task is a psychological classic and can be used as a distractor or as a second task in other research.

Navon Task

Py File

NavonTask.py

Executable file

I made this Navon.exe work for both a my custom controller and a keyboard!

Rationale and Discussion

De Fockert and Cooper (2014) is one excellent article that shows what I want to research one day. Their experiment had two condition groups, one with individuals with more severe self-reports of depression and the other with individuals with milder self-reports of depression. Individuals with higher self-reports of depression were slower at responding to the global Navon conditions when compared to the other group. This is in line with Frederickson’s Broaden and Build Theory (2004). I liked this because it reminds me of Maslow's Hierarchy of Needs (1943), but with cognition and actual quantifiable information. As such, I want to create this task for this website.

Libido Lexical Decision Tasks

Rationale and Discussion

Libido Lexical Decision Task Priming Tasks. These tasks require some explanations. This task came from Dr. Stephanie Cacioppo’s early research (Ortigue et al., 2008), in which she would show two names: one with emotional significance (the name of a partner or spouse) and one control name. She then had the subjects perform a lexical decision task and found that they responded faster to the first condition. I first read about this study in the book Wired For Love (2022), which I highly recommend. I wondered if attractiveness also influenced reaction time for a slightly more generalizable task. Although there are differences in individual opinions on what is attractive and cultural beauty standards, these tasks are probably not too generalizable, which is why I include the code. These all use nearly identical code (the PNG and the tuple of real and fake words), so you can just create them into something unique

I only included one, as they share the same code and differ only in the 5-letter words and the image. I have included the executables to demonstrate this, but as previously stated, these tasks are massive overgeneralizations regarding beauty standards. I chose Sabrina Carpenter and Chris Evans, and for a neutral image, a photo of a building on Lyell Avenue in Rochesrer NY (GO YELLOWJACKETS). Also, be sure to change the tuple, so the words for each condition are different, or else you’ll run into confounds of people responding faster to the words they’ve seen before.

Wisconsin Card Sorting Task

PY File:

Heres the ShapeWSCT.py script. Edit to your your hearts content!

Executables:

WCST.exe

DarkScreenWCST.exe

ShapeWCST.exe

AccessibleWSCT.exe

Rationale and Discussion

What is there not to love about the Wisconsin Card Sorting Task? It is elegant in its rules, the design is easy, you can make it with cards, it’s fun to do. This task was made by Berg (1948) and is still used today.

There’s a lot of interesting research on this task, and here are just a few of the studies I love. Ceceli and colleagues (2024) found that people in recovery from heroin use disorder improve on the task, and Goodkind and colleagues (2016) showed that performance improved after cognitive behavioral therapy in individuals with late-life depression. The task can even predict vaccine hesitancy (Pellegrini et al., 2024).

I, however, cannot take credit for any of this code. I relied entirely on an AI. I do not want to misrepresent my coding abilities, and I want to give credit where it is due. If you think any less of me for this, I cannot blame you. However, who cares that the code works and is fun? I created an alternative for individuals with the most common color deficiency (Red-Green), which I vibecoded in part using AI. I made others with a dark background and shapes. Pick your favorite. I gave you options!

Bias Related Tasks

Py Files

Same/DifferentFaceID.py

Executables

Standard Face ID

Scary Face ID

More Coming Soon…

Rationale and Discussion

Harvard’s Implicit Association Task (Greenwald et al., 1998) is one of the most influential cognitive tasks. It’s a useful tool that shows various implicit attitudes. It’s commonly used for race, gender, and sexuality, but it can be used for literally anything. The purpose of the task is not to demonstrate that everyone is bigoted, but to show that everyone has implicit attitudes and to understand how they manifest in behavior.

Understanding implicit attitudes is important for court hearings. Although the research suggests that implicit attitudes directly correlate with the severity of bigotry. Most people show a “Pro-white” implicit bias, but a vast majority of people will have explicit bias (Charlesworth & Banaji, 2022). This again demonstrates that implicit attitudes are separate from explicit behaviors. It is better to view this as an insight and to ensure you treat people fairly. Again, this is not a “political racism test,” it demonstrates implicit attitudes we all have.

The second tasks are for facial recognition. As Blank and colleagues demonstrated, there are millisecond differences in face recognition, so I designed a task in which participants had to do just that. Some faces will be identical; some will be of different genders or races; and some will be thatcherized (Thompson, 1980). You will be shown them and asked to respond. I set up a scary condition that’s supposed to startle you and take up some of your cognitive load. This is designed to mirror the story of Ron Cotton, who was falsely accused of sexual assault, not maliciously, but out of memory failures. The argument we can draw from this is that memory is fallible and insufficient for court proceedings alone; that the more evidence, the better for legal proceedings; that our legal system can make mistakes; and that understanding our implicit associations can inform legal proceedings.

I want to include a political implicit association task, as political discussion is full of in-group and out-group discussions, and I think this leads to some terrible arguments and even worse candidates. I developed a political implicit association task to demonstrate the implicit attitudes people hold when making political decisions. Do not misconstrue anything I write or display here as political. I prefer hearing the arguments and the reasons people hold those views, and forming my own conclusions after hearing them. I am not swayed by political philosophy, as it is merely a heuristic and an in-group/out-group mentality.

I want to re-emphasize that if anything, as this website is viewed as political, I assure you it is not, and I came to these conclusions based on research, which is why I include citations. With forensic psychology, there are no blanket statements, only arguments for specific cases, and you cannot enter into a new case with any previous information and feelings from a previous case.

N-backs

Py files

Coming Soon…

Executables

Coming Soon…

Rationale and Discussion

Coming Soon…

About The Page Designer, Ty DiPonzio

Ty DiPonzio is a Master’s in Clinical Mental Health Counseling Student at the University of Rochester. His career aspirations are to work as a Forensic Psychologist, Psychotherapist, and Adjunct Faculty Professor. His research interests are centered on Cognitive Performance across psychological tasks in different psychopathologies and on how these tasks can be used to measure and assess diagnoses, track improvement, predict treatment response, and predict future behavior relevant to Forensic Psychology examinations.

Ty graduated Cum Laude from The State University of New York at Geneseo. He joined both Psi Chi and Nu Rho Psi, honor societies for Psychology and Neuroscience, respectively. Because of his contributions to the Geneseo Psychology Department through events and charity drives, he was awarded the Outstanding Student Leadership Award in his senior year.

Ty is currently a Research Assistant for the Deep Structure in New York Lab (DeStiNY Lab). Here, he has worked on literature reviews, provided peer-review feedback, and is currently designing a research project for his Master's Thesis.

After Ty earns his Master’s Degree, he plans to pursue a PhD in Counseling Psychology, Clinical Psychology, or Behavioral Neuroscience to provide expert testimony as a Board Certified Forensic Psychologist and to practice as a psychotherapist. Ty hopes to continue research in the merit of cognitive tasks in psychotherapy particularly in the domains of memory, executive function, inhbition and impulsivity and hwo they relate to personality disorders, mood disorders, anxiety disorders and substance use disorders.

Ty is an avid reader with his favorite authors being Dr. Oliver Sacks, Dr. David Nutt, Dr. David Eagleman, Kurt Vonnegut, Will Eisner, Alan Moore and Aldous Huxley.

To learn more about Ty, you can click here to view his LinkedIn.

Further Reading Regarding Tasks

FERT:

Daros, A. R., Zakzanis, K. K., & Ruocco, A. C. (2013). Facial emotion recognition in borderline personality disorder. Psychological medicine, 43(9), 1953–1963. https://doi.org/10.1017/S0033291712002607

Krause, F. C., Linardatos, E., Fresco, D. M., & Moore, M. T. (2021). Facial emotion recognition in major depressive disorder: A meta-analytic review. Journal of affective disorders, 293, 320–328. https://doi.org/10.1016/j.jad.2021.06.053

Streit, M., Ioannides, A. A., Liu, L., Wölwer, W., Dammers, J., Gross, J., Gaebel, W., & Müller-Gärtner, H. W. (1999). Neurophysiological correlates of the recognition of facial expressions of emotion as revealed by magnetoencephalography. Brain research. Cognitive brain research, 7(4), 481–491. https://doi.org/10.1016/s0926-6410(98)00048-2

Wong, H. K., Stephen, I. D., & Keeble, D. R. T. (2020). The Own-Race Bias for Face Recognition in a Multiracial Society. Frontiers in psychology, 11, 208. https://doi.org/10.3389/fpsyg.2020.00208

Wrege, J. S., Ruocco, A. C., Carcone, D., Lang, U. E., Lee, A. C. H., & Walter, M. (2021). Facial Emotion Perception in Borderline Personality Disorder: Differential Neural Activation to Ambiguous and Threatening Expressions and Links to Impairments in Self and Interpersonal Functioning. Journal of Affective Disorders284, 126–135. https://doi.org/10.1016/j.jad.2021.01.042

Zhang, B., Shen, C., Zhu, Q., Ma, G., & Wang, W. (2016). Processing of facial expressions of emotions in Antisocial, Narcissistic, and Schizotypal personality disorders: An event-related potential study. Personality and Individual Differences, 99, 1–6. https://doi.org/10.1016/j.paid.2016.04.066

RTID

Beevers, C. G., Mullarkey, M. C., Dainer-Best, J., Stewart, R. A., Labrada, J., Allen, J. J. B., McGeary, J. E., & Shumake, J. (2019). Association between negative cognitive bias and depression: A symptom-level approach. Journal of abnormal psychology, 128(3), 212–227. https://doi.org/10.1037/abn0000405

Stroops:

Carpenter, K. M., Schreiber, E., Church, S., & McDowell, D. (2006). Drug Stroop performance: relationships with primary substance of use and treatment outcome in a drug-dependent outpatient sample. Addictive behaviors, 31(1), 174–181. https://doi.org/10.1016/j.addbeh.2005.04.012

DeVito, E. E., Kiluk, B. D., Nich, C., Mouratidis, M., & Carroll, K. M. (2018). Drug Stroop: Mechanisms of response to computerized cognitive behavioral therapy for cocaine dependence in a randomized clinical trial. Drug and alcohol dependence, 183, 162–168. https://doi.org/10.1016/j.drugalcdep.2017.10.022

Fan, L., & Kang, T. (2025). Early childhood trauma and its long-term impact on cognitive and emotional development: a systematic review and meta-analysis. Annals of medicine, 57(1), 2536199. https://doi.org/10.1080/07853890.2025.2536199

Khanna, M. M., Badura-Brack, A. S., McDermott, T. J., Embury, C. M., Wiesman, A. I., Shepherd, A., Ryan, T. J., Heinrichs-Graham, E., & Wilson, T. W. (2017). Veterans with post-traumatic stress disorder exhibit altered emotional processing and attentional control during an emotional Stroop task. Psychological medicine, 47(11), 2017–2027. https://doi.org/10.1017/S0033291717000460

Roelofs, J., Peters, M. L., Zeegers, M. P., & Vlaeyen, J. W. (2002). The modified Stroop paradigm as a measure of selective attention towards pain-related stimuli among chronic pain patients: a meta-analysis. European journal of pain (London, England), 6(4), 273–281. https://doi.org/10.1053/eujp.2002.0337

Ueda, N., Lin, M., Itoh, M., Hori, H., Narita, Z., Niwa, M., Ino, K., Narita, M., Nakano, W., Imai, R., Matsui, M., Kamo, T., & Kim, Y. (2025). Decreased non-emotional working memory capacity in women with PTSD: association with symptomatology. European journal of psychotraumatology, 16(1), 2543079. https://doi.org/10.1080/20008066.2025.2543079

Libido Lexical Decision:

Ortigue, S., Bianchi-Demicheli, F., Hamilton, A. F., & Grafton, S. T. (2007). The neural basis of love as a subliminal prime: an event-related functional magnetic resonance imaging study. Journal of cognitive neuroscience, 19(7), 1218–1230. https://doi.org/10.1162/jocn.2007.19.7.1218

Cacioppo, S. (2022) Wired For Love. Flat Iron Books.

Flanker Task

Dillon, D. G., Wiecki, T., Pechtel, P., Webb, C., Goer, F., Murray, L., Trivedi, M., Fava, M., McGrath, P. J., Weissman, M., Parsey, R., Kurian, B., Adams, P., Carmody, T., Weyandt, S., Shores-Wilson, K., Toups, M., McInnis, M., Oquendo, M. A., Cusin, C., … Pizzagalli, D. A. (2015). A computational analysis of flanker interference in depression. Psychological medicine, 45(11), 2333–2344. https://doi.org/10.1017/S0033291715000276

Li, Q., Xu, H., Ren, Q., He, S., Hu, K., & Li, C.-S. R. (2024). Schizophrenia patients show impaired bottom-up processing and attentional adjustment. Current Psychology: A Journal for Diverse Perspectives on Diverse Psychological Issues, 43(16), 14324–14334. https://doi.org/10.1007/s12144-023-05355-w

Navon Task

De Fockert, J. W., & Cooper, A. (2014). Higher levels of depression are associated with reduced global bias in visual processing. Cognition & emotion28(3), 541–549. https://doi.org/10.1080/02699931.2013.839939

Fredrickson B. L. (2004). The broaden-and-build theory of positive emotions. Philosophical Transactions of the Royal Society of London. Series B, Biological sciences359(1449), 1367–1378. https://doi.org/10.1098/rstb.2004.1512

Maslow, A. H. (1943). A theory of human motivation. Psychological Review, 50(4), 370–396. https://doi.org/10.1037/h0054346

Wisconsin Card Sorting Task

Berg, E.A. (1948). Journal of Experimental Psychology, 38, 404-411. A simple objective technique for measuring flexibility in thinking. Journal of Experimental Psychology, 39, 15-22.

Ceceli, A. O., Huang, Y., Gaudreault, P. O., McClain, N. E., King, S. G., Kronberg, G., Brackett, A., Hoberman, G. N., Gray, J. H., Garland, E. L., Alia-Klein, N., & Goldstein, R. Z. (2023). Recovery of inhibitory control prefrontal cortex function in inpatients with heroin use disorder: a 15-week longitudinal fMRI study. medRxiv:: the preprint server for health sciences, 2023.03.28.23287864. https://doi.org/10.1101/2023.03.28.23287864

Goodkind, M. S., Gallagher-Thompson, D., Thompson, L. W., Kesler, S. R., Anker, L., Flournoy, J., Berman, M. P., Holland, J. M., & O'Hara, R. M. (2016). The impact of executive function on response to cognitive behavioral therapy in late-life depression. International journal of geriatric psychiatry, 31(4), 334–339. https://doi.org/10.1002/gps.4325

Pellegrini, L., Clarke, A., Fineberg, N. A., & Laws, K. R. (2024). The inflexible mind: A critical factor in understanding and addressing COVID-19 vaccine hesitancy. Journal of psychiatric research, 179, 360–365. https://doi.org/10.1016/j.jpsychires.2024.09.028

Bias Related Task

Charlesworth, T. E. S., & Banaji, M. R. (2022). Patterns of Implicit and Explicit Attitudes: IV. Change and Stability From 2007 to 2020. Psychological science, 33(9), 1347–1371. https://doi.org/10.1177/09567976221084257

Greenwald, A. G., McGhee, D. E., & Schwartz, J. L. K. (1998). Measuring individual differences in implicit cognition: The implicit association test. Journal of Personality and Social Psychology, 74(6), 1464–1480. https://doi.org/10.1037/0022-3514.74.6.1464

Thompson P. (1980). Margaret Thatcher: a new illusion. Perception, 9(4), 483–484. https://doi.org/10.1068/p090483

Wong, H. K., Stephen, I. D., & Keeble, D. R. T. (2020). The Own-Race Bias for Face Recognition in a Multiracial Society. Frontiers in psychology, 11, 208. https://doi.org/10.3389/fpsyg.2020.00208