Color Shape Shifting Task

Technical Manual

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com), Millisecond

Created: January 11, 2018

Last Modified: January 24, 2026 by K. Borchert (katjab@millisecond.com), Millisecond

Script Copyright © Millisecond Software, LLC

Background

This default script implements a simple mixed-design Color Shape Task based on Friedman et al (2008). The mixed-design Color Shape Task is considered a measure of Executive Functioning of 'Set Shifting' abilities, defined as 'the ability to flexibly switch back and forth between tasks or mental sets'.

Note: The (almost) full design (including blocked conditions) described by Miyake et al (2004) can be run by Millisecond's "colorshapetask.iqjs"

References

Miyake, A., Emerson, M.J., Padilla, F., & Ahn, J.C. (2004). Inner speech as a retrieval aid for task goals: the effects of cue type and articulatory suppression in the random task cuing paradigm. Acta Psychologica, 115, 123–142.

Friedman, N. P., Miyake, A., Young, S. E., DeFries, J. C., Corley, R. P., & Hewitt, J. K. (2008). Individual differences in executive functions are almost entirely genetic in origin. Journal of Experimental Psychology: General, 137, 201–225.

Duration

10 minutes

Description

Participants are presented red or green circles or triangles and have to either sort the stimuli by shape or by color as fast as they can. Participants are given cues before each stimulus appears that inform them which characteristic (color vs shape) to focus on.

Procedure

Default Set-Up:
(a) Training Block: with error feedback for 1000ms (default) after an incorrect response and before ITI
- default: 48 trials (+ plus starttrial) per block; can be set under EDITABLE CODE -> Editable Values -> parameters.numberpracticetrials

By default, participants have to reach "minPracticeACC" (default: 85% correct) before they can move on to the test blocks.
If participants do not reach the allotted practice performance within 5 (default) practice blocks, the script
automatically aborts (by default). Check settings for practice parameters under section EDITABLE PARAMETERS.

(b) Test Blocks: no error feedback
- 4 test blocks (default, change under section Editable Parameters):
- 48 trials (+ plus starttrial) per block; can be set under EDITABLE CODE -> Editable Values -> parameters.numberOfTestTrials
Trial Sequence:
- The sampling of stimuli is done randomly without replacement
- The intertrial interval (ITI) between response and presentation of next stimulus is parameters.iti
- a rest trial is presented after parameters.trialstoRest (-> editable value), default: halfway through the block

- number of switch and repeat trials in each test block is controlled via EDITABLE CODE -> Editable Lists -> list.shiftrepeat_frequency
=> default: 50% switch; 50% repeat trials => 24 shift; 24 repeat trials
=> number of color and number of shape tasks will vary between participants

- by default, participants are given performance feedback after each block (-> page.blockfeedback)


Trial Sequence:
-> Cue for SOA (default: 500ms -> see editable list.SOAs)
-> Cue + Shape until response
-> blank iti (default: 600ms)

Additional notes:
•Response key assignment: counterbalanced by groupnumber (4 different groupnumbers) -> set in section EXPERIMENT

1: red and circle on one response key (default: A)
2: red and triangle on one respone key (default: L)
3: red and triangle on one response key (default: A)
4: red and circle on one respone key (default: L)

Stimuli

Stimuli and cues provided by Millisecond. The stimuli can be edited under
EDITABLE CODE -> Editable Stimuli (item.stimuli).
The cue stimuli are currently language dependent (use the first letter of the word s(hape) and c(olor))
and are listed in script 'colorshapetask_shiftingtask_instructions_inc.iqjs'

This script presents the cues as images. You can run any images you want (e.g. symbols or words or letters).
By default, this script runs with letter cues but the script also comes with symbol cue images.

Instructions

Instructions are provided by Millisecond.
To edit the instructions go to script 'colorshapetask_shiftingtask_instructions_inc.iqjs'

Summary Data

File Name: colorshapetask_shifttask_summary*.iqdat

Data Fields

NameDescription
inquisit.version Inquisit version number
computer.platform Device platform: win | mac |ios | android
computer.touch 0 = device has no touchscreen capabilities; 1 = device has touchscreen capabilities
computer.hasKeyboard 0 = no external keyboard detected; 1 = external keyboard detected
startDate Date the session was run
startTime Time the session was run
subjectId Participant ID
groupId Group number
sessionId Session number
elapsedTime Session duration in ms
completed 0 = Test was not completed
1 = Test was completed
group Group number
countPracticeBlocks Number of practice blocks run
practiceAcc Proportion correct during the last practice run
practicePass 1 (yes)= participant passed practice (proportion correct >= minPracticeACC = 0.85 by default)
0 (no) = participant did not pass practice (proportion correct < minPracticeACC = 0.85 by default)
abortPractice 1 (yes)= practice is aborted if participant fails practice after max. 5 (default) practice blocks
0 (no)= participant moves on to practice even if practice performance does not reach criterium
countTestBlocks Number of test blocks run
Summary Variables: Updated For Each Test Block Trial By Trial (Trial.Firsttask Excluded From Summary Variables)
accColor.itemCount Counts the number of color trials
percentCorrectColor Percent correct of color responses
meanrtColor Mean rt of correct color responses
accShape.itemCount Counts the number of shape trials
percentCorrectShape Percent correct of shape responses
meanrtShape Mean rt of correct shape responses
accRepeat.itemCount Counts the number of repeat trials
percentCorrectRepeat Percent correct of repeat responses
meanrtRepeat Mean rt of correct repeat responses
accShift.itemCount Counts the number of shift trials
percentCorrectShift Percent correct of shift responses
meanrtShift Mean rt of correct shift responses
switchCost Calculates the switch costs as the mean reaction-time difference between (correct) switch and (correct) repeat trials.
positive => it took on average longer to respond to shift trials

Raw Data

File Name: colorshapetask_shifttask_raw*.iqdat

Data Fields

NameDescription
build Inquisit version number
computer.platform Device platform: win | mac |ios | android
computer.touch 0 = device has no touchscreen capabilities; 1 = device has touchscreen capabilities
computer.hasKeyboard 0 = no external keyboard detected; 1 = external keyboard detected
date Date the session was run
time Time the session was run
subject Participant ID
group Group number
session Session number
blockcode The name the current block (built-in Inquisit variable)
blocknum The number of the current block (built-in Inquisit variable)
trialcode The name of the currently recorded trial (built-in Inquisit variable)
trialnum The number of the currently recorded trial (built-in Inquisit variable)
trialnum is a built-in Inquisit variable; it counts all trials run
even those that do not store data to the data file.
group Group number
countPracticeBlocks A running counter of the practice blocks run
countTestBlocks A running count of the test blocks run
countTrials A running count of the trials run in a block (resets after each block)
does not count the first trial
shape Stores the shape of the current stimulus (circle/triangle)
color Stores the color of the current stimulus (green/red)
categorizationTask The type of primary task: "Color" vs. "Shape"
shiftTask "Shift" vs. "Repeat"
soa Stores the current SOA in ms (stimulus onset asynchrony btw. onset of cue and onset of shape)
responseKeyMapping Stores whether the mapping of responsekeys for the current shape and color
are consistent in mixed task (e.g. consistent = shape AND color are mapped onto same response key)
stimulusItem Stores the cue stimulus
stimulus Stores the last presented red/green/circle/triangle stimulus
response The participant's response (scancode of response: default 30 -> A; 38 -> L)
responseCategory The interpreted response based on response scancode
Shape trials: "Circle" vs. "Triangle"
Color trials: "Red" vs. "Green"
correct The correctness of the response
latency The response latency (in ms); measured from onset of stim

Parameters

The procedure can be adjusted by setting the following parameters.

NameDescriptionDefault
Stim Sizing Parameters
stimHeight Sets the size of the stimulus as a percentage of monitor height
Miyake et al (2004. p.128)
- the size of the color patch was roughly 36mm
25%
cueHeight Sets the height (size) of the cues as a percentage of monitor height20%
cuePosition Sets the vertical cue position in canvas percentages20%
Timing Parameters
readyDuration The duration (in ms) of the get ready trial2000
iti The duration (in ms) of the intertrial interval600
Exp. Design Parameters
numberOfTestTrials Number of test trials per test block 48
numberOfTestBlocks Number of test blocks to run4
Practice
numberPracticeTrials Number of practice trials per practice block48
minPracticeAcc Minimum practice proportion correct to advance to test0.85
maxNumberPracticeBlocks Max. number of practice blocks run if performance is below minPracticeACC5
abortPractice True (1): if participant's practice performance is still under minPracticeACC
after the last practice block, then the script quits prematurely
false (0): all participants start test regardless of practice acc at the end of the last
practice block
true
Response Keys
responseKeyLeft Left response key (left on QWERTY keyboard)"A"
responseKeyRight Right response key (right on QWERTY keyboard)
response keys to shape and color are counterbalanced by groupnumbers
"L"