Return to the Millisecond (aka Cambridge) Gambling Task page


Script Author: Katja Borchert, Ph.D. ( for Millisecond Software, LLC
Date: 03-06-2014
last updated:  03-31-2020 by K. Borchert ( for Millisecond Software, LLC

Script Copyright © 03-31-2020 Millisecond Software

Millisecond Software thanks Dor Werbner Kalron for sharing the Hebrew translations!

This script was adapted to be used in Hebrew.  Some of the instructions are hidden in the script due to problems with 
display of Hebrew fonts. If you want to edit the text, copy and paste the element into any simple text editor, 
make the changes and then paste back into Inquisit.

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.

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.

the default set-up of the script takes appr. XXX minutes to complete
(if no task duration is provided, please contact Millisecond Software

The default data stored in the data files are:

(1) Raw data file: 'millisecondgamblingtask_hebrew_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
script.sessionid:				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

/count_sequence:					counts sequences per condition

/counttrials_sequence:				counts trials in a sequence
/counttrials_condition:				counts trials per conditions
/counttrials_total:					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

/rt_selectcolor:					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)
/select_bestchoice:					1 = participant selected best choice (= more probable to win); 2 = participant did not select best choice
/p_reward:							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)

/rt_selectbet:						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)
/percent_bet:						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; 2 = 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_hebrew_summary*.iqdat' (a separate file for each participant)

computer.platform:				the platform the script was run on (win/mac/ios/android)
script.startdate:				date script was run
script.starttime:				time script was started
script.subjectid:				assigned subject id number
script.groupid:					assigned group id number
script.sessionid:				assigned session id number
script.elapsedtime:				time it took to run script (in ms); measured from onset to offset of script
script.completed:				0 = script was not completed (prematurely aborted); 
								1 = script was completed (all conditions run)

/conditionorder:				1 = ascending-descending
								2 = descending-ascending

/meanrt_deliberations: 			the mean color deliberation latency (across conditions) (in ms)
/meanrt_deliberations19:		the mean color deliberation latency (in ms) per ratio (across conditions)

/percent_bestchoice: 			the percentage of times that participant chose the best bet (across conditions)

/meanRT_betlatency_D:			the mean bet latency for Descending bet condition (in ms)
/meanRT_betlatency_A:			the mean bet latency for Ascending bet condition (in ms)
/DiffbetlatencyAD:				Difference in mean bet latency between Ascending and Descending bet condition

/mean_percentbet_total: 		the overall mean percentage bet (across conditions)
/mean_percentbet_A:				the mean percentage bet in the Ascending bet condition
/mean_percentbet_D:				the mean percentage bet in the Descending bet condition
/Diff_percentbetDA:				the difference in mean bet percentage between Descending and Ascending bet conditions
/mean_percentbet19:				the mean percentage bet for each ratio (ONLY for trials in which best-most probable- color was chosen)

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 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).
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:

/startamount:				amount of money allocated at the start of each sequence (default: 100 points)
/min_points:				participant needs to have more than parameters.min_points for a a sequence to continue (default: 1 point)

/betduration:				duration of each bet in ms (default: 5000ms)
/resultduration:			duration of result display in ms (default: 2000ms)
/waitforresult:				duration that participant needs to wait until result is revealed in ms (default: 1000ms)