User Manual: Inquisit Demand Selection Task


___________________________________________________________________________________________________________________	

										DEMAND SELECTION TASK
___________________________________________________________________________________________________________________

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

Script Copyright © 02-21-2022 Millisecond Software
Millisecond Software thanks Dr. Malte Friese for collaborating on this script!

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	
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 DESCRIPTION	
___________________________________________________________________________________________________________________
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 

___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. 50 minutes (5 minutes per round)

___________________________________________________________________________________________________________________	
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:								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. 
																		
version:							RH (version for right handed participants) vs. LH (version for left handed participnts)
phase:								"practice" vs. "choice" vs. "task"
practiceblockCount:					counts the practice blocks
testblockCount:						counts the test blocks

trialcount:							counts the number of trials in a test block
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)

nr_switchTrials:					count of the number of switch trials run

nr_repetitionTrials:				count of the number of repetition trials run
									Note: first trials in each test block are counted as neither
									
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)
buttonHand:							the hand on the response buttons (LEFT vs. RIGHT)
mouseHand:							the hand on the mouse (LEFT vs. RIGHT)

(2) Summary data file: 'demandselectiontask_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)

version:							RH (version for right handed participants) vs. LH (version for left handed participants)

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)

nr_switchTrials:					count of the number of switch trials run

nr_repetitionTrials:				count of the number of repetition trials run
									Note: first trials in each test block are counted as neither
										
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

Note: the first trial in each block is randomly chosen to be a magnitude or parity task.
It's switch category is set to "first trial" (thus it's neither a switch nor a reversal trial)

___________________________________________________________________________________________________________________	
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%)