Return to the Probabilistic Reversal Learning Task page
						
								Probabilistic Reversal Learning Task
SCRIPT INFO

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 03-07-2018
last updated: 03-08-2018 by K.Borchert (katjab@millisecond.com) for Millisecond Software LLC

Script Copyright © 03-08-2018 Millisecond Software


BACKGROUND INFO 

											*Purpose*
This script implements a Probabilistic Reversal Learning Task based on:

Cools R, Clark L, Owen AM, Robbins TW. (2002). Defining the neural mechanisms of probabilistic reversal learning using
event-related functional magnetic resonance imaging. J Neurosci. 2002;22:4563–4567.

Waegeman, A., Declerck, C.H, Boone, C., Seurinck, R. & Parizel, P.M. (2014). Individual Differences in 
Behavioral Flexibility in a Probabilistic Reversal Learning Task: An fMRI Study.
Journal of Neuroscience, Psychology, and Economics, Vol. 7, No. 4, 203–218

The Inquisit script uses the number of reversals to terminate the procedure (see Cools et al, 2002)
instead of making it time-based (see Waegeman et al, 2014). 
However, if the learning criterium of a block (= participant reached 10th reversal)
is not reached after 30minutes, the task is aborted.

Like Waegeman et al (2014), the Inquisit script 
a) attaches explicit rewards (aka points) to 'positive' feedback and punishment for 'negative' feedback (however,
the points can be made invisible, see section Editable Parameters) and asks participant to maximize their reward without 
explicitly alerting participants to the fact that payoff probabilities might change (however, instructions can be
easily altered under section Editable Instructions).
b) uses a 80%/20% probability for rewards and punishment (editable under section Editable Parameters)


											  *Task*
Participants are asked to select btw. 2 patterns. One patterns has an 80% probability of a reward
and a 20% probability of a loss whereas the probabilities are reversed for the second pattern.
Participants are asked to maximize their rewards. After participants have learned to consistently select the 
pattern with the higher reward probability, the probabilities of the patterns are reversed.
A block ends after 9 reversal stages.


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

(1) Raw data file: 'probabilisticreversallearningtask_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 
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; by default data is collected unless /recorddata = false is set for a particular trial/block) 

/countBlocks:					counts the number of test blocks
/trialcount:					counts the number of test trials run (across blocks)								
/index_correctChoice:			the itemnumber of the currently 'lucky' pattern
/index_incorrectChoice:			the itemnumber of the currently 'unlucky' pattern									
/maxCorrectChoices:				the number of consecutive correct choices until the next reversal
								(randomly selected from 10, 11, 12, 13, 14, 15)
								
/reversal:						1 =  the trial just reversed the probabilities (a reversal just took place);
								0 = otherwise
								
/relearned:						1 = participant has likely learned the reversed probability assignment
									=> the first selection of the new lucky pattern after a reversal
									(lucky guesses excluded)
								0 = participant has likey not learned the reversed probability assignment
								
stimulusitem1:					the presented image file of the 'lucky pattern'
stimulusitem2:					the presented image file of the 'unlucky pattern'

response:						the participant's response
correct:						accuracy of response: 1 = correct response (chose the 'lucky' pattern); 0 = otherwise
latency: 						the response latency (in ms); measured from: onset of patterns

/respCategory:					C = correct (selected correct outcome and received 'correct' feedback)
								PE = correct (selected correct outcome BUT received 'incorrect' feedback)
								C-RE* = first correct after reversal error or 'lucky guess' (selected correct outcome and received 'correct' feedback)
								C-RE (PE)* = first correct after reversal errors (selected correct outcome BUT received 'incorrect' feedback)
								lucky guess* = correct (selected correct outcome during a reversal trial and received 'correct' feedback)
								lucky guess (PE)* = correct (selected correct outcome during a reversal trial but received 'incorrect' feedback)
								RE = reversal error =>
									participant selected incorrect outcome (formerly correct) after a reversal until a correct response
									is made (=evidence of relearning)
									Note: a 'lucky guess' is not counted as evidence of relearning
								E = incorrect (selected incorrect outcome and received 'incorrect' feedback)
								E (PE)* = incorrect (selected incorrect outcome BUT received 'correct' feedback)
								NR = no response (participant was not fast enough to select a choice)
								* = should be rare (but are not impossible)

/countConsecutiveCorrect:		running total of the consecutive choices of the 'lucky' pattern
									(resets for reversals and when the unlucky pattern is selected)
							
/feedback:						1 = negative feedback (points taken away); 2 = positive feedback (points added)
/countICFeedback:				counts the number of times negative feedback was given for the lucky pattern
									in between reversals

/countReversals:				running count of the reversals per block
/totalPoints:					the accumulated points across all test blocks
/iti:							duration (in ms) of the current iti
							

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

/passedPractice:				1 = practice learning criterium (participant reached first reversal) was reached
								0 = practice learning criterium was not reached within 10 minutes and task was aborted
/abort:							1 = task was aborted because participant failed to reach a block's learning criterium
								within the specified timeframe.
									practice learning criterium: participant reached first reversal within 10 minutes
									test block learning criterium: participant reached 10th reversal within 30 minutes

/totalPoints:					the accumulated points across all test blocks
/countC:						counts the number of times participant chose the 'correct' option across all test blocks
									=> (C, PE, C-RE, C-RE (PE)) - excludes 'lucky guesses'
/countLG:						counts the number of times participant had a 'lucky guess' 
/countE:						counts the number of times participant chose the 'incorrect' option (excludes reversal errors) across all test blocks
/countRE:						counts the number of reversal errors made (see explanation for RE above under values.respCategory) across all test blocks
/countNR:						counts the number of 'no responses'	across all test blocks	 				
/probC:							proportion of correct responses across all test trials
/probLG:						proportion of 'lucky guesses' across all test trials
/probE:							proportion of errors across all test trials	
/probRE:						proportion of reversal errors across all test trials	
/probNR:						proportion of 'no responses' across all test trials

/MinICFeedback:					the minimum number of negative feedbacks for 'lucky' patterns in between reversals (across all test blocks)
/MaxICFeedback:					the maximum number of negative feedback for 'lucky' patterns in between reversals (across all test blocks)
/Mean_ICFeedback::				the mean number of negative feedback for 'lucky' patterns in between reversals (across all test blocks)


* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions


EXPERIMENTAL SET-UP

(1) Practice:
- the practice phase presents two patterns with the same reward/punishment probabilities as during the test.
- the initial 'lucky' pattern is randomly determined
- The screen position of the two patterns (left vs. right) is randomly determined (random selection with replacement).
- Practice ends after the first reversal is reached.
Note: if the first reversal is not reached within 10 minutes (default), practice is cut short and the script is aborted

(3) Test: 3 blocks
- each of the blocks gets 2 randomly assigned patterns (6 patterns provided)
- one pattern has an 80% probability of reward (20% probability of punishment),
the reward/punishment probabilities are reversed for the second pattern
(the initial 'lucky' pattern is determined randomly)
- The screen position of the two patterns (left vs. right) is randomly determined (random selection with replacement)
- after 10-15 consecutive choices of the 'lucky' pattern (randomly determined), the reward/punishment probabilities are reversed
- a block is terminated when participant reaches the 10th reversal (default)
Note: if the participant does not reach the 10th reversal within 30 minutes (default), the script aborts.

Trial Sequence:
pattern presentation (max. 2000ms or response) -> Feedback (500ms) -> ITI: variable (min: 500ms)
(entire trial takes: 3000ms => every 3s a new pattern is presented)

STIMULI
provided by Millisecond Software - can be edited under section Editable Stimuli

INSTRUCTIONS
provided by Millisecond Software - can be edited under section Editable Instructions

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:

/showTotalPoints:			true (default): shows the total points accumulated
									false: does not show the total points accumulated

/maxStimDuration:		 	the maximum duration (in ms) of the patterns (default: 2000ms)
/feedbackDuration:			the duration of the feedback (in ms) (default: 500ms)
/SOA:						stimulus onset asynchrony (in ms): a new pattern appears every 3s (default: 3000ms)
/readyDuration:				the duration (in ms) of the 'get ready' trial at the beginning of each block (default: 5000ms)
/practiceTimeout:			the practice session ends after 10minutes if participant has not reached the learning criterium (=reach first reversal)
							(default: 600000ms). In this case, the task is aborted.
/testblockTimeout:			a test block ends after 30minutes if participant has not reached the learning criterium (=reach 10th reversal)
							(default: 1800000 ms). In this case, the remaining task is aborted.
							
/nrReversals:				the number of reversals that participant work through before the block is terminated (default: 9)
/highProbability:			the higher (reward) probability (default: 0.8)

/leftKey:					the scancode of the left response key (default: 18)
/leftKeyLabel:				the label attached to the left response key (default: "E")
/rightKey:					the scancode of the right response key (default: 23)
/rightKeyLabel:				the label attached to the right response key (default: "I")

/picSize:					proportional sizing of the patterns relative to canvas height (default: 30%)


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