___________________________________________________________________________________________________________________ *ALTERNATING SERIAL REACTION TIME TASK (ASRT)* with mouse input ___________________________________________________________________________________________________________________ Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC Date: 02-03-2017 last updated: 10-10-2023 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC Script Copyright © 10-10-2023 Millisecond Software ___________________________________________________________________________________________________________________ BACKGROUND INFO ___________________________________________________________________________________________________________________ This script implements an Alternating Serial Reaction Task (with 4 different response buttons) based on Howard, D.V. & Howard, J.H. (2004). Implicit Sequence Learning: Effects of Level of Structure, Adult Age, and Extended Practice. Psychology and Aging, 19, 79–92. Note: this script runs with Mouse Input. Inquisit script asrt.iqjs runs the key-input version. ___________________________________________________________________________________________________________________ TASK DESCRIPTION ___________________________________________________________________________________________________________________ Participants are presented 4 gray boxes in 4 possible screen positions (1, 2, 3, 4 with 1 being the left most box). The boxes sequentially turn red and participants have to press the corresponding box with the mouse. The boxes turn red in semi-random fashion: a basic repeating pattern sequence (Example: 1, 3, 2, 4) is interweaved with a random sequence. Result: 1(Pattern), Random, 3 (Pattern), Random, 2 (Pattern), Random, 4 (Pattern), Random, 1 (Pattern), Random....etc The number of random trials in between pattern trials is determined by parameters.lag: lag = 2 => each pattern trial is followed by 1 random trial (every other trial is a pattern trial) lag = 3 => each pattern trial is followed by 2 random trials etc. (every third trial is a pattern trial) ___________________________________________________________________________________________________________________ DURATION ___________________________________________________________________________________________________________________ the default set-up of the script takes appr. 45 minutes to complete ___________________________________________________________________________________________________________________ DATA OUTPUT DICTIONARY ___________________________________________________________________________________________________________________ The fields in the data files are: (1) Raw data file: 'asrt_mi_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 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 such as feedback trials. Thus, trialNum may not reflect the number of main trials run per block. sequence: pattern sequence run (parameter) Lag: sets the lag between patter trials (default: 2) lag1 = every trial is a pattern trial (p1, p2, p3, p4, p1....) lag2 = every other trial is a pattern trial (p1, r, p2, r, p3, r, p4, r, p1....) lag3 = every third trial is a pattern trial (p1, r, r, p2, r, r, p3, r, r, p4, r, r, p1....) countTestBlocks: counts the number of test blocks run countPatternTrials: counts the pattern trials in a block (resets for each test block) countRandomTrials: counts the random trials in a block (resets for each test block; excludes the start trials before the pattern is started) countSequenceReps: counts the number of pattern sequence reps in a block (does not count starter trials) index: helper variable to determine the next stim position position: 1, 2, 3, or 4 => screen position of the red stim (red box) from left to right (parameter) RSI: Response Stimulus Interval in ms (interval between correct response and presentation of next stimulus) (default: 120ms) response: the FINAL trial response Note: script saves the final and -by design- correct response correct: the correctness of the INITIAL response (1 = correct; 0 = incorrect) Note: only correct responses advance to the next trial latency: the response latency/reaction time (in ms); measured from onset of red box stimulus until the correct response was entered (error penalty included) p: pattern trial r: random trial feedbackAcc: overall proportion correct (pattern and random trials) feedbackRT: overall (pattern and random trials) median response time of correct responses list.accuracyP.mean: proportion correct pattern trials in the current block (including currently run trial) list.latenciesP.median: median latency (in ms) of responding to pattern trials in the current block (including currently run trial) list.accuracyR.mean: proportion correct random trials in the current block (including currently run trial) list.latenciesR.median: median latency (in ms) of responding to random trials in the current block (including currently run trial) (2) Summary data file: 'asrt_mi_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) sequence: pattern sequence run (parameter) lag: sets the lag between patter trials (default: 2) lag1 = every trial is a pattern trial (p1, p2, p3, p4, p1....) lag2 = every other trial is a pattern trial (p1, r, p2, r, p3, r, p4, r, p1....) lag3 = every third trial is a pattern trial (p1, r, r, p2, r, r, p3, r, r, p4, r, r, p1....) countTestBlocks: Test Block Counter Performance Data: proportion correct measures the accuracy of the INITIAL response; 'latency correct' measures the response time until the correct response was made p: pattern trial r: random trial accP: the mean of all block proportion corrects for pattern trials rtP: the mean of all block median correct latencies (in ms) for pattern trials accR: the mean of all block proportion corrects for random trials (start trials excluded) rtR: the mean of all block median correct latencies (in ms) for random trials (start trials excluded) and separately for each testblocks: ACC1_P - ACC21_P: proportion correct for Pattern trials (block1-21) RT1_P - RT21_P: median correct latency (in ms) for Pattern trials (block1-21) ACC1_P - ACC21_R: proportion correct for Random trials (block1-21) RT1_P - RT21_R: median correct latency (in ms) for Random trials (block1-21) ___________________________________________________________________________________________________________________ EXPERIMENTAL SET-UP ___________________________________________________________________________________________________________________ *21 ASRT blocks that run - 10 random position start trials (excluded from analysis) - number of pattern repetitions (default: 10) x length of pattern sequence (default: 4) = 40 pattern trials - number of random patterns = (parameters.lag - 1) * number of pattern trials (by default, with lag= 2: 40 random trials) Each block starts with the presentation of 4 gray boxes for 120ms before the first box turns red. Incorrect responses are recorded but response needs to be corrected for trial to terminate. After a correct response, the next target is presented after a response-stimulus interval (default RSI is 120 ms; this can be edited under Editable Parameters). ___________________________________________________________________________________________________________________ STIMULI ___________________________________________________________________________________________________________________ 4 gray boxes - size and screen location can be edited under Editable Parameters. Position of targets (box turning red) can be edited under section Editable Lists ___________________________________________________________________________________________________________________ INSTRUCTIONS ___________________________________________________________________________________________________________________ are not original; edit 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: /lag: sets the lag between patter trials (default: 2) lag1 = every trial is a pattern trial (p1, p2, p3, p4, p1....) lag2 = every other trial is a pattern trial (p1, r, p2, r, p3, r, p4, r, p1....) lag3 = every third trial is a pattern trial (p1, r, r, p2, r, r, p3, r, r, p4, r, r, p1....) /nrBlocks: number of blocks run (default: 21) Note: default script provides summary variables for 21 blocks; if more should be run add necessary values to VALUES and update block.ASRT under section BLOCK accordingly /maxPatternRepetitions: the maximum number of pattern repetitions per block (default: 10) interface: /pos1X: the first horizonal box position from the left in canvas width percentages (0% at the far left of canvas - 100% far right of canvas) /pos2X: the second horizonal box position from the left in canvas width percentages /pos3X: the third horizonal box position from the left in canvas width percentages /pos4X: the fourth horizonal box position from the left in canvas width percentages /stimHeight: height of the boxes in canvas height percentages (default: 5%) Duration Paramters (in ms): /rsi: Response Stimulus Interval in ms (interval between correct response and presentation of next stimulus) (default: 120ms) /breakDuration: the duration of the breaks (in ms) in between test blocks (default: 30000) /readyDuration: duration (in ms) of getting ready trial (default: 5000ms)