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
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"
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.
10 minutes
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.
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 are provided by Millisecond.
To edit the instructions go to script 'colorshapetask_shiftingtask_instructions_inc.iqjs'
File Name: colorshapetask_shifttask_summary*.iqdat
| Name | Description |
|---|---|
| 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 |
File Name: colorshapetask_shifttask_raw*.iqdat
| Name | Description |
|---|---|
| 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 |
The procedure can be adjusted by setting the following parameters.
| Name | Description | Default |
|---|---|---|
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 height | 20% |
| cuePosition | Sets the vertical cue position in canvas percentages | 20% |
Timing Parameters |
||
| readyDuration | The duration (in ms) of the get ready trial | 2000 |
| iti | The duration (in ms) of the intertrial interval | 600 |
Exp. Design Parameters |
||
| numberOfTestTrials | Number of test trials per test block | 48 |
| numberOfTestBlocks | Number of test blocks to run | 4 |
Practice |
||
| numberPracticeTrials | Number of practice trials per practice block | 48 |
| minPracticeAcc | Minimum practice proportion correct to advance to test | 0.85 |
| maxNumberPracticeBlocks | Max. number of practice blocks run if performance is below minPracticeACC | 5 |
| 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" |