Return to the Color Shape Task page
						
										COLOR SHAPE TASK

SCRIPT INFO

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 12-30-2013
last updated:  01-07-2016 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Copyright ©  01-07-2016 Millisecond Software


BACKGROUND INFO

											*Purpose*
This script implements the Color Shape Task to assess shifting attention as described in:

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.

The script simplifies the Miyake et al (2004) procedure by not implementing the secondary task conditions.
Furthermore, this script allows researchers to set the amount of shift/repeat trials in the mixed condition.

Millisecond Software thanks Dr. Bruce Ellis and colleagues for consulting on this project!


											  *Task*
Participants are presented bivalent stimuli (circle or triangle on red or green color patches) and have to 
either sort the stimuli by shape or by color. In a blocked condition, participants get informed before
each block which characteristic to focus on. In a mixed condition, participants are given word or letter
cues before each stimulus appears that inform them which characteristic (color vs shape) to focus on.
Shift and repeat trials are only possible in the Mixed Condition.


DATA FILE INFORMATION: 
The default data stored in the data files are:

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

build:							Inquisit build
computer.platform:				the platform the script was run on
date, time, subject, group:		date and time script was run with the current subject/groupnumber 
/group:							Response Key assignment group
												1 = red and circle on one response key (default: A)
												2 = red and triangle on one respone key (default: A)
												3 = red and circle on one response key (default: L)
												4 = red and triangle on one respone key (default: L)

blockcode, blocknum:			the name and number of the current block
trialcode, trialnum: 			the name and number of the currently recorded trial
									(Note: not all trials that are run might record data) 
/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"
/mixed_cuetask:					the type of cue in the Mixed condition: "Word" vs. "Letter"
/mixed_shifttask:				the type of shift task in the Mixed condition: "Shift" vs. "Repeat"
/CSI:							stores the current CSI
/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 first presented stimulus of the given trial
/stimulus:						stores the last presented red/green/circle/triangle stimulus
response:						the participant's response (scancode of response: default 30 -> A; 38 -> L)
correct:						the correctness of the response
latency: 						the response latency

Summary variables: updated for each test block trial by trial
Note: for Mixed Trials, the performance data of the first tasks in each block (trial.mixed_firsttask)
are NOT included in the summary variables

/count_shape: 					counts the number of shape trials
/count_color: 					counts the number of color trials
/count_corrshape: 				counts the number of correct shape trials
/count_corrcolor: 				counts the number of correct color trials
/sumrt_corrshape: 				sums up latencies of correct responses to shape
/sumrt_corrcolor: 				sums up latencies of correct responses to color
/count_shift:					counts the number of shift trials 
/count_repeat:					counts the number of repeat trials 
/count_corrshift:				counts the number of correct shift trials 
/count_corrrepeat:				counts the number of correct repeat trials 
/sumrt_corrshift:				sums up latencies of correct shift trials
/sumrt_corrrepeat:				sums up latencies of correct repeat trials 

/percentcorrect_shape: 			percent correct of shape responses
/percentcorrect_color: 			percent correct of color responses
/meanRT_shape:					mean rt of correct shape responses
/meanRT_color:					mean rt of correct color responses

/percentcorrect_shif: 			percent correct of shift responses
/percentcorrect_repeat: 		percent correct of repeat responses
/meanRT_shift:					mean rt of correct shift responses 
/meanRT_repeat:					mean rt of correct repeat responses 

/switchcost:					calculates the switch costs as the mean reaction-time difference between (correct) switch and (correct) repeat trials.

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

script.startdate:				date script was run
script.starttime:				time script was started
script.subjectid:				subject id number
script.groupid:					group id number
script.elapsedtime:				time it took to run script (in ms)
computer.platform:				the platform the script was run on
/completed:						0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run)
/group:							Response Key assignment group
									1 = red and circle on one response key (default: A)
									2 = red and triangle on one respone key (default: A)
									3 = red and circle on one response key (default: L)
									4 = red and triangle on one respone key (default: L)

/switchcost_word_longCSI-
/switchcost_letter_shortCSI: 	stores the switch costs (the mean reaction-time difference between correct switch and correct repeat trials)
								for the 4 mixed test blocks
									=> positive: longer (average) switch latencies 
									=> negative: shorter (average) switch latencies

EXPERIMENTAL SET-UP:
!!! GENERAL NOTE: the Experimental Flow is controlled by the expt-elements under EXPERIMENTS. If the default flow 
needs to be changed (e.g. no Blocked Condition should be run) go to EXPERIMENT (at the end of the script) and follow instructions.

Blocked condition vs. Mixed Condition:
-> blocked condition: categorization task (color vs. shape) is known upfront at the beginning of each block; no
	additional cue before each trial is necessary.
-> mixed condition: categorization task (color vs. shape) is NOT known upfront; a cue is presented before each 
	trial to inform participant which task needs to be performed
	=> 2 types of cues: word (SHAPE, COLOR) vs letter (S, C)
	=> repeat vs. shift condition: shift cost = reaction time difference between repeat and shift trials

In this script the Blocked Condition is run before the Mixed Condition (see Miyake et al, 2004)

(A) Blocked Condition:
(a) Training: 5 Training Blocks of 32 trials
	!!! The default number of trials in this script differs from the 30 trials used in Miyake et al (2004). This was done to allow the 
	4 conditions (2 shapes x 2 colors) to be presented equally often
	=> number of blocked practice trials is controlled via parameters.blocked_numberpracticetrials
- The sampling of stimuli in each block is done randomly without replacement
- The intertrial interval (ITI) between response and presentation of next stimulus is parameters.iti (default: 600ms)
- Errorfeedback for 1000ms (default) after an incorrect response and before ITI
- the order of the training blocks is fixed for all participants:
	(1) only shapes: block.blockedtask_shapetraining
	(2) only color patches: block.blockedtask_colortraining
	(3) shapes and color patches intermixed: block.blockedtask_colorshapetraining
	(4) shapes superimposed on color patches (task: categorize shapes): block.blockedtask_bivalentshapetraining
	(5) shapes superimposed on color patches (task: categorize colors): block.blockedtask_bivalentcolortraining

(b) Test Blocks: 
- 2 primary tasks (color vs shape): order is randomly determined for each participant
(-> controlled by expt elements under EXPERIMENT)
- in this script the number of test trials was decreased from 65 trials (Miyake et al, 2004) to 64 trials to allow all 
4 conditions (2 shapes x 2 colors) to be sampled equally often
- by default, participants are given performance feedback after each block (-> page.blockfeedback)

(B) MIXED CONDITION
(a) Training Blocks: with error feedback for 1000ms (default) after an incorrect response and before ITI
- 2 Training Blocks (Word cue vs. Letter cue) 
- order randomly determined for each participant
- default: 48 trials (+ plus starttrial); can be set under EDITABLE CODE -> Editable Values -> parameters.mixed_numberpracticetrials

(b) Test Blocks: no error feedback
- 4 test blocks: 2 cues (word vs letter) x 2 CSI (long CSI, short CSI)
- order of test blocks randomly determined for each participant
		NOTE: the selection/order of the test blocks can be customized under EXPERIMENT

- default: 100 trials (+ plus starttrial); can be set under EDITABLE CODE -> Editable Values -> parameters.mixed_numberoftrials
		Trial Sequence:
		- The sampling of stimuli in each block is done randomly without replacement
		- The intertrial interval (ITI) between response and presentation of next stimulus is parameters.iti
		- in each mixed test block a rest trial is presented after parameters.mixed_trialstoRest (-> editable value), default: halfway through the block

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

- number of trials was chosen to ensure that all four possible stimuli are presented equally often

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

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

STIMULI
Stimuli and cues provided by Millisecond Software. The stimuli can be edited under 
EDITABLE CODE -> Editable Stimuli (item.stimuli, item.cues)

INSTRUCTIONS
Instructions are provided by Millisecond Software in the form of htm pages. To edit the instructions
edit the relevant *.htm files or replace them with your own under EDITABLE CODE -> Editable Instructions

EDITABLE CODE:
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:

Response key mappings:
Note: Miyake et al (2004) use 2 response keys (e.g. circle/green on one response key; triangle/red on the other). 
This script offers the possibility to use 4 response key (circle/triangle/red/green all get their own).
By default, shape1 and color1 (shape2 and color2) are assigned the same response keys.
Counterbalancing of response keys is achieved by the expt-element under EXPERIMENT.				

/responsekey_shape1:							shape 1 gets assigned scancode 30 (scancodes under Tools->Keyboard Scancodes)
/responsekey_labelshape1:						the label of scancode 30 corresponds to "A"
/responsekey_shape2:							shape 2 gets assigned scancode 38
/responsekey_labelshape2:						the label of scancode 38 corresponds to "L"
/responsekey_color1:							color 1 gets assigned scancode 30
/responsekey_labelcolor1:						the label of scancode 30 corresponds to "A"
/responsekey_color2:							color 2 gets assigned scancode 38
/responsekey_labelcolor2:						the label of scancode 38 corresponds to "L"

												!!!NOTE: if scancodes are changed -> change instruction slides accordingly

Size of the stimuli:
/stimheight:									sets the size of the stimulus as a percentage of monitor height (default: 25%)
													Note: Miyake et al (2004. p.128):
													- the size of the color patch was roughly 36mm

/cueheight:										sets the height (size) fo the cues as a percentage of monitor height (default: 8%)
												
Duration Settings:
/iti:											Intertrial Interval (default: 600ms)
/CSI_long:										Cue-Stimulus-Interval (CSI) long (default: 1200ms)
/CSI_short:										Cue-Stimulus-Interval (CSI) short (default: 200ms)			
/RestDuration:									in Mixed Condition: duration of rest trial

Number of Trials:
/blocked_numberpracticetrials:					number of practice trials in Blocked condition (default: 32)
													Note: number increased from original 30 Miyake et al (2004) 
															to allow equal distribution of 2(color) x 2 (shapes)
													
/blocked_numbertrials: 							number of test trials in Blocked condition (default: 64)
													Note: in this script the number of test trials was decreased from 
															65 trials (Miyake et al, 2004) to 64 trials to allow all 
															4 conditions (2 shapes x 2 colors) to be sampled equally often

/mixed_numberpracticetrials:					number of practice trials in Mixed condition 
													(default: 50 repeat/shift trials plus starttrial)
/mixed_numberoftrials:							number of test trials in Mixed condition 
													(default: 100 repeat/shift trials plus starttrial)
/mixed_trialstoRest:							number of trials in mixed conditions until a rest trial 
													(default: parameters.mixed_numberoftrials/2)
													Note: to remove resttrial set values.mixedtrialtorest = parameters.mixed_numberoftrials + 1 (e.g.)

Copyright © Millisecond Software. All rights reserved.
Contact | Terms of Service | Security Statement | Employment