User Manual: Inquisit Millisecond (aka Cambridge) Gambling Task


___________________________________________________________________________________________________________________	

									MILLISECOND (CAMBRIDGE) GAMBLING TASK
									(German Instructions)
___________________________________________________________________________________________________________________

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 03-06-2014
last updated:  09-30-2024 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 09-30-2024 Millisecond Software

Translation provided by K. Borchert for Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	
This script implements the Millisecond Gambling Task (MGT), a decision-making and risk-taking behavioral task
similar to the Cambridge Gambling Task (CGT).

The implemented procedure is based on:

Rogers, R.D., Everitt, B.J., Baldacchino, A., Blackshaw, A.J, Swainson, R., Wynne, K., Baker, N.B., 
Hunter, J., Carthy, T., Booker, E., M. London, M., Deakin, J.F.W., Sahakian, B.J., & Robbins, T.W. (1999). 
Dissociable Deficits in the Decision-Making Cognition of Chronic Amphetamine Abusers, Opiate Abusers, 
Patients with Focal Damage to Prefrontal Cortex, and Tryptophan-Depleted
Normal Volunteers: Evidence for Monoaminergic Mechanisms. NEUROPSYCHOPHARMACOLOGY, 20, 322–339.

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________	
Participants are given 10 boxes. Some of these boxes are red, the others are blue. They are told that a yellow 
token is hidden under one of these boxes and they have to guess the color of the box under which the yellow token 
is hidden. Once they decide on the color, they are asked to bet points on this choice: the computer provides 
the bets in either ascending (bets get bigger) or descending order (bets get smaller) and participants are asked 
to click on a bet  when they want to bet this number of points. If they win, the bet number is added to their 
total points. If they lose the bet number is taken away from their total points.

___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. 20 minutes to complete

___________________________________________________________________________________________________________________	
DATA OUTPUT DICTIONARY
___________________________________________________________________________________________________________________	
The fields in the data files are:

(1) Raw data file: 'millisecondgamblingtask_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. 
										
conditionOrder:					1 = ascending-descending
								2 = descending-ascending

countSequence:					counts sequences per condition

									
countTrialsSequence:			counts trials in a sequence
countTrialsCondition:			counts trials per conditions
countTrialsTotal:				counts trial across conditions
ratio:							stores the current ratio
redNumber:						stores the number of the current red boxes
blueNumber:						stores the number of the current blue boxes
bestChoice:						stores the best choice (either 'red' or 'blue' depending on which color has more boxes)
tokenBox:						stores the number of the token box (1-10)
betOrder:						1 = ascending; 2 = descending

rtSelectColor:					latency in ms to select the color (measured from time the interface appears on screen until the color box is clicked)
selectedColor:					stores the selected color (red vs. blue)
selectBestChoice:				1 = participant selected best choice (= more probable to win); 2 = participant did not select best choice
pReward:						probability of reward for picking this color given the number of the boxes with that color
								(Example: there are 3/10 red boxes and participant picked red -> p_reward = 0.3)

rtSelectbet:					the time it cumulatively took to pick a bet (measured from start of displaying first bet until bet was selected or time for betting was up)
percentBet:					percentage of totalpoint that is picked to display current bet
bet:							currently displayed bet (calculated by values.percent_bet x values.totalpoints)
selectbet:						1 = participant did select a bet; 0 = participant did NOT select a bet (and therefore last bet was taken as default)

result:							1 = participant wins; 2 = participant loses
totalPoints:					the number of totalpoints at the end of the current trialsequence


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

conditionOrder:					1 = ascending-descending
								2 = descending-ascending
								
countTrialsAscending:			number of trials run in ascending condition 
countTrialsDescending:			number of trials run in descending conditions	

totalPointsAscending:			final totalpoints in ascending condition 
totalPointsDescending:			final totalpoints in descending condition						
								
//best Choices made: Quality of Decision making by betOrder and ratio
propBestChoices19Asc:	proportion of bestChoice (higher probability color) selection for trials with "1:9" ratio in ascending bet trials
propBestChoices28Asc:	proportion of bestChoice (higher probability color) selection for trials with "2:8" ratio in ascending bet trials
propBestChoices37Asc:	proportion of bestChoice (higher probability color) selection for trials with "3:7" ratio in ascending bet trials
propBestChoices46Asc:	proportion of bestChoice (higher probability color) selection for trials with "4:6" ratio in ascending bet trials
propBestChoicesAsc:		proportion of bestChoice (higher probability color) selection in ascending bet trials (across ratios)

propBestChoices19Desc:	proportion of bestChoice (higher probability color) selection for trials with "1:9" ratio in descending bet trials
propBestChoices28Desc:	proportion of bestChoice (higher probability color) selection for trials with "2:8" ratio in descending bet trials
propBestChoices37Desc:	proportion of bestChoice (higher probability color) selection for trials with "3:7" ratio in descending bet trials
propBestChoices46Desc:	proportion of bestChoice (higher probability color) selection for trials with "4:6" ratio in descending bet trials
propBestChoicesDesc:		proportion of bestChoice (higher probability color) selection in descending bet trials (across ratios)

propBestChoices19:	proportion of bestChoice (higher probability color) selection for trials with "1:9" ratio (across ascending and descending bet order)
propBestChoices28:	proportion of bestChoice (higher probability color) selection for trials with "2:8" ratio (across ascending and descending bet order)
propBestChoices37:	proportion of bestChoice (higher probability color) selection for trials with "3:7" ratio (across ascending and descending bet order)
propBestChoices46:	proportion of bestChoice (higher probability color) selection for trials with "4:6" ratio (across ascending and descending bet order)
propBestChoices:		proportion of bestChoice (higher probability color) selection in bet trials (across ratios and across ascending and descending bet order)


//deliberationRT by betOrder and ratio
meanDeliberationRT19Asc:	mean DeliberationRT (in ms) of bestChoice (higher probability color) selection for trials with "1:9" ratio in ascending bet trials
meanDeliberationRT28Asc:	mean DeliberationRT (in ms) of bestChoice (higher probability color) selection for trials with "2:8" ratio in ascending bet trials
meanDeliberationRT37Asc:	mean DeliberationRT (in ms) of bestChoice (higher probability color) selection for trials with "3:7" ratio in ascending bet trials
meanDeliberationRT46Asc:	mean DeliberationRT (in ms) of bestChoice (higher probability color) selection for trials with "4:6" ratio in ascending bet trials
meanDeliberationRTAsc:		mean DeliberationRT (in ms) of bestChoice (higher probability color) selection in ascending bet trials (across ratios)

meanDeliberationRT19Desc:	mean DeliberationRT (in ms) of bestChoice (higher probability color) selection for trials with "1:9" ratio in descending bet trials
meanDeliberationRT28Desc:	mean DeliberationRT (in ms) of bestChoice (higher probability color) selection for trials with "2:8" ratio in descending bet trials
meanDeliberationRT37Desc:	mean DeliberationRT (in ms) of bestChoice (higher probability color) selection for trials with "3:7" ratio in descending bet trials
meanDeliberationRT46Desc:	mean DeliberationRT (in ms) of bestChoice (higher probability color) selection for trials with "4:6" ratio in descending bet trials
meanDeliberationRTDesc:	mean DeliberationRT (in ms) of bestChoice (higher probability color) selection in descending bet trials (across ratios)

meanDeliberationRT19:	mean DeliberationRT (in ms) of bestChoice (higher probability color) selection for trials with "1:9" ratio (across ascending and descending bet order)
meanDeliberationRT28:	mean DeliberationRT (in ms) of bestChoice (higher probability color) selection for trials with "2:8" ratio (across ascending and descending bet order)
meanDeliberationRT37:	mean DeliberationRT (in ms) of bestChoice (higher probability color) selection for trials with "3:7" ratio (across ascending and descending bet order)
meanDeliberationRT46:	mean DeliberationRT (in ms) of bestChoice (higher probability color) selection for trials with "4:6" ratio (across ascending and descending bet order)
meanDeliberationRT:		mean DeliberationRT (in ms) of bestChoice (higher probability color) selection in bet trials (across ratios and across ascending and descending bet order)


//riskPercentage (only for trials in which the best choice was selected)
//Risk Taking
//by betOrder and ratio
meanRiskPercentBestChoiceOnly19Asc:	mean risk percentage* in bestChoice (higher probability color) selection trials for trials with "1:9" ratio in ascending bet trials
meanRiskPercentBestChoiceOnly28Asc:	mean risk percentage in bestChoice (higher probability color) selection trials for trials with "2:8" ratio in ascending bet trials
meanRiskPercentBestChoiceOnly37Asc:	mean risk percentage in bestChoice (higher probability color) selection trials for trials with "3:7" ratio in ascending bet trials
meanRiskPercentBestChoiceOnly46Asc:	mean risk percentage in bestChoice (higher probability color) selection trials for trials with "4:6" ratio in ascending bet trials
meanRiskPercentBestChoiceOnlyAsc:		mean risk percentage in bestChoice (higher probability color) selection trials in ascending bet trials (across ratios)

meanRiskPercentBestChoiceOnly19Desc:	mean risk percentage in bestChoice (higher probability color) selection trials for trials with "1:9" ratio in descending bet trials
meanRiskPercentBestChoiceOnly28Desc:	mean risk percentage in bestChoice (higher probability color) selection trials for trials with "2:8" ratio in descending bet trials
meanRiskPercentBestChoiceOnly37Desc:	mean risk percentage in bestChoice (higher probability color) selection trials for trials with "3:7" ratio in descending bet trials
meanRiskPercentBestChoiceOnly46Desc:	mean risk percentage in bestChoice (higher probability color) selection trials for trials with "4:6" ratio in descending bet trials
meanRiskPercentBestChoiceOnlyDesc:	mean risk percentage in bestChoice (higher probability color) selection trials in descending bet trials (across ratios)

meanRiskPercentBestChoiceOnly19:	mean risk percentage in bestChoice (higher probability color) selection trials for trials with "1:9" ratio (across ascending and descending bet order)
meanRiskPercentBestChoiceOnly28:	mean risk percentage in bestChoice (higher probability color) selection trials for trials with "2:8" ratio (across ascending and descending bet order)
meanRiskPercentBestChoiceOnly37:	mean risk percentage in bestChoice (higher probability color) selection trials for trials with "3:7" ratio (across ascending and descending bet order)
meanRiskPercentBestChoiceOnly46:	mean risk percentage in bestChoice (higher probability color) selection trials for trials with "4:6" ratio (across ascending and descending bet order)
meanRiskPercentBestChoiceOnly:		mean risk percentage in bestChoice (higher probability color) selection trials in bet trials (across ratios and across ascending and descending bet order)

mean risk percentage* = risk percentage in bet box at time of bet placing

//riskPercentage (all selections = across bestChoice and worstChoice selections)
//overall proportion bet
//by betOrder and ratio
meanRiskPercentAll19Asc:	mean risk percentage* all selection trials for trials with "1:9" ratio in ascending bet trials
meanRiskPercentAll28Asc:	mean risk percentage all selection trials for trials with "2:8" ratio in ascending bet trials
meanRiskPercentAll37Asc:	mean risk percentage all selection trials for trials with "3:7" ratio in ascending bet trials
meanRiskPercentAll46Asc:	mean risk percentage all selection trials for trials with "4:6" ratio in ascending bet trials
meanRiskPercentAllAsc:	mean risk percentage all selection trials in ascending bet trials (across ratios)

meanRiskPercentAll19Desc:	mean risk percentage all selection trials for trials with "1:9" ratio in descending bet trials
meanRiskPercentAll28Desc:	mean risk percentage all selection trials for trials with "2:8" ratio in descending bet trials
meanRiskPercentAll37Desc:	mean risk percentage all selection trials for trials with "3:7" ratio in descending bet trials
meanRiskPercentAll46Desc:	mean risk percentage all selection trials for trials with "4:6" ratio in descending bet trials
meanRiskPercentAllDesc:		mean risk percentage all selection trials in descending bet trials (across ratios)

meanRiskPercentAll19:	mean risk percentage all selection trials for trials with "1:9" ratio (across ascending and descending bet order)
meanRiskPercentAll28:	mean risk percentage all selection trials for trials with "2:8" ratio (across ascending and descending bet order)
meanRiskPercentAll37:	mean risk percentage all selection trials for trials with "3:7" ratio (across ascending and descending bet order)
meanRiskPercentAll46:	mean risk percentage all selection trials for trials with "4:6" ratio (across ascending and descending bet order)
meanRiskPercentAll:	mean risk percentage all selection trials in bet trials (across ratios and across ascending and descending bet order)

mean risk percentage* = risk percentage in bet box at time of bet placing

//Risk Adjustment: Participants typically gamble more if the odds are in their favor (for ratios 1:9 and 2:8)
//than when they are not (ratios 3:7 and 4:6)
//The Risk Adjustment measure is calculated by 
//(2 * meanRiskPercent_19 + 1* meanRiskPercent_28) - (2*meanRiskPercent_46 + 1* meanRiskPercent37)
//'bestChoice' selection trials only

riskAdjustAsc:			risk Adjustment for ascending trials		
riskAdjustDesc:		risk Adjustment for descending trials
riskAdjust:				risk Adjustment across ascending and descending trials

//Delay Aversion by ratio
//Unwillingness to wait is calculated by the difference between meanRiskPercent in descending and ascending order
//The assumption is that people who don't like to wait bet at higher percentage in descending order (because
//they come up faster) than in the ascending order (where they have to wait longer)
//calculation: delayAversion = meanRiskPercent_bestChoiceOnly_desc - meanRiskPercent_bestChoiceOnly_asc

delayAversion19: 		delay Aversion in "1:9" ratio trials
delayAversion28: 		delay Aversion in "2:8" ratio trials
delayAversion37: 		delay Aversion in "3:7" ratio trials
delayAversion46: 		delay Aversion in "4:6" ratio trials
delayAversion: 			delay Aversion in across the four ratio trials

___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	
4 ratios of blue/red (as well as red/blue) boxes are tested within participants: 1/9, 2/8, 3/7, 4/6

(a) Practice Block: selection of box color (the color of the box that hides token) only
* 5 trials with a fixed order of blue/red ratios (see LISTS -> list.rednumbers_practice) and fixed order
of token position (see LISTS -> list.tokenbox_practice)

counterbalanced order (by groupnumber) of (b) and (c)
=> odd groupnumbers run Ascending -> Descending
=> even groupnumbers run Descending -> Ascending

(b) Ascending Bet Block: after selection of box color, bets are offered to participants 
* by default: 4 blocks with 9 trial sequences aka "displays" each (see Rogers et al, 1999); 
participants start with 100 points at the beginning of each block (values.totalpoints- editable value)
(Note: according to Rogers et al, 1999, the trial sequence for one block is prematurely aborted if the
total points go below 2, the total points reset to 100 and the next block is started)

* displays (ratios) are presented in fixed order: order was pseudo-randomly determined by Millisecond Software.
In this script all 4 ratios are sampled 9 times across all 36 trials; half the time there are more red, half
the time there are more blue boxes -> to change the fixed order go to LISTS -> list.rednumbers_ascending

* fixed order of token position: the order of the token position (box1-10) was pseudo-randomly determined by Millisecond Software.
In 1/6 of all trials the better choice (based on probability) leads to a loss (see LISTS -> list.tokenbox_ascending)

* 5 bets are provided in fixed order of proportions of current total points (see LISTS -> list.betpercentages_asc).

* bets are starting small and get bigger (each bet is presented for parameters.betduration, default 5s);
sounds accompany each bet (the higher the sound, the higher the bet)

* if no bet is selected the last bet is selected by default

(b) Descending Bet Block:
* bets are starting big and get smaller
* different fixed orders for ratios/token position
=> no other differences to Ascending Bet Blocks
	
___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________	
Instructions are not original to the task. They are provided by Millisecond Software
as htm/html pages and can be edited by changing the provided htm/html files.
To edit htm/html-files: open the respective documents in simple Text Editors such as TextEdit (Mac)
or Notepad (Windows).
___________________________________________________________________________________________________________________	
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: