___________________________________________________________________________________________________________________ APPROACH-AVOIDANCE TASK (AAT) - with joystick ___________________________________________________________________________________________________________________ Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC Date: 08-17-2012 last updated: 10-10-2024 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC Script Copyright © 10-10-2024 Millisecond Software ___________________________________________________________________________________________________________________ BACKGROUND INFO ___________________________________________________________________________________________________________________ This script implements the Approach-Avoidance Task (AAT), a test of implicit behavioral avoidance tendencies. This script uses a 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 OUTPUT DICTIONARY ___________________________________________________________________________________________________________________ The fields in the data files are: (1) Raw data file: 'AATraw*.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 (winmaciosandroid) date, time: date and time script was run subject, group: with the current subject/groupnumber session: with the current session id 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. currentTrial: the name of the currently running Trial Sequence (e.g. AAT1) stimulus: the presented stimulus image 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 targetFormat: the targetFormat of the targetstimulus (l = landscape; p = portrait) correctResp: stores the correct response for the current stimulus initialResponse: stores the original response to the stimulus (PUSH vs. PUL) accuracy: stores the correctness of the initial response (1 = correct; 0 = error) finalResponse: stores the final response: PUSH vs. PULL changeDirection: stores how often participant changed direction during zooming (0 = no change) rt: stores the latency of the initial response (in ms) completeRT: stores how long it takes until the joystick is fully extended in whatever direction (in ms) (2) Summary data file: 'AATsummary*.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) expCondition: used for counterbalancing experimental conditions 1: push for landscape, pull for portrait 2: pull for landscape, push for portrait propCorrectOverall: proportion correct across all test trials meanRTOverall: mean latency (in ms) of correct responses across all test trials sdRT: standard deviation of correct responses across all test trials medianRTOverall: 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" 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 AATSequenceGenerator.iqjs 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 "AATSequenceGenerator" generates a trialsequence that fulfills those constraints. 1. The time to generate this sequence DOES differ across participants Safeguards are in place to prevent the script to take longer than 5s (default setting). If the script cannot produce a sequence that fullfills all constraints within that time limit or within the pre-established number of attempts (default: 1000) - whichever comes first- , a pre-generated sequence will be randomly selected from the pool of pre-generated sequences. In the majority of cases, however, a new sequence should be found within ms. 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: /interTrialInterval: //sets the intertrialinterval for the AAT trials in ms (default: 300ms) ___________________________________________________________________________________________________________________ AAT SEQUENCE GENERATOR: helper script (does not run on its own) ___________________________________________________________________________________________________________________ Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC last updated: 06-19-2024 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC Script Copyright © 06-19-2024 Millisecond Software ___________________________________________________________________________________________________________________ BACKGROUND INFO ___________________________________________________________________________________________________________________ This script is a helper script to the AAT scripts. The trial sequence generation code generates a sequence of trials that fulfills the following constraints: 1) 10 stimuli of category 1 in Format A (=1), 10 stimuli of category 1 in Format B (=2), 10 stimuli of category 2 in Format A (=3), 10 stimuli of category 1 in Format B (=4), 10 stimuli of category 3 in Format A (=5), 10 stimuli of category 1 in Format B (=6), 10 stimuli of category 4 in Format A (=7), 10 stimuli of category 1 in Format B (=8), 2) no more than three consecutive stimuli of the same category 3) no more than three consecutive stimuli of the same format the sequences produced look something like this: 86854627681534427238341865316174854225166758252358517483251343227374137614617876 NOTE: !!!! The time to generate the appropriate sequence will differ between participants. Safeguards are in place to prevent the script to take longer than 5s (default setting- can be edited). If the script cannot produce a sequence that fullfills all constraints within that time limit or within the pre-established number of attempts (default: 1000) - whichever comes first- , a pre-generated sequence will be randomly selected from the pool of pre-generated sequences (see list.predetermined_emergencysequences). In the majority of cases, however, a new sequence should be found within ms. Two alternatives are: 1) pregenerated sequences. 2) run the experiment with simple random sampling (without replacement) This trialsequence algorithm is relatively simple and may reach its limits if more conditions/trials are added. In this case, a new algorithm may have to be written or any of the two alternatives has to be used.