# #from otree.api import Currency as c from otree.constants import BaseConstants # # ************* # ******************************************************************************************************* # # *** CLASS CONSTANTS *** # # ******************************************************************************************************************** # class Constants(BaseConstants): # ---------------------------------------------------------------------------------------------------------------- # # --- Task-specific Settings --- # # ---------------------------------------------------------------------------------------------------------------- # # type of variation # the app allows to vary one of the following parameters: the sure payoff, the probability of the high payoff, # or the high or low lottery payoff; the remaining three parameters are held constant for all choices # possible values for are 'sure_payoff' (Cohen et al., 1987; Abdellaoui et al., 2011) # 'probability' (Bruner, 2009), 'lottery_hi' (Bruner, 2009), or 'lottery_lo' (Gächter et al., 2007) variation = 'sure_payoff' # number (n) of choices with # determines how many choices between a lottery and a sure payoff shall be implemented num_choices = 10 # "high" and "low" payoffs (in currency units set in settings.py) of the lottery "option A" # the lottery payoffs remain constant if or # if , constitutes the high lottery payoff for the first choice # for subsequent choices , the high lottery outcome is determined by + * # if , constitutes the low lottery payoff for the first choice # for subsequent choices , the high lottery outcome is determined by - * lottery_hi = 200 lottery_lo = 0 # probability of lottery outcome "high" in % # the probability of lottery payoffs is constant if or # if , determines the likelihood of the high payoff in the first choice # for subsequent choices , the probability is determined by + * probability = 50 # sure payoff ("option B") # the sure payoff remains constant if or # if , constitutes the certain payment ("option B") in the first choice # for subsequent choices , the certain payment is determined by + * sure_payoff = 200 # step size (in units of the parameter defined in ) # the variable defines which of the four parameters is varied across the choices # constitutes the increment in terms of the varying parameter (while the remaining three are constant) # thus, the varying parameter for choice i = 1, 2, ..., n, , is defined by + * # if is set to 'sure_payoff', 'lottery_hi', or 'lottery_lo', is in currency units # if is set to 'probability', is in percentage units (i.e. %) step_size = -20 # initial endowment (in currency units set in settings.py) # defines an additional endowment for the task to capture potential losses if # if no additional endowment should be implemented, set to 0 endowment = 0.00 # ---------------------------------------------------------------------------------------------------------------- # # --- Overall Settings and Appearance --- # # ---------------------------------------------------------------------------------------------------------------- # # do not display certain payoff and ask for whether to accept or reject the lottery # if , subjects face a table with a lottery on the left and a sure payoff on the right # if , only the lottery will be displayed in the table but not the sure payoff # subjects are asked to indicate whether they want to accept or to reject each of the lotteries # note that is only implementable if is set to 'probability' or 'lottery_*' # if , choice = "A" refers to acceptance while choice = "B" refers to rejection accept_reject = False # show each lottery pair on a separate page # if , each single binary choice between lottery "A" and "B" is shown on a separate page # if , all choices are displayed in a table on one page one_choice_per_page = False # order choices between lottery pairs randomly # if , the ordering of binary decisions is randomized for display # if , binary choices are listed in ascending order of the probability of the "high" outcome random_order = False # enforce consistency, i.e. only allow for a single switching point # if , all options "A" above a selected option "A" are automatically selected # similarly, all options "B" below a selected option "B" are automatically checked, implying consistent choices # note that is only implemented if and enforce_consistency = False # show progress bar # if and , a progress bar is rendered # if , no information with respect to the advance within the task is displayed # the progress bar graphically depicts the advance within the task in terms of how many decision have been made # further, information in terms of "page x out of " (with x denoting the current choice) is provided progress_bar = True # show instructions page # if , a separate template "Instructions.html" is rendered prior to the task # if , the task starts immediately (e.g. in case of printed instructions) instructions = True # show results page summarizing the task's outcome including payoff information # if , a separate page containing all relevant information is displayed after finishing the task # if , the template "Decision.html" will not be rendered results = True coinflip = True instro2 = True instro3 = True USE_POINTS = False coin = ['heads', 'tail'] # ---------------------------------------------------------------------------------------------------------------- # # --- oTree Settings (Don't Modify) --- # # ---------------------------------------------------------------------------------------------------------------- # name_in_url = 'risk_experiment' players_per_group = None num_rounds = num_choices if one_choice_per_page else 1