Return to the Contextual Cueing Task page

										*Contextual Cueing Task*

Script Author: Katja Borchert, Ph.D. ( for Millisecond Software, LLC
Date: 04-29-2020
last updated:  06-11-2020 by K. Borchert ( for Millisecond Software, LLC

Script Copyright © 06-11-2020 Millisecond Software


This script implements the Contextual Cueing Task, a task that aims to understand how contextual information
influences visual attention.


Chun, M.M. and Jiang, Y. (1998) Contextual cueing: implicit
learning and memory of visual context guides spatial attention.
Cognit. Psychol., 36, 28–71


Participants see displays of 11 "L" and one "T" (the target). The 12 items are presented within a 8x6 matrix in
in four different colors (red, green, blue, yellow). Distractor items can be rotated by 0, 90, 180 or 270degrees.
The target T can be rotated by 90deg (-> points to the right) or by 270degrees (-> points to the left).
Participants have to press a left key (here: A) if the T points to the left and a right key (here: L)
when the T points to the right.

the default set-up of the script takes appr. 40 minutes to complete

The default data stored in the data files are:

(1) Raw data file: 'contextualcueingtask_raw*.iqdat' (a separate file for each participant)*

build:								The specific Inquisit version used (the 'build') that was run
computer.platform:					the platform the script was run on (win/mac/ios/android)
date, time, 						date and time script was run 
subject, group, 					with the current subject/groupnumber
script.sessionid:					with the current session id

blockcode, blocknum:				the name and number of the current block (built-in Inquisit variable)
trialcode, trialnum: 				the name and number of the currently recorded trial (built-in Inquisit variable)
										Note: trialnum is a built-in Inquisit variable; it counts all trials run; even those
										that do not store data to the data file. 

values.targetlocations_OLD:			string variable that stores all the target locations used for the OLD scenes 
values.targetlocations_NEW:			string variable that stores all the target locations used for the NEW scenes

values.blockCount:					custom test block counter 
values.epoch:						1-6 (Note: each set of 5 consecutive test blocks make up one epoch) 
values.trialCount_perblock:			custom trial counter for each block

values.category:					0 = practice trial; 1 = OLD scene; 2 = NEW scene 
values.old:							1-12
values.angleT:						90 vs. 270 (the randomly generated angle of the target T) 

response:							the participant's response (scancode of response button)
											30 = A
											38 = L
correct:							accuracy of response: 1 = correct response; 0 = otherwise
latency: 							the response latency (in ms); measured from: onset of display

//scene information:
values.configuration:				stores the ordered locations of the currently presented scene (Note: each location uses 2 digits) 

values. repeatConfiguration: 		1 = flag: the current spatial configuration is a repeat of a previous one (should not happen and if so very rarely)
									0 = the current spatial configuration is unique
//The positions (1-48) assigned to the Target and the 11 Distractors:
values.positionT, values.positionD1, values.positionD2, 
values.positionD3, values.positionD4, values.positionD5, 
values.positionD6, values.positionD7, values.positionD8, 
values.positionD9, values.positionD10, values.positionD11, 									
//the colors assigned to the Target and the 11 Distractors:
values.colorT, values.colorD1, values.colorD2, 
values.colorD3, values.colorD4, values.colorD5, 
values.colorD6, values.colorD7, values.colorD8, 
values.colorD9, values.colorD10, values.colorD11,

//the angles assigned to the Target and the 11 Distractors:
values.angleT, values.angleD1, values.angleD2, 
values.angleD3, values.angleD4, values.angleD5, 
values.angleD6, values.angleD7, values.angleD8, 
values.angleD9, values.angleD10, values.angleD11,

//remaining variables stored in the datafile used for internal debugging purposes

(2) Summary data file: 'contextualcueingtask_summary*.iqdat' (a separate file for each participant)*

computer.platform:					the platform the script was run on (win/mac/ios/android)
script.startdate:					date script was run
script.starttime:					time script was started
script.subjectid:					assigned subject id number
script.groupid:						assigned group id number
script.sessionid:					assigned session id number
script.elapsedtime:					time it took to run script (in ms); measured from onset to offset of script
script.completed:					0 = script was not completed (prematurely aborted); 
									1 = script was completed (all conditions run)
expressions.propCorrect_OLD_overall:		proportion correct for OLD scenes across all test blocks 
expressions.meanCorrRT_OLD_overall:			mean correct response time (in ms) for OLD scenes across all test blocks

//separate summary variables for the 6 epochs
expressions.propCorrect_OLD_epoch1, expressions.meanCorrRT_OLD_epoch1,
expressions.propCorrect_OLD_epoch2, expressions.meanCorrRT_OLD_epoch2,
expressions.propCorrect_OLD_epoch3, expressions.meanCorrRT_OLD_epoch3,
expressions.propCorrect_OLD_epoch4, expressions.meanCorrRT_OLD_epoch4,
expressions.propCorrect_OLD_epoch5, expressions.meanCorrRT_OLD_epoch5,
expressions.propCorrect_OLD_epoch6, expressions.meanCorrRT_OLD_epoch6,

expressions.propCorrect_NEW_overall:		proportion correct for NEW scenes across all test blocks 
expressions.meanCorrRT_NEW_overall:			mean correct response time (in ms) for NEW scenes across all test blocks

//separate summary variables for the 6 epochs
expressions.propCorrect_NEW_epoch1, expressions.meanCorrRT_NEW_epoch1,
expressions.propCorrect_NEW_epoch2, expressions.meanCorrRT_NEW_epoch2,
expressions.propCorrect_NEW_epoch3, expressions.meanCorrRT_NEW_epoch3,
expressions.propCorrect_NEW_epoch4, expressions.meanCorrRT_NEW_epoch4,
expressions.propCorrect_NEW_epoch5, expressions.meanCorrRT_NEW_epoch5,
expressions.propCorrect_NEW_epoch6, expressions.meanCorrRT_NEW_epoch6,									
* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions


(1) Practice
- 24 trials (practice trials show unique scenes)

(2) Test: 30 blocks (a set of 5 consecutive blocks is grouped into one 'epoch' -> a total of 6 epochs is run)
- each block runs 12 OLD scenes and 12 NEW scenes (24 trials)
- at the end of each block participants are given a minimum of 10s to rest

Trial Sequence:
- fixation cross for 500ms
- display 'scene' until response
- correct/errorfeedback via soundfiles
- intertrial interval for 1000ms

Explanation of scene (and their generation):

- 12 items (1 target + 11 distractors) located in a 8x6 matrix (each generated scene uses a UNIQUE spatial configuration for the items)
=> items appear in each 8x6 location, slightly jittered from the center
- 4 colors: red, green, blue, yellow (each color appears 3 times in each scene)
- target (T) is either oriented 90degress to the left (=270degrees) or 90degrees to the right (randomly determined for each trial)
- distractors (L) can be rotated by 4 angles (0, 90, 180, 270deg) 

Old Scenes:
- 12 old scenes generated at beginning of the script - they are repeatedly used throughout the experiment
- the target appears in a different position for each of the 12 scenes
- the target appears equally often in each color
- The old scenes stay the same each time they are presented throughout the experiment:
same locations for targets/distractors, same color for targets/distractors, same angles for distractors
EXCEPT for the angle of the target (that is randomly decided each time the scene is presented)

New Scenes:
- targets appear in 12 dedicated locations 
=> the same 12 target locations for NEW targets are used in each block 
(the colors of the targets in those locations also stay the same across the experiment)
(Note: 12 locations are assigned to OLD scenes, different 12 locations are assigned to NEW scenes)
- distractor positions change from scene to scene (this is the defining difference to OLD scenes)
- distractor colors change from scene to scene

Algorithm to generate unique scene locations/configurations:
- establish the target location
- then randomly sample the distractor locations out of the remaining 47 possible locations
- order the locations from smallest to largest
- check if this 'configuration' has been used before
- if used before: repeat process until a unique spatial configuration has been found OR
1000 unsuccessful attempts have been made (in this case values.repeatConfigurations will be set to 1)

Color Assignment (red, green, yellow, blue):
- across one block: the target appears in each color three times in the New configurations
- across one block: the target appears in each color three times in the Old configurations
=> across one block of 24 trials: the target appears in each color 6 times

Angle Assignment:
- Targets: for each trial it is randomly (with replacement) decided whether the target angle is 90 degree (left) or 270 degrees (right);
this is the case for Old and New configurations (Note: the target can have different rotation angles in the same Old scene)
- Distractors: each distractor gets randomly (with replacement) assigned angle of 0, 90, 180, or 270 degrees
=> each angle has the same probability to be sampled (frequencies of angles will likely vary)

provided by Millisecond Software - can be edited under section Editable Stimuli

provided by Millisecond Software - can be edited under section Editable Instructions

Instructions are not original to the task. They are provided by Millisecond Software
as htm/html pages.
To edit htm/html-files: open the respective documents in simple Text Editors such as TextEdit (Mac)
or Notepad (Windows).

check below for (relatively) easily editable parameters, stimuli, instructions etc. 
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code 
to further customize your experiment.

The parameters you can change are: