Return to the Approach Avoidance Task (joystick version) page
___________________________________________________________________________________________________________________	

							APPROACH-AVOIDANCE TASK (AAT) - with gamepad (joystick)
___________________________________________________________________________________________________________________	


Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 08-17-2012
last updated:  01-08-2020 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 01-08-2020 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________
This script implements the Approach-Avoidance Task (AAT), a test of implicit behavioral avoidance tendencies.
This script uses a gamepad (joystick) for response making and is thus limited to Windows.

Reference:

Wiers, R.W., Rinck, M., Dictus, M. & Wildenberg van den, E. (2009). Relatively strong
automatic appetitive action-tendencies in male carriers OPRM1 G-allele. Genes, Brain and Behavior, 8, 101-106.

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________	
Participants are asked to do a categorization task of portrait vs. landscape pictures (of 4 different categories, e.g. alcohol, soda etc).
If the picture is a landscape picture, they are asked to push the joystick away from body which shrinks the picture (=AVOID). 
If the picture is a portrait picture, they are asked to pull the joystick towards body which enlarges the picture (=APPROACH). 
Pull (Approach) and Push (Avoid) responses in regard to landscape and portrait formats are counterbalanced across participants 
by groupnumber.

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

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

(1) Raw data file: 'aat_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
 
values.expcondition:				used for counterbalancing experimental conditions
									1: push for landscape, pull for portrait
									2: pull for landscape, push for portrait
																
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.currentTrial:				the name of the currently running Trial	Sequence (e.g. AAT_1)	
									
values.stimulus:					the presented stimulus image

values.targetcategory:					the targetcategory of the targetstimulus, 1 - 4
									1) alcohol pictures
									2) color and shape matched appetitive stimuli (e.g pictures of soda bottles)
									3) positive pictures containing people and animals
									4) negative pictures containing people and animals
									
values.targetformat:				the targetformat of the targetstimulus (l = landscape; p = portrait)
values.initialresponse:				stores the original response to the stimulus (PUSH vs. PUL)
values.accuracy:					stores the correctness of the initial response (1 = correct; 0 = error)
values.finalresponse:				stores the final response: PUSH vs. PULL
values.changedirection:			stores how often participant changed direction during zooming (0 = no change)
values.RT:						stores the latency of the initial response (in ms)
values.completeRT:				stores how long it takes until the joystick is fully extended in whatever direction (in ms)


(2) Summary data file: 'aat_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)

values.expcondition:				used for counterbalancing experimental conditions
									1: push for landscape, pull for portrait
									2: pull for landscape, push for portrait

expressions.propcorrect_overall:			proportion correct across all test trials
expressions.meanRT_overall:				mean latency (in ms) of correct responses across all test trials
expressions.SD_RT:						standard deviation of correct responses across all test trials
expressions.medianRT_overall:				median latency (in ms) of correct responses across all test trials

+ corrected AAT Difference Scores for each of the 4 main categories, 
Diff Scores = median latency of correct trials for Push trials - median latency of correct trials for Pull trials
!!! NOTE: latency only for initial response 

Interpretation: 
Positive Scores = Pushing slower than pulling => "APPROACH"
Negative Scores = Pulling slower than pushing => "AVOID"

values.sequence:	  				the experimental trial sequence generated for the participant

___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________

format/direction counterbalanced by group number (odd vs even) (Inquisit Lab: manual input of subject id and group id at beginning of task)
1. runs a trial sequence generation block via helper script AAT_SequenceGenerator.iqx
2. runs a practice block
3. runs the AAT test block

PRACTICE: 
* PracticeStimuli: gray rectangle in landscape and portrait format
* 10 trials (5 landscape and 5 portrait formats in random order)
* gives error feedback

TEST BLOCK:
* 80 test trials (4 categories x 2 formats x 10 repetitions) in a semi randomized order (see below for more info on generating the trial sequence)
* intertrial interval of 300ms

TRIAL SEQUENCE:
Wiers et al (2009) used a semi randomized order of all 80 test stimuli with the following two constraints:
1. no more than three consecutive stimuli of the same category 
2. no more than three consecutive stimuli of the same format 

Note: a helper script "AAT_SequenceGenerator" generates a trialsequence that fulfills those constraints.
1. The time to generate this sequence DOES differ across participants
2. The code is specific to running 8 categories
If more categories should be run, go to section 'BLOCKS' and follow instructions to use a complete randomized algorithm (without constraints).
	
___________________________________________________________________________________________________________________	
STIMULI
___________________________________________________________________________________________________________________
Wiers et al (2009): categorization of 4 types of stimuli 
1) alcohol pictures
2) color and shape matched appetitive stimuli (e.g pictures of soda bottles)
3) good pictures containing people and animals
4) bad pictures containing people and animals

* 10 stimuli per category (each of these in landscape and portrait format)
* The stimuli used in this script are based on the original ones used. 
Millisecond Software thanks Dr. Wiers for generously sharing his material! 

Just a word of caution: the stimuli are culturally specific and may not work for your study. To substitute your own stimuli, go to 
EDITABLE CODE -> editable STIMULI -> item.targets

___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________
The instructions are not original to Wiers et al (2009). They are provided by Millisecond Software
as htm/html pages and can be edited by changing the provided htm/html files.
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:

/Startheight_ratioA:			sets the initial size of the landscape pictures (default ratio: 0.4 of active screenheight)
/Startheight_ratioB:			sets the initial size of the portrait pictures (default ratio: 0.4 of active screenheight)
/MinHeight_ratioA:			sets the the min picture height of the landscape pictures(default: 0.1 => 10% of MaxHeight)
/MinHeight_ratioB:			sets the the min picture height of the portrait pictures(default: 0.1 => 10% of MaxHeight)
/intertrialinterval: 				sets the intertrialinterval for the AAT trials in ms (default: 300ms)