Introduction
Multitasking can be defined in slightly different ways:
-
Carrying multiple tasks out at the same time
-
Real life: Driving while talking on the phone
-
Laboratory: Drawing a circle with the left hand while drawing a rectangle with the right hand.
-
-
Carrying out multiple tasks in rapid sequential order
-
Preparing a meal. You cut the vegetables. Put the potatoes in the pan. Sort the spices. Check over the cookbook. Check if potatoes boil. Stir fry the vegetables.
-
Rapidly switching between two computer tasks compared to doing only one task
-
The reality is that you can argue that people always multi-task in some way. After all, we always monitor our environment to some degree, no matter what. For example, no matter how deeply you concentrate on doing a task, if you hear someone shout "fire", you will process that information and act on it. |
In this multitasking experiment, we compare performance when just doing one task compared to when two tasks are mixed. In essence, this is simply a task switching paradigm. It is a cued task switching paradigm, although the cue (the location of the stimulus) and the imperative stimulus are presented at exactly the same time. In that sense, it is a bit mid-way between the alternative run and explicit cued-task paradigm (again, it is a bit a matter of definition).
In this paradigm, we have two different types of comparisons:
-
Single tasking (doing a block of one task type) compared with multi-tasking (rapidly interleaving two tasks).
-
Within a multi-tasking block, task-repeat compared with task-switch trials (this is what task-switching paradigms typically study).
Stoet, Connor, O’Connor, and Laws (2013) reported that women are better in switching between two tasks than men (as compared to doing one task at the time). |
About this implementation
This example is very close to the task used in the study by Stoet, Connor, O’Connor, and Laws (2013).
Note that this code includes a feedback section and that the code keeps track of which trials are task-repeat and task-switch trials. In principle, this is not necessary unless you want to give participants direct feedback about these things. If you wish, this code can be simpler, but then you would need to calculate these variables in the post-processing for your data analysis. PsyToolkit lets you do it the way you want.
Run the demo
In this experiment, you respond with the keys b and n to diamonds and rectangles (in the shape task) and circles (in the filling task). The instructions are all on screen and require some concentrated reading. Altogether, it will take you 10 to 15 minutes. |
If you make a mistake, you get a 3 second timeout. That might feel like a long time, but it is a way to make participants concentrate. You do not need to press a button, just need to wait. |
This is a difficult task! You need to remember the rules of two different tasks and you need to frequently switch between them. In the cognitive laboratory, this is considered one of the more difficult tasks. Are you up for it? |
Data output file
In PsyToolkit, the data output file is simply a textfile. The save line of the PsyToolkit experiment script determines what is being saved in the data output file. Typically, for each experimental trial, you would have exactly one line in your text file, and each number/word on that line gives you the information you need for your data analysis, such as the condition, response speed, and whether an error was made. |
Meaning of the columns in the output datafile. You need this information for your data analysis.
Colum | Meaning |
---|---|
1 |
blockname |
2 |
tablerow number (1-4) |
3 |
name of task (fill or shape) |
4 |
congruency (congruent or incongruent) |
5 |
response position (left or right ) |
6 |
status (1=correct, 2=wrong, 3=slow) |
7 |
response time (milliseconds) |
8 |
mixing (1=in pure block, 2=in mixing block) |
9 |
switching (1=repeat trial, 2=switch trial) |
PsyToolkit code
Click to expand the PsyToolkit script code (part of zip file below)
options
bitmapdir stimuli
set &mixingStatus 0 # 1=pure,2=mixed
set &CurrentTask 0
set &previousTask 0
fonts
arial 18
bitmaps
################# for count down ### ######################
countdown
countdown1
countdown2
countdown3
################# for task switching ######################
info1
info2
info3
info4
info5
info6
info7
info8
info9
info10
info11
fillinginstruction
shapeinstruction
shape1fill1 # diamond
shape1fill2 # diamond
shape2fill1 # rect 2 filled circles
shape2fill2 # rect 3 filled circles
tooslow
wrongkey
frame
gojustshape
gojustfilling
gomixshapefilling
readyreal
readytraining
##
thankyou
######################################################################
# task switching table
######################################################################
table shapetask
"shape congruent left " shape1fill1 4 1
"shape incongruent right" shape2fill1 5 2
"shape incongruent left " shape1fill2 4 1
"shape congruent right" shape2fill2 5 2
table fillingtask
"fill congruent left " shape1fill1 4 1
"fill incongruent left " shape2fill1 4 1
"fill incongruent right" shape1fill2 5 2
"fill congruent right" shape2fill2 5 2
######################################################################
# task switching tasks
######################################################################
task filling
table fillingtask
keys b n
# -- for later data analysis --------
set &CurrentTask 1
if &CurrentTask == &previousTask
set $taskSwitch 1
fi
if &CurrentTask != &previousTask
set $taskSwitch 2
fi
set &previousTask &CurrentTask
#------------------------------------
if &CurrentTask == &previousTask
set $taskSwitch 1
fi
if &CurrentTask != &previousTask
set $taskSwitch 2
fi
set &previousTask &CurrentTask
show bitmap frame # 1
delay 800
show bitmap @2 0 70 # 2
readkey @4 &maxtime
clear 2
if STATUS == WRONG
show bitmap wrongkey # 3
delay 1000
clear -1
fi
if STATUS == TIMEOUT
show bitmap tooslow # 3
delay 1000
clear -1
fi
if STATUS == WRONG || STATUS == TIMEOUT
show bitmap fillinginstruction # 4
delay 5000
clear -1 # 4
delay 500
fi
save BLOCKNAME TABLEROW @1 STATUS RT &mixingStatus $taskSwitch
task shape
table shapetask
keys b n
# -- for later data analysis --------
set &CurrentTask 2
if &CurrentTask == &previousTask
set $taskSwitch 1
fi
if &CurrentTask != &previousTask
set $taskSwitch 2
fi
set &previousTask &CurrentTask
#------------------------------------
show bitmap frame # 1
delay 800
show bitmap @2 0 -70 # 2
readkey @4 &maxtime
clear 2
if STATUS == WRONG
show bitmap wrongkey # 3
delay 1000
clear -1
fi
if STATUS == TIMEOUT
show bitmap tooslow # 3
delay 1000
clear -1
fi
if STATUS == WRONG || STATUS == TIMEOUT
show bitmap shapeinstruction # 4
delay 5000
clear -1
delay 500
fi
save BLOCKNAME TABLEROW @1 STATUS RT &mixingStatus $taskSwitch
# -------------------------------------------------------
# B L O C K S
# -------------------------------------------------------
######################################################################
# B L O C K S
######################################################################
block switchtrainingpureshape ### TRAINING TASK SWITCHING 1
pager info1 info2 info3 info4 info5 info6 info7 info8 info9 info10 info11
message readytraining
set &maxtime 4000
set &mixingStatus 1 ## in one-task blocks
bitmap gojustshape
wait_for_key
bitmap countdown
delay 1000
bitmap countdown3
delay 1000
bitmap countdown2
delay 1000
bitmap countdown1
delay 1000
tasklist
shape 10
end
message readytraining
block switchtrainingpurefilling
set &mixingStatus 1 ## in one-task blocks
bitmap gojustfilling
wait_for_key
bitmap countdown
delay 1000
bitmap countdown3
delay 1000
bitmap countdown2
delay 1000
bitmap countdown1
delay 1000
tasklist
filling 10
end
message readytraining
block switchtrainingmixedshapefilling
set &mixingStatus 2 ## in interleaved blocks
bitmap gomixshapefilling
wait_for_key
bitmap countdown
delay 1000
bitmap countdown3
delay 1000
bitmap countdown2
delay 1000
bitmap countdown1
delay 1000
tasklist
filling 10
shape 10
end
message readyreal
block switchpureshape
set &mixingStatus 1 ## in one-task blocks
bitmap gojustshape
wait_for_key
bitmap countdown
delay 1000
bitmap countdown3
delay 1000
bitmap countdown2
delay 1000
bitmap countdown1
delay 1000
tasklist
shape 48
end
message readyreal
block switchpurefilling
set &mixingStatus 1 ## in one-task blocks
bitmap gojustfilling
wait_for_key
bitmap countdown
delay 1000
bitmap countdown3
delay 1000
bitmap countdown2
delay 1000
bitmap countdown1
delay 1000
tasklist
filling 48
end
message readyreal
block switchmixedshapefilling
set &mixingStatus 2 ## in interleaved blocks
bitmap gomixshapefilling
wait_for_key
bitmap countdown
delay 1000
bitmap countdown3
delay 1000
bitmap countdown2
delay 1000
bitmap countdown1
delay 1000
tasklist
filling 48
shape 48
end
feedback
set &PureTrials mean c7 ; select c6 == 1 && c8 == 1 && c9 == 1
set &MixedTrials mean c7 ; select c6 == 1 && c8 == 2 && c9 == 1
set &RepeatTrials mean c7 ; select c6 == 1 && c8 == 2 && c9 == 1
set &SwitchTrials mean c7 ; select c6 == 1 && c8 == 2 && c9 == 2
set &MixCost expression &MixedTrials - &PureTrials
set &SwitchCost expression &SwitchTrials - &RepeatTrials
text 0 -200 &PureTrials ; prefix "RT in pure trials:" ; postfix "ms"
text 0 -150 &MixedTrials ; prefix "RT in mixed trials:" ; postfix "ms"
text 0 -100 &MixCost ; prefix "Mixing cost:" ; postfix "ms"
text 0 50 &RepeatTrials ; prefix "RT in task-repeat trials (in mixed blocks):" ; postfix "ms"
text 0 100 &SwitchTrials ; prefix "RT in task-switching trials (in mixed blocks):" ; postfix "ms"
text 0 150 &SwitchCost ; prefix "Task-switch cost:" ; postfix "ms"
text 0 250 "Press space bar."
end
##########################
message thankyou
Download
If you have a PsyToolkit account, you can upload the zipfile directly to your PsyToolkit account. Watch a video on how to do that. If you want to upload the zipfile into your PsyToolkit account, make sure the file is not automatically uncompressed (some browsers, especially Mac Safari, by default uncompress zip files). Read here how to easily deal with this. |
Further reading
-
Stoet, G., O’Connor, D.B., Conner, M., and Laws, K. R. (2013). Are women better than men at multitasking? BMC Psychology, 1:18. You can read this open access paper by clicking here.