Return to the Effort Discount Task page
						
										Effort Discounting Task
SCRIPT INFO

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 03-22-2018
last updated: 03-23-2018 by K.Borchert (katjab@millisecond.com) for Millisecond Software LLC

Script Copyright © 03-23-2018 Millisecond Software


BACKGROUND INFO 

											*Purpose*
This script implements an Effort Discounting Task based on:

Botvinick MM, Huffstetler S, McGuire JT (2009) Effort discounting in human nucleus
accumbens. Cogn Affect Behav Neurosci 9:16–27.


											  *Task*
Participants are presented digits (1-9, no 5) and, depending on the color of the digit, are asked to perform
parity judgments (is BLUE digit odd or even?) or magnitude judgments (is YELLOW digit greater than 5?).
Parity and magnitude judgment trials run under 2 different demand conditions:
1. Low demand condition: no switching between tasks within a block of 10 trials (parity-only, magnitude-only) 
2. High demand condition: alternating between parity and magnitude tasks within a block of 10 trials
At the end of each block, the computer randomly decides (with default constraints) if the block 
should be rewarded or not. Rewards are not tied to performance nor demand condition.

The script runs 20 blocks total (5 parity blocks, 5 magnitude blocks, 10 alternate blocks)									  
											  

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

(1) Raw data file: 'effortdiscountingtask_raw*.iqdat' (a separate file for each participant)*

build:							Inquisit build
computer.platform:				the platform the script was run on
date, time, subject, group:		date and time script was run with the current subject/groupnumber 

/ phase:						"practice" vs. "test"
/practiceSessionCount:			counts the number of practice sessions run 
									Note: one practice session runs 1 block parity, 1 block magnitude, 2 blocks alternate
blockcode, blocknum:			the name and number of the current block
trialcode, trialnum: 			the name and number of the currently recorded trial
									(Note: not all trials that are run might record data; by default data is collected unless /recorddata = false is set for a particular trial/block) 

/count_LD:						counts the number of low demand (parity-only, magnitude-only) blocks run
/count_HD:						counts the number of high demand (alternate) blocks run									
/ demand:						1 = low demand condition; 2 = high demand condition		
/cue:							itemnumber of the condition cue (1 = bluedisc (parity); 2 = yellowdisc (magnitude); 3 = mixed disc)
/paymentCue:					1 = reward cue ($) should be selected; 2 = non-reward cue (X) should be selected							
/paymentDelay:					stores the randomly selected delay of the reward announcement (in ms)
stimulusitem:					for parity/magnitude trials: contains the presented digit
								(for other trials: stores first stimulus to appear)
response:						the participant's response (scancode of response button):
								30 = A (left); 38 = L (right)
								57 = spacebar
correct:						accuracy of response: 1 = correct response; 0 = otherwise
latency: 						the response latency (in ms); measured from: onset of digit
/total:							stores the total won during the test session
/countRewards_LD:				counts the number of reward blocks in the low demand condition
/countRewards_HD:				counts the number of reward blocks in the high demand condition
list.accuracy_practice.mean:	the proportion correct during the practice sessions (across all four blocks of a practice session)


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

script.startdate:				date script was run
script.starttime:				time script was started
script.subjectid:				subject id number
script.groupid:					group id number
script.elapsedtime:				time it took to run script (in ms)
computer.platform:				the platform the script was run on
/completed:						0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run)

/practiceSessionCount:			counts the number of practice sessions run 
									Note: one practice session runs 1 block parity, 1 block magnitude, 2 blocks alternate
list.accuracy_practice.mean:	the proportion correct across the last practice session run (across the 4 blocks)

/propCorrect: 					overall proportion correct across all test blocks
/meanRT:						mean correct latency (in ms) across all test blocks

/propCorrect_parity:			proportion correct across all parity-only test blocks
/meanRT_parity:					mean correct latency (in ms) of parity-only test trials
/propCorrect_magnitude:			proportion correct across all magnitude-only test blocks
/meanRT_magnitude:				mean correct latency (in ms) of magnitude-only test trials
/propCorrect_LD:				proportion correct across all low demand test blocks			
/meanRT_LD:						mean correct latency (in ms) of trials in low demand test blocks

/propCorrect_HD:				proportion correct across all alternate (high demand) test blocks			
/meanRT_HD:						mean correct latency (in ms) of trials in alternate (high demand) test blocks

* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions


EXPERIMENTAL SET-UP

2 task demand conditions: low demand vs. high demand task 

low demand: only one task is performed (no switching)
- parity: decide if the (blue) digit is odd or even
- magnitude: decide if the (yellow) digit is smaller or greater than 5

high demand: the low demand tasks alternate (the color of the digit is the cue which task to perform);
the starting condition (parity vs. magnitude) is randomly selected

Practice Session(s): 
- one practice session runs: one block parity (10 trials), one block magnitude (10 trials), and 2 blocks alternate (10 trials each)
(= 40 practice trials per session) in random order (constraint: first practice session runs the alternate blocks at the end)
- practice session is repeated if performance across all blocks < 80% correct (default, can be edited under section Editable Parameters)
- practice session ends after a maximum number of 5 repeats (default, can be edited under section Editable Parameters) 
regardless of performance and participants move on to the test
Note: This set-up differs from Botvinick et al (2009)

Test Blocks: 20* test blocks (5 parity, 5 magnitude, 10 alternate = 10 low demand blocks, 10 high demand blocks)
- each block runs 10 trials (digits are randomly chosen)
- each block has a 50/50 reward chance with the following default constraints (Note: can be turned off under section Editable Parameters):
	1. no more than 6 (out of 10) low (high) demand blocks are rewarded
	2. no fewer than 3 (out of 10) low (high) demand blocks are rewarded
	
*Note: Botvinick et al (2009) ran 18 blocks per session. For this script, a block number was selected
that was divisible by 4 to ensure that the same number of parity and magnitude blocks would be run
in the same session.

Block Sequence:
Reminder -> Get Ready (2000-8000ms, randomly sampled from list.delays) 
-> cue trial (2000ms) 
-> 10 Trials (digit stays on for max. 1500 (max responsetime) with an interstimulus interval of 500ms) -> 
Payment Delay (2000-8000ms, randomly sampled from list.delays) -> Reward Notice (2000ms) 
-> interblock interval (2000-8000ms, randomly sampled from list.delays)


STIMULI
provided by Millisecond Software - can be edited under section Editable Stimuli

INSTRUCTIONS
The instructions are provided by by Millisecond Software and are not original to Botvinick et al (2009).
They are presented as text stimuli which can be edited under section Editable Instructions
or as htm-files. The htm-instructions can be edited directly in the htm-files.

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:

/ digitSize:			the proportional sizing (relative to canvas height) of the digits (default: 15%)
/taskCueSize:			the proportional sizing (relative to canvas height) of the task cue (default: 30%)
/paymentCueSize:		the proportional sizing (relative to canvas height) of the payment cue (default: 20%)

/min_practiceACC:		the minimum proportion correct that needs to be hit before participants can move from
						practice to test session (default: 0.8)
/maxPracticeBlockRepeats:	the maximum number practice sessions run before participants moves on to the 
						test regardless of performance (default: 8)						

/reward:				the offered reward (in $) (default: 1)
/paymentConstraints:	false: script randomly decides for each block whether it's a reward or a non-reward block with p(reward) = 0.5
						true (default): script randomly decides for each block whether it's a reward or a non-reward block with p(reward) = 0.5
						with the added constraints that:
							1. no more than 6 (out of 10) low (high) demand blocks are rewarded
							2. no fewer than 3 (out of 10) low (high) demand blocks are rewarded
						(see Botvinick et al, 2009, p.16 for the description of constraints implemented on 18 test blocks)

/reminderDuration:		the duration of the task reminders (in ms) that	are presented without key instructions at the beginning of
						each block (default: 2000)
/cueDuration:			the duration (in ms) of the cue (default: 2000)
/digitDuration:			the duration (in ms) of the digit (default: 1500); Note: participants have the entire duration to respond
/iti:					the duration (in ms) of the intertrial interval (default: 500)
/paymentCueDuration:	the duration (in ms) of the payment cue (default: 2000)


/parityColor:			stores the color of the parity cue (default: blue)
/magnitudeColor:		stores the color of the magnitude cue (default: gold)
							Note: if the colors are changed, instructions as well as cues need to be updated accordingly

/ leftResponsekey:		the scancode of the left response key (default: 30)
/ rightResponsekey:		the scancode of the right response key (default: 38)
/ leftResponsekey_label:	the label of the left response key ("A")
/ rightResponsekey_label:	the label of the right response key ("L")						
						
Copyright © Millisecond Software. All rights reserved.
Contact | Terms of Service | Privacy Statement | Security Statement | GDPR