Return to the Cake Gambling Task page
						
									     CAKE GAMBLING TASK

SCRIPT INFO

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 07-31-2014
last updated:  09-19-2016 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Copyright ©  09-19-2016 Millisecond Software


BACKGROUND INFO

											*Purpose*
This script runs the Cake Gambling Task (child-friendly version of Cambridge Gambling Task) as described in: 

Van Leijenhorst L, Westenberg PM, & Crone EA. (2008). A developmental study of risky decisions on the cake gambling task:
age and gender analyses of probability estimation and reward evaluation. Dev Neuropsychol, 33(2):179-96

Van Leijenhorst L et al (2010). Adolescent risky decision-making: Neurocognitive development of reward and
control regions. NeuroImage, 51, 345–355


											  *Task*
Computer presents a cake with 6 pieces. A varying number of pieces are chocolate (brown) and strawberry (pink) pieces.
The computer picks one of these slices at random. The task is to bet coins on whether the computer will 
select a chocolate or a strawberry piece. The number of coins that can be bet on strawberry/chocolate predictions
are presented on the bottom of the screen. The participant has to select the preferred option via corresponding keys.
Strawberry pieces and chocolate pieces are associated with low and high risk bets, respectively (counterbalanced). 
The number of coins bet on the low risk flavor stays the same throughout (default: 1 coin); 
the number of coins bet on the high risk flavor changes.
If the computer selects the chosen flavor, the participant earns all the coins bet. 
If the computer selects the other flavor, the participant loses all the coins bet by default (can be changed under Editable Values).
If the participants does not select a flavor in time, the script treats the trial as a bet on the losing flavor.



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

(1) Raw data file: 'CakeGamblingTask_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 
/punishment:					true (1)= if gamble is lost the coins bet will be subtracted from total (default)
								false (0) = if gamble is lost the coins bet will not be subtracted from total
/highriskresponsekey:			the scancode assigned to the high risk choice 
/lowriskresponsekey:			the scancode assigned to the low risk choice
/highriskcolor:					the color assigned to the high risk
/highriskposition:				the screen position of the high risk choice (left vs. right)
/lowriskcolor:					the color assigned to the low risk 
/lowriskposition:				the screen position of the low risk choice (left vs. right)
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) 
/ratio:							"5:1", "4:2", "3:3"
/lowriskgamble_reward:			constant money awarded for a low risk gamble
/highriskgamble_reward:			the monetary reward associated with the risky gamble for the current trial
stimulusitem:					the presented stimuli in order of trial presentation
response:						the participant's response
									(for keyboard responses: Inquisit logs the scancode of the responsekey)
latency: 						the response latency in ms (measured from onset of response signal)
/responsecategory:				categorization of response into "high risk" vs. "low risk" (or "did not choose")
/winningwedge:					number of the wedge that was selected by computer
/risk_winningwedge:				whether the winning wedge was of the low or high risk flavor 
/gambleoutcome:					1 = participant wins the gamble; 2 = participant loses the gamble
/totalwinnings:					stores the total amount of money won

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

/prop_nodecision:				proportion of trials in which participant did not make a choice
/proprisky_51A -
/proprisky_33E:					proportion risky choices for each of experimental conditions
									Note: even for ratio 3:3, the selection of the color that is associated with higher risk is still counted as "risky"


EXPERIMENTAL SET_UP
* By default, script runs 3 ratios: 3(low risk):3(high risk), 4(low risk):2(high risk), 5(low risk):1(high risk) (if only specific ratios should be run,
go to section BLOCKS and follow instructions)
* By default, script runs 5 coin bets for the riskier flavor: 1, 3, 5, 7, 9 (numbers can be changed under section Editable Parameters)
* assignment of flavor to low/high risk option as well as 
location of high risk/low risk response keys (right or left) is counterbalanced by groupnumber (=> 4 groupnumbers; more info under section EXPT)

Practice Block:
* 15 practice trials => runs each of the ratio x coin bets once
* order is selected at random

Test Block:
* 270 trials => each combination of ratios x coin bets is run 18 times
* order is selected at random
* after a sequence of 90 trials (default) a rest trial of 1 min rest (default) is presented

Trial Sequence:
-> Fixation cross (1000ms, default) 
-> Cake Presentation without response signal (3000ms, default) 
-> Cake Presentation WITH response signal (2000ms)*
-> Fixation cross (Note: used in Van Leijenhorst et al, 2010; default 0ms)
-> Feedback (1000ms, default)

!!!NOTE: if participant does not make a choice within the given timeframe, this script assumes the 
losing flavor/bet was chosen 

STIMULI
provided by Millisecond

INSTRUCTIONS
The provided instructions are not original to Van Leijenhorst et al (2008). 
Most instructions are provided by Millisecond Software in htm format. Changes to the instructions can be made
directly to the htm files.
After instructions and before the practice trials, one demo trial is run which could be used to
go through the task with participants.

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:

/responsekey_left:						scancode of the left response key
											Note: scancodes under Tools -> Keyboard Scancodes (default: 30)
/responsekey_right:						scancode of the right response key
											Note: scancodes under Tools -> Keyboard Scancodes (default: 38)
/responsekeyleft_label:					label of the left response key (default: 'A')
/responsekeyright_label:				label of the right response key (default: 'L')
Note: the assignment of the left and right response keys to the risky flavor is counterbalanced by groupnumber (see section Experiment)

/fontsize_fixation:						fontsize of the fixation mark in screen height percentages (default: 15%)

/fixationduration:						presentation duration of the fixation stimulus (default: 500ms)
/stimulusduration:						presentation duration of the stimulus (default: 5000ms)
/responsesignal:						time after onset of stimulus, that the response signal ('?') is presented (default: 3000ms)
											Note: stimulus is presented for 5000ms; after 3000ms
											a '?' is presented at which time, participants were asked to make their choice
/waitduration:							time between offset of stimuli and onset of feedback (default: 0ms)
/feedbackduration:						duration of feedback (default: 1000ms)
/intertrialinterval:					time between offset of one trial and onset of the next (default: 0ms)

/lowriskgamble_reward:					constant money awarded for a low risk gamble
/highriskgamble_rewardA-
/highriskgamble_rewardE:				5 different monetary rewards for the risky choice 
											Notes: 
											1. This script is set up to run 5 different monetary rewards for the risky choice by default;
											however, fewer can be run. More info under section BLOCKS.
											2. This script provides images for 1-10 coins as rewards

/restsaftertrials:						number of 90 trials after which a short rest is introduced
												Note: by default this script runs 270 trials
/restduration:							duration of rest (default: 1 min)

/punishment:							true = if gamble is lost the coins bet will be subtracted from total
										false = if gamble is lost the coins bet will not be subtracted from total

Copyright © Millisecond Software. All rights reserved.
Contact | Terms of Service | Security Statement | Employment