<?xml version="1.0" ?>
<PsychoPy2experiment encoding="utf-8" version="3.1.5">
  <Settings>
    <Param name="Completed URL" updates="None" val="" valType="str"/>
    <Param name="Data filename" updates="None" val="u'data/%s_%s_%s' % (expInfo['participant'], expName, expInfo['date'])" valType="code"/>
    <Param name="Enable Escape" updates="None" val="True" valType="bool"/>
    <Param name="Experiment info" updates="None" val="{'participant': '', 'trials': '20', 'particles': '10000'}" valType="code"/>
    <Param name="Force stereo" updates="None" val="True" valType="bool"/>
    <Param name="Full-screen window" updates="None" val="True" valType="bool"/>
    <Param name="HTML path" updates="None" val="html" valType="str"/>
    <Param name="Incomplete URL" updates="None" val="" valType="str"/>
    <Param name="JS libs" updates="None" val="packaged" valType="str"/>
    <Param name="Monitor" updates="None" val="testMonitor" valType="str"/>
    <Param name="OSF Project ID" updates="None" val="" valType="str"/>
    <Param name="Save csv file" updates="None" val="False" valType="bool"/>
    <Param name="Save excel file" updates="None" val="False" valType="bool"/>
    <Param name="Save log file" updates="None" val="True" valType="bool"/>
    <Param name="Save psydat file" updates="None" val="True" valType="bool"/>
    <Param name="Save wide csv file" updates="None" val="True" valType="bool"/>
    <Param name="Screen" updates="None" val="1" valType="num"/>
    <Param name="Show info dlg" updates="None" val="True" valType="bool"/>
    <Param name="Show mouse" updates="None" val="False" valType="bool"/>
    <Param name="Units" updates="None" val="use prefs" valType="str"/>
    <Param name="Use version" updates="None" val="" valType="str"/>
    <Param name="Window size (pixels)" updates="None" val="[1680, 1050]" valType="code"/>
    <Param name="blendMode" updates="None" val="avg" valType="str"/>
    <Param name="color" updates="None" val="$[0,0,0]" valType="str"/>
    <Param name="colorSpace" updates="None" val="rgb" valType="str"/>
    <Param name="expName" updates="None" val="DARC Demo Experiment" valType="str"/>
    <Param name="exportHTML" updates="None" val="on Sync" valType="str"/>
    <Param name="logging level" updates="None" val="debug" valType="code"/>
  </Settings>
  <Routines>
    <Routine name="trial">
      <CodeComponent name="do_not_edit">
        <Param name="Begin Experiment" updates="constant" val="# ** THIS CODE COMPONENT SHOULD BE AT THE TOP IN THE BUILDER VIEW **&amp;#10;# All code in this code component should be fully generic to any &amp;#10;# Bayesian Adaptive Design experiment and so should not be edited&amp;#10;# unless you know what you are doing.&amp;#10;&amp;#10;&amp;#10;from darc_toolbox.utils import was_last_response_B&amp;#10;&amp;#10;# Set up a logger for BAD related debugging&amp;#10;import logging&amp;#10;logging.basicConfig(filename=filename+'_BAD.log',&amp;#10;    level=logging.DEBUG,&amp;#10;    format='%(asctime)s:%(levelname)s:%(funcName)s:%(message)s')&amp;#10;&amp;#10;&amp;#10;# We will tell the PsychoPy trial loop thing that we will have an &amp;#10;# arbitrarily high number of trials. We specify number of trials through&amp;#10;# the Experiment Settings GUI. The trial routine is ended when our&amp;#10;# design generator returns None&amp;#10;max_trials = 666&amp;#10;&amp;#10;&amp;#10;# we start with no previous response&amp;#10;last_response_chose_B = None&amp;#10;" valType="extendedCode"/>
        <Param name="Begin JS Experiment" updates="constant" val="" valType="extendedCode"/>
        <Param name="Begin JS Routine" updates="constant" val="" valType="extendedCode"/>
        <Param name="Begin Routine" updates="constant" val="# DESIGN GENERATOR =================================================&amp;#10;design = design_thing.get_next_design(model)&amp;#10;&amp;#10;# If we are out of designs, then break out of the trial loop&amp;#10;if design is None:&amp;#10;    print('Breaking out of trial loop now')&amp;#10;    break&amp;#10;&amp;#10;# NOTE TO EXPERIMENTER: if we want to do any adjustments to the design, &amp;#10;# such as rounding up significant figures etc, we should do that here to&amp;#10;# the actual design itself rather than just the text displayed to &amp;#10;# participants. That way the data we output will correspond exactly to the&amp;#10;# prospects actually shown to participants.&amp;#10;&amp;#10;&amp;#10;&amp;#10;" valType="extendedCode"/>
        <Param name="Code Type" updates="None" val="Py" valType="str"/>
        <Param name="Each Frame" updates="constant" val="" valType="extendedCode"/>
        <Param name="Each JS Frame" updates="constant" val="" valType="extendedCode"/>
        <Param name="End Experiment" updates="constant" val="# export parameter summary&amp;#10;model.θ.describe().to_csv(filename+'_parameter_summary.csv')&amp;#10;&amp;#10;# export all particles, full posterior&amp;#10;model.θ.to_csv(filename+'_parameter_all_particles.csv')&amp;#10;&amp;#10;# visualise posterior distributions&amp;#10;try:&amp;#10;    model.export_posterior_histograms(filename)&amp;#10;except Exception as err:&amp;#10;    print('FAILED to export posterior histograms as .pdf')&amp;#10;    print(f'Error {err}')&amp;#10;&amp;#10;&amp;#10;&amp;#10;&amp;#10;" valType="extendedCode"/>
        <Param name="End JS Experiment" updates="constant" val="" valType="extendedCode"/>
        <Param name="End JS Routine" updates="constant" val="" valType="extendedCode"/>
        <Param name="End Routine" updates="constant" val="# Clear screen as soon as we press the button. Useful because the code &amp;#10;# below can take a moment to run before things are cleared, which leads to &amp;#10;# crappy responsivity&amp;#10;win.flip()&amp;#10;&amp;#10;# Turn the response from PsychoPy into a True/False, did they choose B?&amp;#10;# `response` is the name of a PsychoPy keyboard component.&amp;#10;last_response_chose_B = was_last_response_B(response.keys)&amp;#10;&amp;#10;design_thing.enter_trial_design_and_response(design, last_response_chose_B)&amp;#10;&amp;#10;model.update_beliefs(design_thing.get_df())&amp;#10;&amp;#10;&amp;#10;" valType="extendedCode"/>
        <Param name="disabled" updates="None" val="False" valType="bool"/>
        <Param name="name" updates="None" val="do_not_edit" valType="code"/>
      </CodeComponent>
      <CodeComponent name="darc">
        <Param name="Begin Experiment" updates="constant" val="from darc_toolbox import Prospect, Design&amp;#10;from darc_toolbox.utils import days_to_string&amp;#10;from darc_toolbox.data_plotting import data_plotter&amp;#10;&amp;#10;&amp;#10;# Process experimenter inputs from experiment settings GUI -------------&amp;#10;# Number of trials obtained from the PsychoPy GUI is stored as a string&amp;#10;# so we need to convert that to an integer.&amp;#10;expInfo['trials'] = int(expInfo['trials'])&amp;#10;# Convert number of particles from the GUI to an integer&amp;#10;expInfo['particles'] = int(expInfo['particles'])&amp;#10;&amp;#10;&amp;#10;# Now we will chose our (design, model) combination. -------------------&amp;#10;# The lines below do this via a GUI, which is intended just for demo purposes.&amp;#10;# For actual experiments, I recommend replacing the GUI and just replacing these&amp;#10;# lines of code with your particular desired design and model combination.&amp;#10;from chooser import gui_chooser_for_demo&amp;#10;design_thing, model = gui_chooser_for_demo(win, gui, core, event, expInfo)&amp;#10;&amp;#10;&amp;#10;# If you want to customise the location and filename of saved data, then&amp;#10;# edit that in Experiment Settings &gt; Data tab.&amp;#10;# OR you can overwrite that with the following line, adapted for your &amp;#10;# goals&amp;#10;#     filename = _thisDir + os.sep + u'data/%s_%s_%s' % (expInfo['participant'], expName, expInfo['date'])&amp;#10;&amp;#10;&amp;#10;def design_to_display_strings(design):&amp;#10;    '''A function to convert a design into strings available for PsychoPy &amp;#10;    to print to screen.&amp;#10;    Experimenters can edit this code to customise how the stimuli are &amp;#10;    presented to participants. For example, you can change from £ to&amp;#10;    whatever your local currency symbol is.'''&amp;#10;    # rewards -------------------------&amp;#10;    text_RA = f'£{design.ProspectA.reward:0.2f}'&amp;#10;    text_RB = f'£{design.ProspectB.reward:0.2f}'&amp;#10;&amp;#10;    # delays --------------------------&amp;#10;    text_DA = days_to_string(design.ProspectA.delay)&amp;#10;    text_DB = days_to_string(design.ProspectB.delay)&amp;#10;&amp;#10;    # probabilities -------------------&amp;#10;    text_PA = f'{design.ProspectA.prob*100:3.0f}%'&amp;#10;    text_PB = f'{design.ProspectB.prob*100:3.0f}%'&amp;#10;    return (text_RA, text_RB, text_DA, text_DB, text_PA, text_PB)" valType="extendedCode"/>
        <Param name="Begin JS Experiment" updates="constant" val="" valType="extendedCode"/>
        <Param name="Begin JS Routine" updates="constant" val="" valType="extendedCode"/>
        <Param name="Begin Routine" updates="constant" val="# convert the design into meaningful strings &amp;#10;text_RA, text_RB, text_DA, text_DB, text_PA, text_PB = design_to_display_strings(design)" valType="extendedCode"/>
        <Param name="Code Type" updates="None" val="Py" valType="str"/>
        <Param name="Each Frame" updates="constant" val="" valType="extendedCode"/>
        <Param name="Each JS Frame" updates="constant" val="" valType="extendedCode"/>
        <Param name="End Experiment" updates="constant" val="# visualise the data (designs and responses)&amp;#10;try:&amp;#10;    data_plotter(design_thing.get_df(), filename)&amp;#10;except Exception as err:&amp;#10;    print('FAILED to export plot of response data')&amp;#10;    print(f'Error: {err}')" valType="extendedCode"/>
        <Param name="End JS Experiment" updates="constant" val="" valType="extendedCode"/>
        <Param name="End JS Routine" updates="constant" val="" valType="extendedCode"/>
        <Param name="End Routine" updates="constant" val="# add DARC specific data, eventually exported by PsychoPy as a .csv&amp;#10;# note: the name here (ie `trials` has to match the PsychoPy trial&amp;#10;# loop object name&amp;#10;trials.addData('RA', design.ProspectA.reward)&amp;#10;trials.addData('DA', design.ProspectA.delay)&amp;#10;trials.addData('PA', design.ProspectA.prob)&amp;#10;&amp;#10;trials.addData('RB', design.ProspectB.reward)&amp;#10;trials.addData('DB', design.ProspectB.delay)&amp;#10;trials.addData('PB', design.ProspectB.prob)&amp;#10;&amp;#10;if last_response_chose_B:&amp;#10;    trials.addData('R', 'B')&amp;#10;else:&amp;#10;    trials.addData('R', 'A')" valType="extendedCode"/>
        <Param name="disabled" updates="None" val="False" valType="bool"/>
        <Param name="name" updates="None" val="darc" valType="code"/>
      </CodeComponent>
      <TextComponent name="RAitem">
        <Param name="color" updates="constant" val="white" valType="str"/>
        <Param name="colorSpace" updates="constant" val="rgb" valType="str"/>
        <Param name="disabled" updates="None" val="False" valType="bool"/>
        <Param name="durationEstim" updates="None" val="" valType="code"/>
        <Param name="flip" updates="constant" val="" valType="str"/>
        <Param name="font" updates="constant" val="Calibri" valType="str"/>
        <Param name="languageStyle" updates="None" val="LTR" valType="str"/>
        <Param name="letterHeight" updates="constant" val="0.1" valType="code"/>
        <Param name="name" updates="None" val="RAitem" valType="code"/>
        <Param name="opacity" updates="constant" val="1" valType="code"/>
        <Param name="ori" updates="constant" val="0" valType="code"/>
        <Param name="pos" updates="constant" val="(-0.4, 0.2)" valType="code"/>
        <Param name="saveStartStop" updates="None" val="True" valType="bool"/>
        <Param name="startEstim" updates="None" val="" valType="code"/>
        <Param name="startType" updates="None" val="time (s)" valType="str"/>
        <Param name="startVal" updates="None" val="0" valType="code"/>
        <Param name="stopType" updates="None" val="duration (s)" valType="str"/>
        <Param name="stopVal" updates="constant" val="" valType="code"/>
        <Param name="syncScreenRefresh" updates="None" val="True" valType="bool"/>
        <Param name="text" updates="set every repeat" val="$text_RA" valType="str"/>
        <Param name="units" updates="None" val="from exp settings" valType="str"/>
        <Param name="wrapWidth" updates="constant" val="" valType="code"/>
      </TextComponent>
      <TextComponent name="DAitem">
        <Param name="color" updates="constant" val="white" valType="str"/>
        <Param name="colorSpace" updates="constant" val="rgb" valType="str"/>
        <Param name="disabled" updates="None" val="False" valType="bool"/>
        <Param name="durationEstim" updates="None" val="" valType="code"/>
        <Param name="flip" updates="constant" val="" valType="str"/>
        <Param name="font" updates="constant" val="Calibri" valType="str"/>
        <Param name="languageStyle" updates="None" val="LTR" valType="str"/>
        <Param name="letterHeight" updates="constant" val="0.1" valType="code"/>
        <Param name="name" updates="None" val="DAitem" valType="code"/>
        <Param name="opacity" updates="constant" val="1" valType="code"/>
        <Param name="ori" updates="constant" val="0" valType="code"/>
        <Param name="pos" updates="constant" val="(-0.4, 0)" valType="code"/>
        <Param name="saveStartStop" updates="None" val="True" valType="bool"/>
        <Param name="startEstim" updates="None" val="" valType="code"/>
        <Param name="startType" updates="None" val="time (s)" valType="str"/>
        <Param name="startVal" updates="None" val="0" valType="code"/>
        <Param name="stopType" updates="None" val="duration (s)" valType="str"/>
        <Param name="stopVal" updates="constant" val="" valType="code"/>
        <Param name="syncScreenRefresh" updates="None" val="True" valType="bool"/>
        <Param name="text" updates="set every repeat" val="$text_DA" valType="str"/>
        <Param name="units" updates="None" val="from exp settings" valType="str"/>
        <Param name="wrapWidth" updates="constant" val="" valType="code"/>
      </TextComponent>
      <TextComponent name="PAitem">
        <Param name="color" updates="constant" val="white" valType="str"/>
        <Param name="colorSpace" updates="constant" val="rgb" valType="str"/>
        <Param name="disabled" updates="None" val="False" valType="bool"/>
        <Param name="durationEstim" updates="None" val="" valType="code"/>
        <Param name="flip" updates="constant" val="" valType="str"/>
        <Param name="font" updates="constant" val="Calibri" valType="str"/>
        <Param name="languageStyle" updates="None" val="LTR" valType="str"/>
        <Param name="letterHeight" updates="constant" val="0.1" valType="code"/>
        <Param name="name" updates="None" val="PAitem" valType="code"/>
        <Param name="opacity" updates="constant" val="1" valType="code"/>
        <Param name="ori" updates="constant" val="0" valType="code"/>
        <Param name="pos" updates="constant" val="(-0.4, -0.2)" valType="code"/>
        <Param name="saveStartStop" updates="None" val="True" valType="bool"/>
        <Param name="startEstim" updates="None" val="" valType="code"/>
        <Param name="startType" updates="None" val="time (s)" valType="str"/>
        <Param name="startVal" updates="None" val="0" valType="code"/>
        <Param name="stopType" updates="None" val="duration (s)" valType="str"/>
        <Param name="stopVal" updates="constant" val="" valType="code"/>
        <Param name="syncScreenRefresh" updates="None" val="True" valType="bool"/>
        <Param name="text" updates="set every repeat" val="$text_PA" valType="str"/>
        <Param name="units" updates="None" val="from exp settings" valType="str"/>
        <Param name="wrapWidth" updates="constant" val="" valType="code"/>
      </TextComponent>
      <TextComponent name="RBitem">
        <Param name="color" updates="constant" val="white" valType="str"/>
        <Param name="colorSpace" updates="constant" val="rgb" valType="str"/>
        <Param name="disabled" updates="None" val="False" valType="bool"/>
        <Param name="durationEstim" updates="None" val="" valType="code"/>
        <Param name="flip" updates="constant" val="" valType="str"/>
        <Param name="font" updates="constant" val="Calibri" valType="str"/>
        <Param name="languageStyle" updates="None" val="LTR" valType="str"/>
        <Param name="letterHeight" updates="constant" val="0.1" valType="code"/>
        <Param name="name" updates="None" val="RBitem" valType="code"/>
        <Param name="opacity" updates="constant" val="1" valType="code"/>
        <Param name="ori" updates="constant" val="0" valType="code"/>
        <Param name="pos" updates="constant" val="(0.4,0.2)" valType="code"/>
        <Param name="saveStartStop" updates="None" val="True" valType="bool"/>
        <Param name="startEstim" updates="None" val="" valType="code"/>
        <Param name="startType" updates="None" val="time (s)" valType="str"/>
        <Param name="startVal" updates="None" val="0" valType="code"/>
        <Param name="stopType" updates="None" val="duration (s)" valType="str"/>
        <Param name="stopVal" updates="constant" val="" valType="code"/>
        <Param name="syncScreenRefresh" updates="None" val="True" valType="bool"/>
        <Param name="text" updates="set every repeat" val="$text_RB" valType="str"/>
        <Param name="units" updates="None" val="from exp settings" valType="str"/>
        <Param name="wrapWidth" updates="constant" val="" valType="code"/>
      </TextComponent>
      <TextComponent name="DBitem">
        <Param name="color" updates="constant" val="white" valType="str"/>
        <Param name="colorSpace" updates="constant" val="rgb" valType="str"/>
        <Param name="disabled" updates="None" val="False" valType="bool"/>
        <Param name="durationEstim" updates="None" val="" valType="code"/>
        <Param name="flip" updates="constant" val="" valType="str"/>
        <Param name="font" updates="constant" val="Calibri" valType="str"/>
        <Param name="languageStyle" updates="None" val="LTR" valType="str"/>
        <Param name="letterHeight" updates="constant" val="0.1" valType="code"/>
        <Param name="name" updates="None" val="DBitem" valType="code"/>
        <Param name="opacity" updates="constant" val="1" valType="code"/>
        <Param name="ori" updates="constant" val="0" valType="code"/>
        <Param name="pos" updates="constant" val="(0.4, 0)" valType="code"/>
        <Param name="saveStartStop" updates="None" val="True" valType="bool"/>
        <Param name="startEstim" updates="None" val="" valType="code"/>
        <Param name="startType" updates="None" val="time (s)" valType="str"/>
        <Param name="startVal" updates="None" val="0" valType="code"/>
        <Param name="stopType" updates="None" val="duration (s)" valType="str"/>
        <Param name="stopVal" updates="constant" val="" valType="code"/>
        <Param name="syncScreenRefresh" updates="None" val="True" valType="bool"/>
        <Param name="text" updates="set every repeat" val="$text_DB" valType="str"/>
        <Param name="units" updates="None" val="from exp settings" valType="str"/>
        <Param name="wrapWidth" updates="constant" val="" valType="code"/>
      </TextComponent>
      <TextComponent name="PBitem">
        <Param name="color" updates="constant" val="white" valType="str"/>
        <Param name="colorSpace" updates="constant" val="rgb" valType="str"/>
        <Param name="disabled" updates="None" val="False" valType="bool"/>
        <Param name="durationEstim" updates="None" val="" valType="code"/>
        <Param name="flip" updates="constant" val="" valType="str"/>
        <Param name="font" updates="constant" val="Calibri" valType="str"/>
        <Param name="languageStyle" updates="None" val="LTR" valType="str"/>
        <Param name="letterHeight" updates="constant" val="0.1" valType="code"/>
        <Param name="name" updates="None" val="PBitem" valType="code"/>
        <Param name="opacity" updates="constant" val="1" valType="code"/>
        <Param name="ori" updates="constant" val="0" valType="code"/>
        <Param name="pos" updates="constant" val="(0.4, -0.2)" valType="code"/>
        <Param name="saveStartStop" updates="None" val="True" valType="bool"/>
        <Param name="startEstim" updates="None" val="" valType="code"/>
        <Param name="startType" updates="None" val="time (s)" valType="str"/>
        <Param name="startVal" updates="None" val="0" valType="code"/>
        <Param name="stopType" updates="None" val="duration (s)" valType="str"/>
        <Param name="stopVal" updates="constant" val="" valType="code"/>
        <Param name="syncScreenRefresh" updates="None" val="True" valType="bool"/>
        <Param name="text" updates="set every repeat" val="$text_PB" valType="str"/>
        <Param name="units" updates="None" val="from exp settings" valType="str"/>
        <Param name="wrapWidth" updates="constant" val="" valType="code"/>
      </TextComponent>
      <KeyboardComponent name="response">
        <Param name="allowedKeys" updates="constant" val="'left','right'" valType="code"/>
        <Param name="correctAns" updates="constant" val="" valType="str"/>
        <Param name="disabled" updates="None" val="False" valType="bool"/>
        <Param name="discard previous" updates="constant" val="True" valType="bool"/>
        <Param name="durationEstim" updates="None" val="" valType="code"/>
        <Param name="forceEndRoutine" updates="constant" val="True" valType="bool"/>
        <Param name="name" updates="None" val="response" valType="code"/>
        <Param name="saveStartStop" updates="None" val="True" valType="bool"/>
        <Param name="startEstim" updates="None" val="" valType="code"/>
        <Param name="startType" updates="None" val="time (s)" valType="str"/>
        <Param name="startVal" updates="None" val="0.15" valType="code"/>
        <Param name="stopType" updates="None" val="duration (s)" valType="str"/>
        <Param name="stopVal" updates="constant" val="" valType="code"/>
        <Param name="store" updates="constant" val="last key" valType="str"/>
        <Param name="storeCorrect" updates="constant" val="False" valType="bool"/>
        <Param name="syncScreenRefresh" updates="constant" val="True" valType="bool"/>
      </KeyboardComponent>
      <TextComponent name="instruction_text">
        <Param name="color" updates="constant" val="white" valType="str"/>
        <Param name="colorSpace" updates="constant" val="rgb" valType="str"/>
        <Param name="disabled" updates="None" val="False" valType="bool"/>
        <Param name="durationEstim" updates="None" val="" valType="code"/>
        <Param name="flip" updates="constant" val="" valType="str"/>
        <Param name="font" updates="constant" val="Arial" valType="str"/>
        <Param name="languageStyle" updates="None" val="LTR" valType="str"/>
        <Param name="letterHeight" updates="constant" val="0.1" valType="code"/>
        <Param name="name" updates="None" val="instruction_text" valType="code"/>
        <Param name="opacity" updates="constant" val="1" valType="code"/>
        <Param name="ori" updates="constant" val="0" valType="code"/>
        <Param name="pos" updates="constant" val="(0,0.8)" valType="code"/>
        <Param name="saveStartStop" updates="None" val="True" valType="bool"/>
        <Param name="startEstim" updates="None" val="" valType="code"/>
        <Param name="startType" updates="None" val="time (s)" valType="str"/>
        <Param name="startVal" updates="None" val="0.0" valType="code"/>
        <Param name="stopType" updates="None" val="duration (s)" valType="str"/>
        <Param name="stopVal" updates="constant" val="" valType="code"/>
        <Param name="syncScreenRefresh" updates="None" val="True" valType="bool"/>
        <Param name="text" updates="constant" val="left or right keys to chose" valType="str"/>
        <Param name="units" updates="None" val="from exp settings" valType="str"/>
        <Param name="wrapWidth" updates="constant" val="" valType="code"/>
      </TextComponent>
    </Routine>
    <Routine name="bye">
      <TextComponent name="goodbye">
        <Param name="color" updates="constant" val="white" valType="str"/>
        <Param name="colorSpace" updates="constant" val="rgb" valType="str"/>
        <Param name="disabled" updates="None" val="False" valType="bool"/>
        <Param name="durationEstim" updates="None" val="" valType="code"/>
        <Param name="flip" updates="constant" val="" valType="str"/>
        <Param name="font" updates="constant" val="Arial" valType="str"/>
        <Param name="languageStyle" updates="None" val="LTR" valType="str"/>
        <Param name="letterHeight" updates="constant" val="0.1" valType="code"/>
        <Param name="name" updates="None" val="goodbye" valType="code"/>
        <Param name="opacity" updates="constant" val="1" valType="code"/>
        <Param name="ori" updates="constant" val="0" valType="code"/>
        <Param name="pos" updates="constant" val="(0, 0)" valType="code"/>
        <Param name="saveStartStop" updates="None" val="True" valType="bool"/>
        <Param name="startEstim" updates="None" val="" valType="code"/>
        <Param name="startType" updates="None" val="time (s)" valType="str"/>
        <Param name="startVal" updates="None" val="0.0" valType="code"/>
        <Param name="stopType" updates="None" val="duration (s)" valType="str"/>
        <Param name="stopVal" updates="constant" val="2" valType="code"/>
        <Param name="syncScreenRefresh" updates="None" val="True" valType="bool"/>
        <Param name="text" updates="constant" val="Thank you for taking part in science!" valType="str"/>
        <Param name="units" updates="None" val="from exp settings" valType="str"/>
        <Param name="wrapWidth" updates="constant" val="" valType="code"/>
      </TextComponent>
    </Routine>
    <Routine name="instructions">
      <TextComponent name="text">
        <Param name="color" updates="constant" val="white" valType="str"/>
        <Param name="colorSpace" updates="constant" val="rgb" valType="str"/>
        <Param name="disabled" updates="None" val="False" valType="bool"/>
        <Param name="durationEstim" updates="None" val="" valType="code"/>
        <Param name="flip" updates="constant" val="" valType="str"/>
        <Param name="font" updates="constant" val="Arial" valType="str"/>
        <Param name="languageStyle" updates="None" val="LTR" valType="str"/>
        <Param name="letterHeight" updates="constant" val="0.075" valType="code"/>
        <Param name="name" updates="None" val="text" valType="code"/>
        <Param name="opacity" updates="constant" val="1" valType="code"/>
        <Param name="ori" updates="constant" val="0" valType="code"/>
        <Param name="pos" updates="constant" val="(0, 0)" valType="code"/>
        <Param name="saveStartStop" updates="None" val="True" valType="bool"/>
        <Param name="startEstim" updates="None" val="" valType="code"/>
        <Param name="startType" updates="None" val="time (s)" valType="str"/>
        <Param name="startVal" updates="None" val="0.0" valType="code"/>
        <Param name="stopType" updates="None" val="duration (s)" valType="str"/>
        <Param name="stopVal" updates="constant" val="" valType="code"/>
        <Param name="syncScreenRefresh" updates="None" val="True" valType="bool"/>
        <Param name="text" updates="constant" val="You will be presented with choices between 2 amounts of money.&amp;#10;Some will be delivered at different points in time.&amp;#10;Some have a certain probability of being received. If not, you receive nothing.&amp;#10;&amp;#10;Your job is to consider which you prefer and choose using the LEFT or RIGHT keys.&amp;#10;&amp;#10;There is no correct or incorrect response, please emphasise accuracy in which choice you prefer, no need to rush!&amp;#10;&amp;#10;Press SPACE to continue." valType="str"/>
        <Param name="units" updates="None" val="from exp settings" valType="str"/>
        <Param name="wrapWidth" updates="constant" val="" valType="code"/>
      </TextComponent>
      <KeyboardComponent name="space_press">
        <Param name="allowedKeys" updates="constant" val="'space'" valType="code"/>
        <Param name="correctAns" updates="constant" val="" valType="str"/>
        <Param name="disabled" updates="None" val="False" valType="bool"/>
        <Param name="discard previous" updates="constant" val="True" valType="bool"/>
        <Param name="durationEstim" updates="None" val="" valType="code"/>
        <Param name="forceEndRoutine" updates="constant" val="True" valType="bool"/>
        <Param name="name" updates="None" val="space_press" valType="code"/>
        <Param name="saveStartStop" updates="None" val="True" valType="bool"/>
        <Param name="startEstim" updates="None" val="" valType="code"/>
        <Param name="startType" updates="None" val="time (s)" valType="str"/>
        <Param name="startVal" updates="None" val="1.0" valType="code"/>
        <Param name="stopType" updates="None" val="duration (s)" valType="str"/>
        <Param name="stopVal" updates="constant" val="" valType="code"/>
        <Param name="store" updates="constant" val="nothing" valType="str"/>
        <Param name="storeCorrect" updates="constant" val="False" valType="bool"/>
        <Param name="syncScreenRefresh" updates="constant" val="True" valType="bool"/>
      </KeyboardComponent>
    </Routine>
  </Routines>
  <Flow>
    <Routine name="instructions"/>
    <LoopInitiator loopType="TrialHandler" name="trials">
      <Param name="Selected rows" updates="None" val="" valType="str"/>
      <Param name="conditions" updates="None" val="None" valType="str"/>
      <Param name="conditionsFile" updates="None" val="" valType="str"/>
      <Param name="endPoints" updates="None" val="[0, 1]" valType="num"/>
      <Param name="isTrials" updates="None" val="True" valType="bool"/>
      <Param name="loopType" updates="None" val="sequential" valType="str"/>
      <Param name="nReps" updates="None" val="666" valType="code"/>
      <Param name="name" updates="None" val="trials" valType="code"/>
      <Param name="random seed" updates="None" val="" valType="code"/>
    </LoopInitiator>
    <Routine name="trial"/>
    <LoopTerminator name="trials"/>
    <Routine name="bye"/>
  </Flow>
</PsychoPy2experiment>
