User Manual: Inquisit Visual Memory Game


___________________________________________________________________________________________________________________	

										Visual Memory Game
										(template)
___________________________________________________________________________________________________________________	

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 06-02-2023
last updated:  10-30-2023 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 10-30-2023 Millisecond Software
___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________
This script implements Millisecond Software's version of a visual memory game inspired by the work of 
Isola et al (2014) who studied memorability of images.
Note that the procedure implemented in this script is not a replica of the Isola et al (2014)
design. The implemented procedure runs considerably fewer images and cannot be interrupted across
several sessions.

*Reference*

Isola, P., Jianxiong Xiao, Parikh, D., Torralba, A., & Oliva, A. (2014). What Makes a Photograph Memorable? 
IEEE Transactions on Pattern Analysis and Machine Intelligence, 36(7), 1469–1482. 
https://doi.org/10.1109/TPAMI.2013.200
											
___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________

Participants view a sequence of images. Some of the images are presented only once (fillers).
Some images will be repeated once 1-7 positions later (vigilance items), and some images will
be repeated once 91-107 positions later (target items).
Participants are asked to press the spacebar whenever they think they see a repeated images.
___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. 20 minutes to complete

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

(1) Raw data file: 'visualmemorygame_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:					with the current subject id
group: 						with the current group id
session:					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. 
								
//parameter settings								
runRandomImageAssignment:		true (1) = the program will randomly assign images to be targets, vigilance items or filler items
								false (0) = the program will use the a-priori/default assignments -> see item.imageConditions
																						
runRandomizedTrialOrder:		true (1) = the program attempts to create a unique sequence of trials (if possible)
								false (0) = the program uses the default sequence as stored in list.conditionSequence/list.repeatConditions/list.pairs								

only relevant if parameters.runRandomizedTrialOrder = true								
success:						1 = the script successfully created a unique sequence
								0 = the script could NOT successfully create a unique sequence and used the default sequences instead

countTrials:					tracks the number of images presented (= the position of the current position in the image sequence)																								
condition:						1 = target item; 2 = vigilance item; 3 = filler item 
repeatCondition					1 = first presentation (wait!); 2 = presentation (require spacebar press!) 
itemnumber:						the itemnumber of the currently presented image 
pairedPosition:					the sequence position of the paired repeated (or first) image presentation (empty for filler items)
								
imageCategory:					the category that the current image belongs to (if any, see item.imageCategories)
								NA = not applicable (default in this script)
															
stimulusitem:				presented stimuli
response:					the response of participant (scancode of response button)
correct:					correctness of response (1 = correct, 0 = error)
latency:					response latency (in ms); measured from: onset of image until spacebar press (or end of trial)

//counts 
count_t1:					tracks the number of target1 (t1) presentations
count_t2:					tracks the number of target2 (t2-repeated targets) presentations
count_v1:					tracks the number of vigilance1 (v1) presentations
count_v2:					tracks the number of vigilance2 (v2-repeated vigilance) presentations
count_f:					tracks the number of filler presentations


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

inquisit.version:			Inquisit version run
computer.platform:			the platform the script was run on (win/mac/ios/android)
startDate:					date script was run
startTime:					time script was started
subjectid:					assigned subject id number
groupid:					assigned group id number
sessionid:					assigned session id number
elapsedTime:				time it took to run script (in ms); measured from onset to offset of script
completed:					0 = script was not completed (prematurely aborted); 
							1 = script was completed (all conditions run)	
							
//parameter settings

numberTargets:					the number of target images 
numberVigilance:				the number of vigilance images 
numberFillers:					the number of filler items
								
runRandomImageAssignment:		true (1) = the program will randomly assign images to be targets, vigilance items or filler items
								false (0) = the program will use the a-priori/default assignments -> see item.imageConditions
																						
runRandomizedTrialOrder:		true (1) = the program attempts to create a unique sequence of trials (if possible)
								false (0) = the program uses the default sequence as stored in list.conditionSequence/list.repeatConditions/list.pairs								

only relevant if parameters.runRandomizedTrialOrder = true								
success:						1 = the script successfully created a unique sequence
								0 = the script could NOT successfully create a unique sequence and used the default sequences instead
																					

//summary data:
propCorrect_overall:			proportion correct responses across all image presentation trials

//hitanalyses:
hitrate_overall: 				hitrate for correctly identifying repeated images as repeats
hitRT_overall:					the response time (in ms) correctly identifying repeated images as repeats
hitrate_targets: 				hitrate for correctly identifying repeat targets as repeats
hitRT_targets:					the response time (in ms) correctly identifying repeat targets as repeats
hitrate_vigilance: 				hitrate for correctly identifying repeat "vigilance items" as repeats
hitRT_vigilance:				the response time (in ms) correctly identifying repeat "vigilance items" as repeats

//commissions:
commissionrate_overall: 		commissionrate for incorrectly identifying non-repeated images as repeats
commissionRT_overall:			the response time (in ms) incorrectly identifying non-repeated images as repeats
commissionrate_targets: 		commissionrate for incorrectly identifying non-repeated targets (first presentation) as repeats
commissionRT_targets:			the response time (in ms) incorrectly identifying non-repeated targets (first presentation) as repeats
commissionrate_vigilance: 		commissionrate for incorrectly identifying non-repeated "vigilance items" (first presentation) as repeats 
commissionRT_vigilance:			the response time (in ms) incorrectly identifying non-repeated "vigilance items" (first presentation) as repeats
commissionrate_filler: 			commissionrate for incorrectly identifying non-repeated fillers as repeats 
commissionRT_filler:			the response time (in ms) incorrectly identifying non-repeated fillers as repeats
							
___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	

(1) block.setup:
This block is a helper block. It assembles the unique sequence of images IF
parameters.runRandomizedTrialOrder = true AND a unique sequence of images within constraints can
be found within time constraints (otherwise the default ones are run).
It also assigns the specific images to their designated target/vigilance/filler conditions
and positions within the sequence
(-> Note that even if the a-priori assignments of targets/vigilance/filler is requested (see parameters.runRandomImageAssignment), 
the actual position in which a target/vigilance/filler image is presented within the sequence is randomly determined by default.
Changes to a fixed assignment are possible by changing list.targetItemnumbers/vigilanceItemnumbers/fillerItemnumbers)

(2) Block.VMG:
- presents 454 images with 
	* 168 images that are repeated once (targets). Target repeats occur after 91-109 positions (see list.targetDistance).
	Note: only the second presentations of designated target images require a spacebar press
	* 34 images that are repeated once (vigilance items). Vigilance items are repeated after 1-7 positions (see list.vigilanceDistance) 
	Note: only the second presentations of designated vigilance images require a spacebar press
	* 50 images that are presented only once (filler items). NO SPACEBAR PRESS
	
- a rest trial is provided after 120 trials (editable parameter)
Note: target/vigilance presentation transcends across block segments

Trial Sequence:
image (for 1000ms) -> iti/feedback trial (presents +) for 1400ms
Notes:
1. The responsewindow is equal to the image presentation duration (1000ms, editable parameter).
2. Visual Response Feedback is provided: while the image stays on the entire 1000ms even if a response is made,
participants get visual feedback if they press the spacebar.
3. If response (press spacebar/wait) is correct, the + during iti/feedback turns green.
Otherwise it presents in gray.
___________________________________________________________________________________________________________________	
STIMULI
___________________________________________________________________________________________________________________

provided by Millisecond Software - can be edited under section 'Editable Stimuli'.
The provided images were downloaded from pixabay.com and are only intended as stand in placeholders.
All images were resized to W:H=800px:600px.

Note: this script provides the opportunity to test visual memory of different categories of stimuli 
(e.g. positive, negative or neutral images) - see item.imageCategories.
The default script does not run any a-priori classifications of images.
___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________

provided by Millisecond Software - can be edited under section '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: