Predictable Task Switching Task

Technical Manual

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

Created: January 14, 2017

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

Script Copyright © Millisecond Software, LLC

Background

This script implements a predictable alternating-runs paradigm switching task, an executive function task

The implemented procedure is based on:

Rogers, R. D., & Monsell, S. (1995). The costs of a predictable switch between simple cognitive tasks. Journal of Experimental Psychology: General, 124, 207–231.

Duration

the default set-up of the script takes appr.: Practice: ~15minutes Test: ~40minutes _____________________ Total: ~55minutes

Description

This task switching task uses two simple categorization tasks and predictably alternates btw. the two by using a clockwise rotation of stimulus presentation in a 2x2 matrix as the predictable location cues:

A 2 x 2 matrix is presented on screen. A pair of characters (e.g. '2F') appears in one of the matrix fields. For each new trial, the presented pair of characters moves in clockwise fashion to the next box, so that it is always predictable where the next character pair will appear. The task that needs to be performed depends on the box the character pair appears in (= location cue).

Two tasks: Task A: letter task: "If one of the characters is a consonant press, key E. If one of the characters is a consonant, press key I" Task B: digit task: "If one of the characters is an even digit press, key E. If one of the characters is an odd digit, press key I"

Each character pair consists of of a target character (depends on the target task) and a distractor character. The distractor character can come from the opposite task or from an unrelated set of characters.

Example: Participant has to perform the letter task every time the character pair appears in the top quadrants of the matrix and has to perform the digit task every time the character pair appears in the bottom quadrants of the matrix (this quadrant-task assignment can be set by experimenter). Letter Task: the character pair consists of of a target letter (e.g. 'G') and a distractor character, either a digit (e.g. '2') or an unrelated symbol (e.g. '#') Digit Task: the character pair consists of of a target digit (e.g. '3') and a distractor character, either a letter (e.g. 'A') or an unrelated symbol (e.g. '%')

Because the presentation of the character pairs moves predictably in a clockwise fashion, every odd trial in this script is a 'switch task' trial and every even trial is a 'nonswitch task' trial.

Procedure

(1) Extensive Practice of the key assignments for the Letter and Digit Tasks
• 16 blocks of practice, alternating btw. letter task and digit task (8 blocks each)
• each block presents 24 trials (= 16 blocks x 24 trials/block = 384 trials total)
• key reminders are presented on screen during the first 8 blocks only
• practice trials require a response correction to move on
• during practice, one box with a character pair appears on screen; there is no response deadline

(2) Test: the test session consists of C blocks and N blocks
C = crosstalk condition (distractors can be sampled from opposite task) vs.
N = non-crosstalk condition (distractors are always control characters such as '$')

• each block runs 48 trials
• by default, the script runs 8 C blocks, followed by 8 N blocks (total number of trials run: 16 blocks * 48 trials/block = 768 trials)
=> parameters.conditionSequence = "CCCCCCCCNNNNNNNN" (sequence order can be edited under section Editable Parameters)
• quadrant-task Assignment see Editable Parameters (sets which quadrants are assigned to which task)


Block Information (each block runs 48 trials)
• Block Start: depending on values.quadrantTaskAssignment (1, 2, 3, 4) the first quadrant position is randomly determined (randomly WITH replacement)
(and with it the first task is randomly determined)

Example: values.quadrantTaskAssignment = 1 (top quadrants = letter task; bottom quadrants = digit task)
=> the first selected quadrant is randomly selected to be either 1 (top left), or 3 (bottom right)
=> if start quadrant is 1: starting task is letter task
=> task sequence: AABBAABBAABB...AABB
=> if start quadrant is 3: starting task is digit task
=> task sequence: BBAABBAABBAA...BBAA

• quadrant changes clockwise from one trial to the next: 1 = top left; 2 = top, right; 3 = bottom, right; 4 = bottom, left
• the task to be performed (letter task vs. digit task) depends on the quadrant
• if letter task: half the trials select consonants; half select vowels
• if digit task: half the trials select even numbers; half select odd numbers
• consonants, vowels, even digits, odd digits, control symbols are selected randomly WITH replacement
(constraint: the same consonant (vowel, even digit, odd digit, control symbol) canNOT be selected during the next
drawing from the same list)
• the placement in the pair presented ('7#' vs. '#7') is randomly determined


Crosstalk Condition (C): can run control characters, and characters from the opposite task as distractor items
=> 3 types of congruency possible

1: no congruence (control character)
2: congruent (distractor comes from opposite task but requires the same response button)
3: incongruent (distractor comes from opposite task AND requires the opposite response button)


C-warmup: 12 trials
• 6 switch trials (all odd trials; counting the first one as a switch trial); 6 non-switch trials (all even trials)
=> 3 switch trials (non-switch trials) for letter task (same for digit task)
=> 1 control switch trial, 1 congruent switch trial, 1 incongruent switch trial (same for non-switch trials)
=> !!!type of congruence (control, congruent, incongruent) and switch type are balanced for CC conditions

• 6 letter task trials: half select'consonants'; half select 'vowels'
• 6 digit task trials: half select 'even digits'; half select 'odd digits'

C-Test: 36 trials
• 18 switch trials
=> 9 switch trials (nonswitch trials) for letter task (same for digit task)
=> letter task: 3 control switch trials, 3 congruent switch trials, 3 incongruent switch trials
=> !!!type of congruence (control, congruent, incongruent) and switch type are balanced for CC conditions

• 18 letter task trials: half select 'consonants'; half select 'vowels'
• 18 digit task trials: half select 'even digits'; half select 'odd digits'


NON-Crosstalk Condition (N): the same as for C condition but with only control characters as distractors (no congruent, incongruent pairings)


Trial Information:
target pair presentation->
wait for response (response deadline: 5000ms) ->
correct response/timeout: ITI of 150ms; incorrect response: ITI of 1500ms (with errorfeedback)

Stimuli

vowels: "A", "E", "I", "U" (see list.vowels under section Editable Stimuli)
consonants: "G", "K", "M", "R" (see list.consonants under section Editable Stimuli)
odd: "3", "5", "7", "9" (see list.odd under section Editable Stimuli)
even: "2", "4", "6", "8" (see list.even under section Editable Stimuli)
control: "#", "%", "@", "&" (see list.control under section Editable Stimuli)

Instructions

provided by Millisecond - can be edited under section Editable Instructions

Summary Data

File Name: taskswitching_summary*.iqdat

Data Fields

NameDescription
inquisit.version Inquisit version number
computer.platform Device platform: win | mac |ios | android
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
congruentTasks Stores the currently congruent tasks (based on key assignment)
"consonant-even; vowel-odd" vs. "consonant-odd; vowel-even"
conditionSequence Stores the sequence order: C for crosstalk condition, N = non-crosstalk condition
(Example: CCNN => block1-2: C; block3-4: N)
quadrantTaskAssignmnent
1 = top quadrants: letter task; bottom quadrants: digit task
symbols appearing in quadrant 1 (top, left) and quadrant 2 (top, right) => do letter task,
symbols appearing in quadrant 3 (bottom, right) and quadrant 4 (bottom, left) => do digit task
2 = top quadrants: digit task; bottom quadrants: letter task
symbols appearing in quadrant 1 (top, left) and quadrant 2 (top, right) => do digit task,
symbols appearing in quadrant 3 (bottom, right) and quadrant 4 (bottom, left) => do letter task
3 = left quadrants: letter task; right quadrants: digit task
symbols appearing in quadrant 1 (top, left) and quadrant 4 (bottom, left) => do letter task
symbols appearing in quadrant 2 (top, left) and quadrant 3 (bottom, left) => do digit task
4 = left quadrants: digit task; right quadrants: letter task
symbols appearing in quadrant 1 (top, left) and quadrant 4 (bottom, left) => do digit task
symbols appearing in quadrant 2 (top, left) and quadrant 3 (bottom, left) => do letter task
trials with latencies < 100ms and trials with 'no responses' are EXCLUDED from the following summary data
(warm-up trials not included)
c: crosstalk condition (distractors can be sampled from opposite task) vs.
n: non-crosstalk condition (distractors are always control characters such as '$')
countSwitchC Number of switch crosstalk trial responses qualified for summary variables
propCorrectSwitchC Proportion of correct switch trials in crosstalk condition
countNonSwitchC Number of nonswitch crosstalk trial responses qualified for summary variables
propCorrectNonSwitchC Proportion of correct nonswitch trials in crosstalk condition
accSwitchCostC Accuracy switchcosts in crosstalk condition
(difference btw. proportion correct of switch trials and nonswitch trials)
=> negative value: participants were less accurate on switch trials (there was an accuracy cost to switching )
meanRTSwitchC Mean latency of correctly responding to a switch trial in crosstalk condition
meanRTNonSwitchC Mean latency of correctly responding to a nonswitch trial in crosstalk condition
rtSwitchCostC Latency switchcosts in crosstalk condition
(difference btw. mean correct latency of switch trials and nonswitch trials)
=> positive value: participants were slower on switch trials (there was a latency cost to switching)
countSwitchN Number of switch noncrosstalk trial responses qualified for summary variables
propCorrectSwitchN Proportion of correct switch trials in non-crosstalk condition condition
countNonSwitchN Number of nonswitch noncrosstalk trial responses qualified for summary variables
propCorrectNonSwitchN Proportion of correct nonswitch trials in non-crosstalk condition condition
accSwitchCostN Accuracy switchcosts in non-crosstalk condition condition
(difference btw. proportion correct of switch trials and nonswitch trials)
=> negative value: participants were less accurate on switch trials (there was an accuracy cost to switching )
meanRTSwitchN Mean latency of correctly responding to a switch trial in non-crosstalk condition condition
meanRTNonSwitchN Mean latency of correctly responding to a nonswitch trial in non-crosstalk condition condition
rtSwitchCostN Latency switchcosts in non-crosstalk condition condition
(difference btw. mean correct latency of switch trials and nonswitch trials)
=> positive value: participants were slower on switch trials (there was a latency cost to switching)
propExcluded Proportion excluded (from summary variables) trials across all test trials (excluded because of no responses or because latency < 100ms)

Raw Data

File Name: taskswitching_raw*.iqdat

Data Fields

NameDescription
computer.platform Device platform: win | mac |ios | android
date Date the session was run
time Time the session was run
subject Participant ID
group Group number
session Session number
blockCode Name of the current block
blockNum Number of the current block
trialCode Name of the current trial
trialNum Number of the current trial
countPracticeBlocks Practice block counter
countTestBlocks Test block counter
conditionSequence Stores the sequence order: C for crosstalk condition, N = non-crosstalk condition
(Example: CCNN => block1-2: C; block3-4: N)
quadrantTaskAssignmnent
1 = top quadrants: letter task; bottom quadrants: digit task
symbols appearing in quadrant 1 (top, left) and quadrant 2 (top, right) => do letter task,
symbols appearing in quadrant 3 (bottom, right) and quadrant 4 (bottom, left) => do digit task
2 = top quadrants: digit task; bottom quadrants: letter task
symbols appearing in quadrant 1 (top, left) and quadrant 2 (top, right) => do digit task,
symbols appearing in quadrant 3 (bottom, right) and quadrant 4 (bottom, left) => do letter task
3 = left quadrants: letter task; right quadrants: digit task
symbols appearing in quadrant 1 (top, left) and quadrant 4 (bottom, left) => do letter task
symbols appearing in quadrant 2 (top, left) and quadrant 3 (bottom, left) => do digit task
4 = left quadrants: digit task; right quadrants: letter task
symbols appearing in quadrant 1 (top, left) and quadrant 4 (bottom, left) => do digit task
symbols appearing in quadrant 2 (top, left) and quadrant 3 (bottom, left) => do letter task
congruentTasks Stores the currently congruent tasks (based on key assignment)
"consonant-even; vowel-odd" vs. "consonant-odd; vowel-even"
switch 0 = non-switch trial (even trials)
1 = switch trials (odd trials)
quadrant 1 = top, left
2 = top, right
3 = bottom, right
4 = bottom, left (clockwise)
targetTask Stores the task to be performed: "letter task" vs. "digit task"
targetCategory CONSONANT vs. VOWEL vs. EVEN vs. ODD
targetSymbol Stores the current target symbol (either the target consonant, target vowel, target even number, target odd number)
distractorSymbol Stores the current distractor symbol
targetPair Stores the currently presented combined pair of target symbol and distractor symbol
congruence For cross talk condition
1 = distractor symbol is a control symbol (no sharing of response keys)
2 = congruent (distractor and target symbol share the same response key)
3 = incongruent (distractor and target symbol have opposite response keys)
stimulusItem The presented stimuli in order of trial presentation
response The participant's response (scancode of response buttons)
correct Accuracy of response: 1 = correct response; 0 = otherwise
latency The response latency (in ms); measured from: onset of symbol pair

Parameters

The procedure can be adjusted by setting the following parameters.

NameDescriptionDefault
conditionSequence Stores the sequence order: C for crosstalk condition, N = non-crosstalk condition
(Example: CCCCCCCCNNNNNNNN - each block runs 48 trials)
quadrantTaskAssignmnent
1 = top quadrants:letter task; bottom quadrants: digit task
symbols appearing in quadrant 1 (top, left) and quadrant 2 (top, right) => do letter task,
symbols appearing in quadrant 3 (bottom, right) and quadrant 4 (bottom, left) => do digit task
2 = top quadrants: digit task; bottom quadrants: letter task
symbols appearing in quadrant 1 (top, left) and quadrant 2 (top, right) => do digit task,
symbols appearing in quadrant 3 (bottom, right) and quadrant 4 (bottom, left) => do letter task
3 = left quadrants: letter task; right quadrants: digit task
symbols appearing in quadrant 1 (top, left) and quadrant 4 (bottom, left) => do letter task
symbols appearing in quadrant 2 (top, left) and quadrant 3 (bottom, left) => do digit task
4 = left quadrants: digit task; right quadrants: letter task
symbols appearing in quadrant 1 (top, left) and quadrant 4 (bottom, left) => do digit task
symbols appearing in quadrant 2 (top, left) and quadrant 3 (bottom, left) => do letter task
maxPracticeBlocks The number of practice blocks run
Notes
* number should be evenshould be even to allow for the same number of Letter as Digit Tasks practice blocks
* minimum number is 4 (if smaller, practice is skipped altogether)
Key Assignments
leftKey The left response button "E"
rightKey The right response button "I"
consonantKey The key assigned for consonants parameters.leftKey
vowelKey The key assigned for vowels parameters.rightKey
evenKey The key assigned for even digits parameters.leftKey
oddKey The key assigned for odd digits
the default assignments align consonants and even digits/vowels and odd digits
Stimuli Sizing
parameters.rightKey
quadrantSize The size of one of the box quadrants proportional to canvas height 25%
targetSize The height of the symbol pairs proportional to canvas height
Timing Parameters
5%
readyDuration The duration (in ms) of the 'get-ready' trial 2000ms
responseDeadline The amount of time (in ms) assigned for making a response during the test 5000ms
correctITI The duration (in ms) of the intertrial interval if response was correct 150ms
errorITI The duration (in ms) of the intertrial interval if response was incorrect 1500ms
blockStartDuration The duration (in ms) of the highlighted box at the start of a new block
For Summary Variables
2000ms
minRT Trials in which participant respond with latency < minRT are excluded from summary variables 100ms