Return to the Probabilistic Selection Task page
														
___________________________________________________________________________________________________________________	

									*PROBABILISTIC SELECTION TASK*
___________________________________________________________________________________________________________________	

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 04-08-2014
last updated:  12-19-2019 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 12-19-2019 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	

This script implements a Probabilistic Selection Task, a learning-transfer task that uses different 
"win" probabilities of symbols presented in pairs during training to investigate participant's selections 
of 'winning' symbols when confronted with new symbol pairings during a transfer task. 

References:

Frank, M.J., Seeberger, L.C. & O’Reilly. R.C. (2004). By Carrot or by Stick: Cognitive
Reinforcement Learning in Parkinsonism. Science, 306, 1940-1943.

Doll, B.B., Hutchison, K.E. & Frank, M.J. (2011). Dopaminergic Genes Predict Individual Differences in
Susceptibility to Confirmation Bias. The Journal of Neuroscience, April 20, 2011 • 31(16):6188–6198.


Millisecond Software thanks J. Bianchi for collaborating on this script!

___________________________________________________________________________________________________________________
TASK DESCRIPTION
___________________________________________________________________________________________________________________	

Participants work through a learning and a test phase.

Learning Phase: participants get presented with 3 symbol pairs (AB, CD, EF) and have to pick
the "winning symbol" of each pair. The win-probabilities of each symbol are controlled in 
such a way that A wins over B in 80% of the times; C wins over D in 70% of the times, and 
E wins over F in 60% of the times. The learning phase gets repeated if participants don't 
select the winning symbol with a pre-determined frequency.

Test Phase: 
by default, this scripts presents all possible pair combinations (15) during the test phase

Note:
This script provides the possibility to include an instruction manipulation by telling
participants that one symbol (always the symbol being assigned to be symbol F) is either
the symbol with the 'highest' or 'lowest' probability of winning (see Doll et al, 2011).
To run a specific manipulation, go to section Editable Parameters and set
parameters.InstructionManipulationCondition accordingly.
By default, this script runs the Probabilistic Selection Task without any instruction
manipulation (see parameters.InstructionManipulationCondition)

___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	

Practice Block: ~3 minutes per practice block (repeated if learning criteria are not met)
Test Block: ~5 minutes

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

(1) Raw data file: 'probabilisticselectiontask_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

parameters.InstructionManipulationCondition:	0 = no manipulation; parameters.minE_EF runs as set
										
									Manipulation Conditions, parameters.minE_EF will automatically be set to 0
									1 = participants are told that one symbol (symbol F) is the highest winning symbol
									2 = participants are told that one symbol (symbol F) is the lowest winning symbol
									3 = control group (no manipulation presented but parameters.minE_EF will automatically be set to 0)										
										(see Doll et al, 2011, for manipulation explanations)
									
								
parameters.minA_AB:				proportion of A-selections in AB pairs that have to be met in a learning block  (default: 0.65)
parameters.minC_CD:				proportion of C-selections in CD pairs that have to be met in a learning block  (default: 0.6)

parameters.minE_EF:				proportion of E-selections in EF pairs that have to be met in a learning block  (default: 0.5)
										!!!!Note: if you use the task within the Instruction Manipulation Framework,
										parameters.minE_EF is automatically adjusted to 0							
							

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. 
										
stimulusitem.1/stimulusitem.2:	the presented stimuli in order of trial presentation
										Note: does not need to correspond to spatial presentation of stimuli
										
values.winletter:					contains the winning letter during learning

response:							the scancode of the participant's response key
										30 = A = left
										38 = L = right
										
values.selectedletter:			contains the letter selected by participant during training and test phase
correct:							the correctness of the response (1 = correct; 0 = otherwise)
latency: 							the response latency in ms; measured from onset of stimulus

expressions.probA_ab_training-
expressions.probC_CD_training:	calculates the probentage A/C/E selections for the training pairs (current training block)

values.A-
values.F:							contain the symbol itemnumbers assigned to letters A-F (randomly assigned during runtime)
										Letter A: highest win chance (during training wins with 80% probability)
										Letter B: lowest win chance (during training wins with 20% probability)
										
values.countTrainingBlocks:	counts the number of training blocks run

values.TrainingPass:				0 = the training criteria were not met (performance should be flagged)	
									1 = the training criteria were met


(2) Summary data file: 'probabilisticselectiontask_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)
									
parameters.InstructionManipulationCondition:	0 = no manipulation; parameters.minE_EF runs as set
										
									Manipulation Conditions, parameters.minE_EF will automatically be set to 0
									1 = participants are told that one symbol (symbol F) is the highest winning symbol
									2 = participants are told that one symbol (symbol F) is the lowest winning symbol
									3 = control group (no manipulation presented but parameters.minE_EF will automatically be set to 0)										
										(see Doll et al, 2011, for manipulation explanations)
									
								
parameters.minA_AB:				proportion of A-selections in AB pairs that have to be met in a learning block  (default: 0.65)
parameters.minC_CD:				proportion of C-selections in CD pairs that have to be met in a learning block  (default: 0.6)

parameters.minE_EF:				proportion of E-selections in EF pairs that have to be met in a learning block  (default: 0.5)
										!!!!Note: if you use the task within the Instruction Manipulation Framework,
										parameters.minE_EF is automatically adjusted to 0	
										

values.A-
values.F:							contain the symbol itemnumbers assigned to letters A-F (randomly assigned during runtime)
										Letter A: highest win chance (during training wins with 80% probability)
										Letter B: lowest win chance (during training wins with 20% probability)	
										
values.countTrainingBlocks:	counts the number of training blocks run

values.TrainingPass:				0 = the training criteria were not met (performance should be flagged)	
									1 = the training criteria were met
		
																				
Training Performance:										
										
expressions.probA_ab_training:	proportion A-selections in AB training pairs
expressions.probC_CD_training:	proportion C-selections in CD training pairs
expressions.probE_EF_training:	proportion E-selections in EF training pairs

Test Performance:

expressions.probA_AB_test:		proportion A-selections in AB_test pairs
expressions.probA_AC_test:		proportion A-selections in AC_test pairs
expressions.probA_AD_test:		proportion A-selections in AD_test pairs
expressions.probA_AE_test:		proportion A-selections in AE_test pairs
expressions.probA_AF_test:		proportion A-selections in AF_test pairs

expressions.probB_BC_test:		proportion B-selections in BC_test pairs
expressions.probB_BD_test:		proportion B-selections in BD_test pairs
expressions.probB_BE_test:		proportion B-selections in BE_test pairs
expressions.probB_BF_test:		proportion B-selections in BF_test pairs

expressions.probC_CD_test:		proportion C-selections in CD_test pairs
expressions.probC_CE_test:		proportion C-selections in CE_test pairs
expressions.probC_CF_test:		proportion C-selections in CF_test pairs

expressions.probD_DE_test:		proportion D-selections in DE_test pairs
expressions.probD_DF_test:		proportion D-selections in DF_test pairs

expressions.probE_EF_test:		proportion E-selections in EF_test pairs

___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	
Letter-Symbol-Assignment: each of the 6 symbols gets randomly assigned to 'play the role' of letters A-F

Learning Phase: 
* each learning block runs for 60 trials (20 per symbol pair -> can be edited via parameters.trialnumber_learning)
* for any given learning block the computer checks whether all learning criteria have been met 
during the given learning block
-> learning criteria: symbol A is selected at least 65% of the times, symbol C is selected at least 
60% of the times, symbol E is selected at least 50% of the times (unless the script is running within the 
InstructionManipulation Framework in which case no restrictions are placed on pair EF)
If those criteria haven't been met in the block, a new learning block starts

Test Phase:
* the test block runs for 150 trials (10 trials for each of the 15 possible symbol pairs)
* by default, this script runs all possible symbols pairs (see list.trialselection_test) in random order

Trial Set-up:
The left-right position of the symbol pairs is counterbalanced across each block
-> symbol A appears on the left side in 50% of the trials (same for all symbols)

___________________________________________________________________________________________________________________	
STIMULI
___________________________________________________________________________________________________________________	
The stimuli are the 6 Hiragana characters presented in Frank et al (2004).
Their size and location can be easily controlled via EDITABLE CODE -> Editable Parameters

To use a different set of images, simply replace the stimuli under
section Editable Stimuli -> item.symbols

Two additional Hiragana symbols were selected for example symbols by Millisecond Software.
___________________________________________________________________________________________________________________	
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:

/ InstructionManipulationCondition:		0 = no manipulation; parameters.minE_EF runs as set
										
										Manipulation Conditions, parameters.minE_EF will automatically be set to 0
										1 = participants are told that one symbol (symbol F) is the highest winning symbol
										2 = participants are told that one symbol (symbol F) is the lowest winning symbol
										3 = control group (no manipulation presented but parameters.minE_EF will automatically be set to 0)										
										(see Doll et al, 2011, for manipulation explanations)											

Learning Criteria:						to remove a criterion, set the corresponding value to 0. 										
											
/minA_AB:								proportion of A-selections in AB pairs that have to be met in a learning block  (default: 0.65)
/minC_CD:								proportion of C-selections in CD pairs that have to be met in a learning block  (default: 0.6)

/minE_EF:								proportion of E-selections in EF pairs that have to be met in a learning block  (default: 0.5)
											!!!!Note: if you use the task within the Instruction Manipulation Framework,
											parameters.minE_EF is automatically adjusted to 0

/maxNumberTrainingBlocks:			the maximum number training blocks are run before participants 
										proceed with the test. Performance of participants who fail the last training block
										will be flagged in the data file.
																						
/responsekey_left:					scancode of the response key for symbol on the left (default: 30)
/responsekeyleft_label:				label of the response key for symbol on the left (default: "A")
/responsekey_right:					scancode of the response key for symbol on the right (default: 38)
/responsekeyright_label:			label of the response key for symbol on the right (default: "L")

/readyDuration:						the duration (in ms) of the get-ready trial (default: 3000ms)

/x_right:								horizontal coordinate of the right symbol in screen probentages (default: 65%)
/x_left:								horizontal coordinate of the left symbol in screen probentages (default: 35%)
/symbolheight:						the height of the symbol image in screen height probentages (default: 40%)

/trialnumber_learning:				the number of trials in a learning session (default: 60 -> 20 per symbol pair: AB, CD, EF)
											Note: the minimum number for the default win probabilities and the balancing of left-right symbol presentation
											is 10 trials per symbol pair
											Note: the learning block gets repeated until specific learning criteria are met (see above) within a block


/trialnumber_test:					the number of trials in the test session (default: 150 -> 10 per symbol pair)
											!!!Note: by default, all 15 possible combinations of trials are run by this script
											for the test phase. To remove test combinations that are of little interest, 
											go to list.trialselection_test under section EDITABLE LISTS

/feedbackduration:					the duration of the feedback stimuli (default: 1000ms)

/winA_AB:								the winning proportion of A in AB pairs (default: 0.8)
/winC_CD:								the winning proportion of C in CD pairs (default: 0.7)
/winE_EF:								the winning proportion of F in EF pairs (default: 0.6)