Return to the Visual Simon Task page
___________________________________________________________________________________________________________________	

										*Visual Simon Task*
___________________________________________________________________________________________________________________

last updated:  03-13-2020 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC
Script Copyright © 03-13-2020 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	
This script implements a simple visual Simon Task, a measure of visuospatial attention and 
inhibitory control processes. The classic Simon Effects refers to the observation of 
stimulus-response compatibility: stimuli congruent in spatial location and response button location
(e.g. stimulus presented on the left screen and response button is located on the left side)
elicit faster responding than stimuli incongruent in spatial location and response button location
(e.g. stimulus presented on the left screen and response button is located on the right side).

The implemented procedure is based on:

Bialystok, E., Craik, F. I. M., Klein, R., & Viswanathan, M. (2004). Bilingualism, Aging, 
and Cognitive Control: Evidence From the Simon Task. Psychology and Aging, 19(2), 290-303.

original Simon Task:

Simon, J.R. & Wolf, J.D. (1963). Choice reaction times as a function of angular stimulus-response 
correspondence and age. Ergonomics, 6, 99-105.

___________________________________________________________________________________________________________________
TASK DESCRIPTION
___________________________________________________________________________________________________________________	
Brief overview taken from Bialystok et al., 2004, p. 292 (slightly adapted):

Each trial begins with a fixation cross in the center of the screen that remains visible for 800 ms
and is followed by a 250-ms blank interval. At the end of this interval, a red or blue square appears 
on either the left or the right side of the screen and remains on the screen for 1,000 ms if there is 
no response. Participants are instructed to press the left 'A' key when they see a blue square 
and the right 'L' key when they see a red square. Response timing begins with the onset of the 
stimulus, and the response terminates the stimulus. There is a 500-ms blank interval before the onset 
of the next trial.

___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. 2 minutes to complete

___________________________________________________________________________________________________________________	
DATA FILE INFORMATION 
___________________________________________________________________________________________________________________	

(1) Raw data file: 'visualsimontask_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 such as feedback trials. Thus, trialnum 
										may not reflect the number of main trials run per block. 
										
values.counttrials:					trial count (resets after each practice session)										
										
values.congruence:					congruent (stim position and response button position on the same side) vs. incongruent
values.stimhpos:					left vs. right (the position of the stimulus on the screen)
values.stimtype:					Blue Square vs. Red Square

response:							the participant's response (scancode of response key)
										30 = 'A' key
										38 = 'L' key
										
expressions.response:				left vs. right (the interpreted key response, 30 => left; 38 => right)
										
correct:							the correctness of the response (1 = correct; 0 = incorrect)
latency: 							the response latency in ms; measured from onset of stimulus


(2) Summary data file: 'visualsimontask_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:				proportion correct across all test trials
expressions.meanRT:						mean latency of correct test trials in ms
expressions.propcorrect_congruent:		proportion correct of congruent test trials
expressions.meanRT_congruent:			mean latency of correct congruent test trials in ms
expressions.propcorrect_incongruent:	proportion correct of incongruent test trials
expressions.meanRT_incongruent:			mean latency of correct incongruent test trials in ms

expressions.SimonEffect:				ms difference in "[mean corrRT Incongruent] - [mean corrRT Congruent]"
										positive value: participants responded faster when stimulus location and response button location 
										were congruent ("stimulus-response compatibility") => Simon Effect
										[negative value: participants responded faster when stimulus location and response button location 
										were incongruent]

___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	
The experiment begins with eight practice trials, and participants must complete all eight trials success-
fully to proceed to the experimental trials. If a mistake is made, participants are given additional
pratice trials until all eight trials are completed without error.
	
The following 28 experimental trials, half of which present the square on the same side as the associ-
ated response key (congruent trials) and half of which present the square on the opposite side 
(incongruent trials), are presented in a randomized order.	

___________________________________________________________________________________________________________________	
STIMULI
___________________________________________________________________________________________________________________	
red and blue square - size can be controlled via parameters.squaresize under section Editable Parameters

___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________	
Instructions are not original to the task. They are provided by Millisecond Software
as htm/html pages and simple page elements and can be edited either by changing
the provided htm/html files or directly under Editable Instructions.
To edit htm/html-files: open the respective documents in simple Text Editors such as TextEdit (Mac)
or Notepad (Windows).

___________________________________________________________________________________________________________________	
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:

/responsekeyblue_left:			the left response button for a blue square (default: "A")
/responsekeyred_right:			the right response button for a red square (default: "L")

/fixationcross_duration:		the duration of the fixation cross in ms (default: 800)
/ISI:							the interstimulus interval between fixation cross and square in ms (default: 250)
/responsewindow:				the responsewindow/duration of square in ms (default: 1000)
/ITI:							the intertrial interval in ms (default: 500)

/left_x:						the left square coordinate in % of screen canvas (default: 15%)
/right_x:						the left square coordinate in % of screen canvas (default: 85%)
/squaresize:					the square size in % of canvas height (default: 25%)