Rapid Reaching Task

Technical Manual

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com), Millisecond

Created: December 11, 2019

Last Modified: September 02, 2026 by K. Borchert (katjab@millisecond.com), Millisecond

Script Copyright © Millisecond Software, LLC

Background

This script implements a version of the Rapid Reaching Task for children - a task to study children’s risk-taking in everyday visuomotor situations when wrong choices could be costly - inspired by the published paradigm by Dekker et al (2016).

The script was originally written for and generously shared with the Millisecond library by Dr. Sara Haas.

References

Dekker TM, Nardini M. Risky visuomotor choices during rapid reaching in childhood. Dev Sci. 2016;19(3):427–439. doi:10.1111/desc.12322

Duration

25 minutes

Description

Participants press the SPACE key (or click/touch a dedicated Start button) that lies below a fixed frame. Soon after touching down on the Start button two overlapping circles, a green circle and a (e.g.) blue circle, appear in the frame. Participants have to release the Start button and click/touch the area within the green circle as fast as they can without landing in the area of the penalty area (e.g. the blue circle). Different costs for touching the penalty circle as well as outside the green circle are tested.

Procedure

(1) Demo Phase: 20 trials
=> The Demo Phase runs 20 trials with no time limits and additional text reminders on screen
=> the penalty circle is gray (hitting the penalty circle does not result in negative feedback)
=> hitting the green circle results in a point (but the point does not count towards count of total points)

(2) Training Phase: 15 blocks of 20 trials each
=> the Training phase starts with a time limit of 1000s
=> at the end of each training block it is checked whether performance is better or at 90% correct
AND participant has not timed out during any of the trials. In this case, the timeout gets adjusted down:
- the first adjustment will delete 100ms
- any subsequent adjustments will delete 50ms
=> the penalty circle is gray (hitting the penalty circle does not result in negative feedback)
=> hitting the green circle results in a point (but the point does not count towards total points)
=> the last two training blocks are run with the final test timeout (by default - editable parameter)

(3) Test Phase: 10 blocks of 20 trials

a) low penalty blocks: 5 blocks (color of penalty circle is blue; penalty => 1 point deduction)
b) high penalty blocks: 5 blocks (color of penalty circle is yellow; penalty => 5 point deduction)
=> order of low/high penalty blocks is counterbalanced by assigned groupnumber
=> odd groupnumbers run: low penalty -> high penalty
=> even groupnumbers run: high penalty -> low penalty

No Response Penalty: a no response penalty results in deduction of 7 points and a delay of the next trial of 20s
Misses Penalty: clicking/touching anywhere else on the screen does not result in deduction or winning of points


General Trialsequence:

1. Start: fixation cross (+ Start Button if task runs with mouse input)

2. Display: as soon as the space key/start button is pressed down, the fixation frame appears
=> 500ms later the target circle/penalty circle display is presented
(if participant lifts off from the start button/space key before the display appears or
within 100ms of display presentation, the trial sequence is aborted and a new one is started.
The trial sequence is further aborted if up-response is detected before the
target display appears.)

3. Response: participants are asked to touch/click on the green circle as fast as possible
within the current time limit

4. Response Feedback: the computer displays a turquoise X where the screen was clicked/touched
and presents the number of points won or lost during this trial
=> if only the green circle was pressed: + 1
=> if only the penalty circle was clicked: -1 or -5
=> if the overlap region was pressed: sum of reward/penalty points

5. TEST only: Reward Meter
A visual reward meter is presented

6. Time out Delay: this trial is only run if a participant did not respond in time and has to wait
20sec for the next trial sequence


Distance Target/Penalty Circle:

this script varies the distance btw. target and penalty circle (within-factor):
two different conditions are run
near: center of penalty circle is 1 radius away from center of target circle
far: center of penalty circle is 1.5 radius away from center of target circle

The order within a block is randomly determined with the constraint that an equal number of each
condition is run within each block

Location Target/Penalty Circle:
The computer randomly jitters the x and y positions of the target circle within 31.5mm (based
on default measurements) of the x and y center position of the fixation frame
(see expressions.maxTargetOffsetMM)


the default height of the fixation frame is 81mm
=> 40.4mm are available on the top and bottom of the center to display the target circle
=> target circle has a radius of 9mm (40.5 - 9 = 31.5mm)
=> the max. displacement for the target center is 31.5mm


1. penalty circle is always to the right or left of target circle
2. it is randomly determined whether the penalty circle is presented to the left or the right of the
target circle

Stimuli

provided by Millisecond (not original) - can be edited under section Editable Stimuli

Instructions

provided by Millisecond (not original) - can be edited under section Editable Instructions
in script rapidreachingtask_instructions_inc.iqjs.

Scoring

Efficiency Scores
Efficiency scores are calculated by normalizing the participant's actual performance relative to a
"baseline" strategy (aiming right at the target center).
The final scores for each of the four experimental conditions are calculated as follows:

efficiency = ((expected gain from intended coordinates) - (expected gain from center coordinates)) / ((expected gain from optimal coordinates) - (expected gain from center coordinates))
=> around 0 if intended coordinates are the center coordinates
=> around 1 if intended coordinates fall around optimal coordinates
=> < 0: Negative Efficiency => Maladaptive strategy

a. Script attempts to find optimal coordinates
intended coordinates: calculated as the mean response x and mean response y coordinate in each of the four conditions
the response coordinates were corrected for a (0/0) coordinate system around the target center with a
penalty circle always located to the left of the target. Positive horizontal response coordinates (to the right of target) indicate
a response avoiding penalty circle.

optimal coordinates (for participant): script runs a routine that attempts to find the coordinates with the highest gain taking into account
participants response variability

b. Script attempts to find expected gains
A second algorithm calculates the expected gain for the Intended/Optimal/Center Coordinates in each of the four conditions.

Summary Data

File Name: rapidreachingtask_child_summary*.iqdat

Data Fields

NameDescription
startDate Date the session was run
startTime Time the session was run
subjectId Participant ID
groupId Group number
sessionId Session number
inquisit.version Inquisit version number
computer.platform Device platform: win | mac |ios | android
computer.touch 0 = device has no touchscreen capabilities; 1 = device has touchscreen capabilities
computer.hasKeyboard 0 = no external keyboard detected; 1 = external keyboard detected
elapsedTime Session duration in ms
completed 0 = Test was not completed
1 = Test was completed
initResponseInputVersion "keyboard": an external keyboard is used for the finger to rest on to elicit a trial sequence
"mouse": a dedicated START button below the target frame is provided on screen for the finger to rest on to elicit a trial sequence
minScreenHeightMM The minimum needed screen height in mm to run the task with the current default settings
screenHeightMM The screen height of this device in mm
timeout The time out (in ms) used during the test
Summary Performance Metrics By Training, Test Conditions (Low & High Penalty Condition)
propCorrTraining Proportion correct training trials
meanRTTraining Mean response time (in ms) of touching the screen; measured from target onset
meanCorrRTTraining Mean response time (in ms) of touching the target area only; measured from target onset
meanTargetDistancePXTraining Mean distance btw. response coordinate and center of target (measured in screen pixels)
meanTargetDistanceMMTraining Mean distance btw. response coordinate and center of target (converted to mm)
toCounterTraining The number of times participant did not respond in time during the training phase
propCorrTest Proportion correct Test trials
meanRTTest Mean response time (in ms) of touching the screen; measured from target onset
meanCorrRTTest Mean response time (in ms) of touching the target area only; measured from target onset
meanTargetDistancePXTest Mean distance btw. response coordinate and center of target (measured in screen pixels)
meanTargetDistanceMMTest Mean distance btw. response coordinate and center of target (converted to mm)
propCorrTraining Proportion correct training responses
meanDistTPXTraining Mean distance btw. response coordinate and center of target (measured in screen pixels)
meanDistTMMTraining Mean distance btw. response coordinate and center of target (measured in mm)
meanRTTraining Mean response time (in ms) of touching the screen during traing trials; measured from target onset
meanCorrRTTraining Mean response time (in ms) of touching the target area only (training); measured from target onset
toCounterTraining The number of times participant did not respond in time during the training phase
propCorrNearLow Proportion correct responses in Near/Low test condition
meanDistTPXNearLow Mean distance btw. response coordinate and center of target (measured in screen pixels)
meanDistTMMNearLow Mean distance btw. response coordinate and center of target (measured in screen pixels)
meanRTNearLow Mean response time (in ms) of touching the screen in Near/Low trials; measured from target onset
meanCorrRTNearLow Mean response time (in ms) of touching the target area only (Near/Low trials); measured from target onset
toCounterNearLowPenalty The number of times participant did not respond in time in Near/Low trials
propCorrNearHigh Proportion correct responses in Near/High test condition
meanDistTPXNearHigh Mean distance btw. response coordinate and center of target (measured in screen pixels)
meanDistTMMNearHigh Mean distance btw. response coordinate and center of target (measured in screen pixels)
meanRTNearHigh Mean response time (in ms) of touching the screen in Near/High trials; measured from target onset
meanCorrRTNearHigh Mean response time (in ms) of touching the target area only (Near/High trials); measured from target onset
toCounterNearHighPenalty The number of times participant did not respond in time in Near/High trials
propCorrFarLow Proportion correct responses in Far/Low test condition
meanDistTPXFarLow Mean distance btw. response coordinate and center of target (measured in screen pixels)
meanDistTMMFarLow Mean distance btw. response coordinate and center of target (measured in screen pixels)
meanRTFarLow Mean response time (in ms) of touching the screen in Far/Low trials; measured from target onset
meanCorrRTFarLow Mean response time (in ms) of touching the target area only (Far/Low trials); measured from target onset
toCounterFarLowPenalty The number of times participant did not respond in time in Far/Low trials
propCorrFarHigh Proportion correct responses in Far/High test condition
meanDistTPXFarHigh Mean distance btw. response coordinate and center of target (measured in screen pixels)
meanDistTMMFarHigh Mean distance btw. response coordinate and center of target (measured in screen pixels)
meanRTFarHigh Mean response time (in ms) of touching the screen in Far/High trials; measured from target onset
meanCorrRTFarHigh Mean response time (in ms) of touching the target area only (Far/High trials); measured from target onset
toCounterFarHighPenalty The number of times participant did not respond in time in Far/High trials
Reaching Efficiency Score: Main Metrics For All Four Experimental Conditions
efficiencyNearLow Efficiency Score in the Near (penalty close to target) conditions with a low penalty
efficiencyFarLow Efficiency Score in the Far (penalty further away from target) conditions with a low penalty
efficiencyNearHigh Efficiency Score in the Near (penalty close to target) conditions with a high penalty (the most critical condition; requires the most motoric strategy adjustment from the center)
efficiencyFarHigh Efficiency Score in the Far (penalty further away from target) conditions with a high penalty
Expected Gains: For All Conditions
expFarHighI Expected gain for intended coordinate in the Far/High condition
expFarHighO Expected gain for optimal coordinate in the Far/High condition
expFarHighC Expected gain for target center coordinate in the Far/High condition
expFarLowI Expected gain for intended coordinate in the Far/Low condition
expFarLowO Expected gain for optimal coordinate in the Far/Low condition
expFarLowC Expected gain for target center coordinate in the Far/Low condition
expNearHighI Expected gain for intended coordinate in the Near/High condition
expNearHighO Expected gain for optimal coordinate in the Near/High condition
expNearHighC Expected gain for target center coordinate in the Near/High condition
expNearLowI Expected gain for intended coordinate in the Near/Low condition
expNearLowO Expected gain for optimal coordinate in the Near/Low condition
expNearLowC Expected gain for target center coordinate in the Near/Low condition
Coordinates (In Corrected 0/0 Coordinate System Around Target Center With Penalty Circle To The Left Of Target)
xFarHighI X-coordinate for intended touchdown in the Far/High condition
yFarHighI Y-coordinate for intended touchdown in the Far/High condition
xFarHighO X-coordinate for optimal touchdown in the Far/High condition
yFarHighO Y-coordinate for optimal touchdown in the Far/High condition
xFarLowI X-coordinate for intended touchdown in the Far/Low condition
yFarLowI Y-coordinate for intended touchdown in the Far/Low condition
xFarLowO X-coordinate for optimal touchdown in the Far/Low condition
yFarLowO Y-coordinate for optimal touchdown in the Far/Low condition
xNearHighI X-coordinate for intended touchdown in the Near/High condition
yNearHighI Y-coordinate for intended touchdown in the Near/High condition
xNearHighO X-coordinate for optimal touchdown in the Near/High condition
yNearHighO Y-coordinate for optimal touchdown in the Near/High condition
xNearLowI X-coordinate for intended touchdown in the Near/Low condition
yNearLowI Y-coordinate for intended touchdown in the Near/Low condition
xNearLowO X-coordinate for optimal touchdown in the Near/Low condition
yNearLowO Y-coordinate for optimal touchdown in the Near/Low condition
Motor Variability In Hitting Intended Coordinates
sdXFarHighI Standard deviation of intended x coordinate in the Far/High condition
sdYFarHighI Standard deviation of intended y coordinate in the Far/High condition
sdXFarLowI Standard deviation of intended x coordinate in the Far/Low condition
sdYFarLowI Standard deviation of intended y coordinate in the Far/Low condition
sdXNearHighI Standard deviation of intended x coordinate in the Near/High condition
sdYNearHighI Standard deviation of intended y coordinate in the Near/High condition
sdXNearLowI Standard deviation of intended x coordinate in the Near/Low condition
sdYNearLowI Standard deviation of intended y coordinate in the Near/Low condition
Debugging Variable
expConditionArray Stores the calculated optimal coordinates and expected gains in each of the four conditions in JSON format

Raw Data

File Name: rapidreachingtask_child_raw*.iqdat

Data Fields

NameDescription
date Date the session was run
time Time the session was run
subject Participant ID
group Group number
session Session number
build Inquisit version number
computer.platform Device platform: win | mac |ios | android
computer.touch 0 = device has no touchscreen capabilities; 1 = device has touchscreen capabilities
computer.hasKeyboard 0 = no external keyboard detected; 1 = external keyboard detected
blockcode The name the current block (built-in Inquisit variable)
blocknum The number of the current block (built-in Inquisit variable)
trialcode The name of the currently recorded trial (built-in Inquisit variable)
trialnum The number of the currently recorded trial (built-in Inquisit variable)
trialnum is a built-in Inquisit variable; it counts all trials run
even those that do not store data to the data file.
blockCounterPerPhase Tracks the number of blocks run during the current phase
trialCounterBlock Tracks the number of trials run during the current block
initResponseInputVersion "keyboard": an external keyboard is used for the finger to rest on to elicit a trial sequence
"mouse": a dedicated START button below the target frame is provided on screen for the finger to rest on to elicit a trial sequence
minScreenHeightMM The minimum needed screen height in mm to run the task with the current default settings
screenHeightMM The screen height of this device in mm
mainPhase "Demo", "Training", "Test"
subPhase "Demo", "Training", "LowPenalty","HighPenalty"
timeout The timeOut (in ms) for the current trial
penaltyDisplacementCondition 1 = small displacement btw. target circle and penalty ('near')
2 = far displacement btw. target circle and penalty
penaltyLocation 0 = penalty circle is to the left of target
1 = penalty circle is to the right of target
penaltyPointsCondition 1 = low penalty point condition; 2 = high penalty point condition
penaltyPoints The currently assigned penalty points if participant touches penalty area
selectPenaltyStim Stores the itemnumber of the stimulus used for the penalty circle in the current trial
1 = blue (low penalty condition); 2 = yellow (high penalty condition); 3 = gray (training)
response The participant's response (will be generic such as mouse.lButtonDown/57 for spacebar press; 0 = noResponse)
mouse.x The horizontal screen coordinate of the response (not valid for no responses)
mouse.y The vertical screen coordinate of the response (not valid for no responses)
respX The converted x-mouse coordinate in a (0/0) coordinate system around the center of the target with penalty circle located to the left of the target
=> positive values: response was made to the right of the target = in the opposite horizontal direction of the penalty circle (away from penalty circle)
=> negative values: response was made closer to penalty circle
respY The converted y-mouse coordinate in a (0/0) coordinate system around the center of the target with penalty circle located to the left of the target
responseRegion Stores the response region
target only (= within the green circle only)
target-penalty overlap (= within the overlap of green circle and penalty circle)
penalty only (=within the penalty circle only)
miss (= somewhere else on the screen)
NR = no response
correct 1 = participant touched target area only
0 = any other response
targetOnsetTimestamp Stores the script.elapsedTime (in ms) at time of target appearance
startButtonLiftOffTimestamp Stores the script.elapsedTime (in ms) at time of start-button lift-off
responseTimeTimestamp Stores the script.elapsedTime (in ms) at time of touch response
rtTargetOnset The difference (in ms) in the elapsedTime btw. target onset (targetOnsetTimestamp) and down response (responseTimeTimestamp)
=> time it took after target onset to respond by touching the screen
=> rt; measured from target onset
rtLiftOffStartButton The difference (in ms) in the elapsedTime of the up response (startButtonLiftOffTimestamp) and down response (responseTimeTimestamp)
=> time it took after lifting finger off the start button to respond by touching the screen
=> rt; measured from start button lift-off
redoCounter Counts the number of times during the test that a trial sequence had to restart
due to a premature lift-off the Start button or a lift-off within 100ms of
target onset (considered a anticipatory response)
trialPoints Stores the trial points earned (or lost) during the current trial
totalPoints Stores the total points earned
toCounter Tracks the number of times a participant did not respond within the time limit within the current block
(resets for each block)
xCenterPX Horizontal x-coordinate in screen pixels
yCenterPX Vertical y-coordinate in screen pixels
xTargetPX Stores the horizontal position of the target in pixels
yTargetPX Stores the vertical position of the target in pixels
xPenaltyPX Stores the horizontal position of the penalty circle in pixels
yPenaltyPX Stores the vertical position of the penalty circle in pixels
targetRadiusPX The radius of the target (image)in screen pixels
responseDistanceTargetPX The calculated distance (in pixels) btw. mouse/touch response and center of target circle
responseDistancePenaltyPX The calculated distance (in pixels) btw. mouse/touch response and center of penalty circle
responseDistanceTargetMM The mm-distance of mouse response and center of target circle
responseDistancePenaltyMM The mm-distance of mouse response and center of penalty circle

Parameters

The procedure can be adjusted by setting the following parameters.

NameDescriptionDefault
Design Parameters
initResponseInputVersion 'initial response input': choose between: "keyboard", "mouse", ""
"keyboard": script requires an external keyboard.
Participants wait on the [space] key until they are asked to hit the target circle
"mouse": The script always provides a START button on the screen that needs to be clicked/touched.
"": script uses "keyboard" version if an external keyboard with a touchscreen is detected; otherwise it defaults
to the "mouse" version
all version use mouse/touch input for hitting the target circle
""
penaltyDisplacementFactor1 The 'close' displacement btw. target center and penalty circle center as a factor of the circle radius
=> center of penalty circle lies on target radius
1
penaltyDisplacementFactor2 The 'far' displacement btw. target center and penalty circle center as a factor of the circle radius
=> center of penalty circle lies outside the target radius
1.5
targetPoints The number of points awarded for pressing the target circle1
penaltyPointsLow The number of points lost for pressing the penalty circle in the low penalty condition1
penaltyPointsHigh The number of points lost for pressing the penalty circle in the high penalty condition5
missPenaltyPoints The number of points lost for pressing outside the target and/or penalty circle = miss0
timeoutPenaltyPoints The number of points lost for not responding in time7
trialsPerBlockDemo Number of demo trials per block20
trialsPerBlockTraining Number of training trials per block20
trialsPerBlockLowPenalty Number of low penalty trials per block20
trialsPerBlockHighPenalty Number of high penalty trials per block20
numberTimedTrainingBlocks Number of timed training blocks15
numberOfTrainingBlocksToRunWithTestTimeout By default the last two training blocks are run with the final test timeout2
numberHighPenaltyBlocks Number of high penalty blocks5
numberLowPenaltyBlocks Number of low penalty blocks5
propCorrTrainingCriterium Proportion correct performance during training blocks can result in lowering the timeout duration0.9
Sizing Parameters
distanceScreenCenterToFrameCenterMM The distance (in mm) of the fixation frame center to the center of the screen
the center of the frame will always be at (default) or above the center of the screen
0
fixationCrossHeightMM The height of the fixation cross in mm10
fixationFrameWidthMM The width of the fixation frame in mm115
fixationFrameHeightMM The height of the fixation frame in mm81
fixationFrameBorderMM The width of the fixation frame border in mm3
targetRadiusMM The radius of target circle in mm 9
distanceFrameCenterToStartButtonMM The distance (in mm) of the center of the start button
to the center of the fixation frame
the start button will always be located at or below the center of the fixation frame
70
startButtonSizeMM The size of the square Start button in mm15
Timing Parameters
timeoutDelayPenaltyMSTraining The delay of the next trial after a timed-out response during training20000
timeoutDelayPenaltyMSLowPenalty The delay of the next trial after a timed-out response during low penalty20000
timeoutDelayPenaltyMSHighPenalty The delay of the next trial after a timed-out response during high penalty20000
targetOnsetMS The time (in ms) btw. pressing on start-button and onset of target500
anticipatoryResponseMS The time (in ms) after onset of target that is considered the timeframe for an anticipatory response100
startTimeoutDurationMS The timeout duration (in ms) at the start of the training blocks1000
feedbackDurationMS Feedback duration (in ms)1000