Return to the Demand Selection Task page
						
										DEMAND SELECTION TASK

SCRIPT INFO

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 05-11-2016
last updated: 08-15-2016 by K.Borchert (katjab@millisecond.com) for Millisecond Software LLC

Script Copyright © 08-15-2016 Millisecond Software

Millisecond Software thanks Dr. Malte Friese for collaborating on this script!

BACKGROUND INFO 

											*Purpose*
This script implements the Demand Selection Task based on:

Kool W, McGuire JT, Rosen ZB, Botvinick MM (2010) Decision making and
the avoidance of cognitive demand. J Exp Psychol Gen 139: 665–682.

McGuire JT, Botvinick MM (2010) Prefrontal cortex, cognitive control, and the
registration of decision costs. Proc Natl Acad Sci U S A 107: 7922–7926.

The implemented version in this script is based on Kool et al (2010), Experiment 3.
The script automatically adapts response keys to the dominant hand.
(dominant hand on mouse, other hand on response buttons)


											  *Task*
Participants see 2 stimuli (patterned discs) on the screen and are asked to select one of them with the mouse.
A digit appears on the selected disc. The color of the digit represents a different cognitive task:
blue ('parity' task)-> decide if number is even (if so press the right response key; otherwise press the left response key)
purple ('magnitude' task)-> decide if number is bigger than 5 (if so press the right response key, otherwise press the left response key).

One of the 2 discs represents a high cognitive demand condition: if chosen, the cognitive tasks (parity/magnitude) repeatedly switch from one to the other
The other disc represents a low cognitive demand condition: if chosen, the cognitive tasks (parity/magnitude) repeat the previous ones with a high likelihood 


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

(1) Raw data file: 'DemandSelectionTask_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 
/version:						RH (version for right handed participants) vs. LH (version for left handed participnts)
blockcode, blocknum:			the name and number of the current block
/phase:							"practice" vs. "choice" vs. "task"
/testblockCount:				counts the test blocks
/practiceblockCount:			counts the practice blocks
/stimADemand:					1 = high demand for stim A; 2 = low demand for stim A (for the current block)
/stimBDemand:					1 = high demand for stim B; 2 = low demand for stim B (for the current block)
/stimA_x:						the horizontal coordinate for stim A (for the current block)
/stimA_y:						the vertical coordinate for stim A (for the current block) 
/stimB_x:						the horizontal coordinate for stim B (for the current block)
/stimB_y:						the vertical coordinate for stim B (for the current block)
/itemnumberA:					the selected itemnumber for stim A (for the current block)
/itemnumberB:					the selected itemnumber for stim B (for 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) 
/switchCat:						1 = same task (repetition trial); 0 = different task (switch trial)
/previousTask:					1 = parity; 2 = magnitude
/currentTask:					1 = parity; 2 = magnitude
/digit:							stores the currently presented digit
stimulusitem:					the presented stimuli in order of trial presentation
response:						the participant's response (either mouse selection or scancode)
correct:						the correctness of the response (1 = correct; 0 = incorrect) - if applicable
latency: 						the response latency (in ms)
/choice:						"HD" (high demand option) vs. "LD" (low demand option)


(2) Summary data file: 'DemandSelectionTask_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)
/version:						RH (version for right handed participants) vs. LH (version for left handed participnts)
/propSelection_HD:				the overall proportion of selecting the high demand (HD) option across all blocks and trials
/meanRTchoice_HD:				the mean latency of selecting the high demand (HD) option  across all blocks and trials
/propSelection_LD:				the overall proportion of selecting the low demand (LD) option across all blocks and trials
/meanRTchoice_LD:				the mean latency of selecting the low demand (LD) option  across all blocks and trials

/propCorrect:					the overall proportion of correct responses across tasks and across all blocks and trials
/meanRT:						the mean latency (in ms) of correct responses across tasks and across all blocks and trials

/propCorrect_HD:				the proportion correct responses under high demand conditions (across tasks and across all blocks and trials)
/meanRT_HD:						the mean latency (in ms) of correct responses under high demand conditions (across tasks and across all blocks and trials)
/propCorrect_LD:				the proportion correct responses under low demand conditions (across tasks and across all blocks and trials)
/meanRT_LD:						the mean latency (in ms) of correct responses under low demand conditions (across tasks and across all blocks and trials)
/propCorrect_parity:			the proportion correct responses to the parity task (across all blocks and trials)
/meanRT_parity:					the mean latency (in ms) of correct responses to the parity task (across all blocks and trials)
/propCorrect_magnitude:			the proportion correct responses to the magnitude task (across all blocks and trials)
/meanRT_magnitude:				the mean latency (in ms) of correct responses to the magnitude task (across all blocks and trials)

/propCorrect_HD_parity:			the proportion correct responses to the parity task under high demand conditions (across all blocks and trials)
/meanRT_HD_parity:				the mean latency (in ms) of correct responses to the parity task under high demand conditions (across all blocks and trials)
/propCorrect_HD_magnitude:		the proportion correct responses to the magnitude task under high demand conditions (across all blocks and trials)
/meanRT_HD_magnitude:			the mean latency (in ms) of correct responses to the magnitude task under high demand conditions (across all blocks and trials)
/propCorrect_LD_parity:			the proportion correct responses to the parity task under low demand conditions (across all blocks and trials)
/meanRT_LD_parity:				the mean latency (in ms) of correct responses to the parity task under low demand conditions (across all blocks and trials)
/propCorrect_LD_magnitude:		the proportion correct responses to the magnitude task under low demand conditions (across all blocks and trials)
/meanRT_LD_magnitude:			the mean latency (in ms) of correct responses to the magnitude task under low demand conditions (across all blocks and trials)

/propCorrect_switch:			the proportion correct of switch task trials (across tasks and all blocks and trials)
/meanRT_switch:					the mean latency (in ms) of correct responses to switch task trials (across tasks and all blocks and trials)
/propCorrect_Repetition:		the proportion correct of Repetition task trials (across tasks and all blocks and trials)
/meanRT_Repetition:				the mean latency (in ms) of correct responses to nowitch task trials (across tasks and all blocks and trials)

* can be changed to one file for all participants under section DATA

EXPERIMENTAL SET-UP

Practice Block(s):
* 10 trials: random order of 5 parity and 5 magnitude tests (digits are randomly chosen)
* repeats if block performance < 90%

Test Block set-up:
* 8 blocks (75 trials each = 600 trials total) with 8 different stim pairs (stims randomly assigned to each run; no repeats)
* one stim is randomly assigned the 'high cognitive demand' condition; the other stim is assigned the 'low cognitive demand' condition
* 8 different spatial arrangements of stim pairs (circular arrangement, stims are opposite of each other and wander in 45degrees increments); 
  randomly sampled (without replacement) for each block
  
Trial Sequence:
Select center with mouse -> stims appear: select one of the stims -> digit appears on selected stim in either blue or purple: do task

2 cognitive tasks:
a) digit in color purple: 'if digit is even, press right key, otherwise left key (both with left hand)
b) digit in color blue: 'if digit > 5, press right key, otherwise left key (both with left hand)

=> 8 digits are used: 1, 2, 3, 4, 6, 7, 8, 9; equally often sampled across 600 trials (= each sampled 75 times)

2 cognitive demand conditions:
a) low cognitive demand: same cognitive task as previous trial with probability = 0.9
b) high cognitive demand: same cognitive task as previous trial with probability = 0.1


STIMULI
provided by Millisecond Software (stimuli are not original to Kool et al, 2010)
They can be edited under section Editable Stimuli

INSTRUCTIONS
provided by Millisecond Software (instructions are not original to Kool et al, 2010)
They are provided and presented in the form of html-files which can be edited directly.

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:

/circleProportion:			proportion of canvas height used for the circle radius of stim presentation (default: 0.2)
/digitSize:					the size of the digit in percentage of canvas height (default: 5%)
/stimSize:					the size of the stims in percentage of canvas height (default: 20%)
		
Copyright © Millisecond Software. All rights reserved.
Contact | Terms of Service | Security Statement | Employment