from os import environ # if you set a property in SESSION_CONFIG_DEFAULTS, it will be inherited by all configs # in SESSION_CONFIGS, except those that explicitly override it. # the session config can be accessed from methods in your apps as self.session.config, # e.g. self.session.config['participation_fee'] mturk_hit_settings = { 'keywords': ['bonus', 'study'], 'title': 'Short decision-making task', 'description': 'Complete a short decision-making task as part of an experiment for the University of California, Irvine.', 'frame_height': 500, 'template': 'global/mturk_template.html', 'minutes_allotted_per_assignment': 180, # 3 hours 'expiration_hours': 24, # 1 day # 'grant_qualification_id': 'YOUR_QUALIFICATION_ID_HERE',# to prevent retakes 'qualification_requirements': [ { 'QualificationTypeId': "00000000000000000071", 'Comparator': "In", 'LocaleValues': [{'Country': "US"}, {'Country': "CA"}] }, ] } SESSION_CONFIG_DEFAULTS = { 'real_world_currency_per_point': 1.00, 'participation_fee': 7.00, 'doc': "", 'mturk_hit_settings': mturk_hit_settings, } SESSION_CONFIGS = [ { 'name': 'DS', 'display_name': "DS", 'num_demo_participants': 4, 'app_sequence': ['Double_Slit'], 'participation_fee': 0.50, 'slits': {2, 3, 7, 8}, 'mturk_hit_settings': mturk_hit_settings, 'question': "I like the color green." }, { 'name': 'Savings', 'display_name': "Savings Choice", 'num_demo_participants': 1, 'app_sequence': ['Savings'], 'mturk_hit_settings': mturk_hit_settings, 'real_world_currency_per_point': 1.00, 'income_min': 60, 'income_max': 80, 'utility_multiplier': 0.77, 'constrained_first': True, 'Hanoi_time': 3, 'Hanoi_intercept': 10, 'Hanoi_penalty': 0.5, 'participation_fee': 7.00, }, { 'name': 'Deferred_Savings_MTurk', 'display_name': 'Deferred Savings Account: For MTurk', 'app_sequence': ['Deferred_Savings'], 'num_demo_participants': 1, 'real_world_currency_per_point': 0.01, # True if you want to skip the quiz questions, False otherwise 'skip_quiz': False, # True if there is a tax-deferred account, False otherwise 'deferred_account': True, # True if capital gains are taxed at different rate 'capital_gains_tax': False, 'capital_gains_rate': 0.0681, 'interest_yield': 0.10, 'participation_fee': 2.00, # Payment form for ESSL subjects, not for MTurk subjects 'show_payment_form': False, 'end_roll': 10, 'block_size': 10, 'initial_block': 15, 'income_graph_max': 200000, 'income_graph_increment': 1000, 'consumption_graph_min': 48000, 'consumption_graph_max': 200000, 'consumption_graph_increment': 100, # Pre-generated sequences 'roll_sequences': [[9, 5, 9, 8, 9, 7, 6, 6, 4, 6, 1, 3, 8, 7, 6, 3, 6, 7, 9, 7], [3, 5, 7, 10, 7, 10, 10, 6, 10, 2, 8, 2, 5, 8, 3, 6, 5, 8, 1, 2], [5, 8, 1, 7, 7, 7, 9, 2, 5, 9, 1, 7, 5, 8, 8, 8, 1, 5, 9, 6], [7, 1, 7, 1, 7, 2, 3, 6, 8, 3], [2, 7, 10, 10, 5, 9, 7, 8, 7, 8, 2, 1, 6, 7, 4, 8, 8, 4, 7, 6], [3, 2, 1, 9, 5, 6, 1, 4, 10, 3], [6, 6, 5, 7, 10, 5, 8, 1, 4, 8], [8, 9, 2, 9, 1, 7, 4, 5, 10, 1], [10, 10, 5, 6, 6, 2, 6, 5, 5, 5, 2, 6, 2, 2, 10, 6, 1, 4, 9, 5], [4, 5, 6, 2, 7, 7, 9, 6, 6, 4, 4, 3, 9, 10, 4, 6, 10, 9, 2, 1], [5, 5, 9, 3, 8, 4, 9, 6, 1, 5], [9, 4, 4, 3, 1, 1, 1, 1, 3, 1], [10, 8, 1, 1, 6, 10, 9, 5, 2, 10], [7, 10, 7, 8, 2, 4, 7, 3, 4, 5, 1, 4, 9, 10, 5, 8, 9, 6, 8, 4], [8, 5, 8, 4, 2, 8, 6, 6, 10, 7, 8, 8, 6, 1, 6, 8, 7, 2, 6, 9], [5, 3, 2, 9, 3, 9, 10, 6, 4, 6, 3, 1, 8, 1, 10, 6, 6, 2, 1, 8], [8, 8, 2, 8, 4, 10, 10, 4, 5, 6, 9, 9, 3, 3, 9, 8, 1, 2, 4, 5], [7, 9, 9, 2, 1, 7, 2, 1, 6, 2], [7, 6, 2, 2, 4, 3, 3, 1, 5, 3], [2, 2, 6, 9, 8, 3, 4, 7, 10, 2, 7, 2, 1, 1, 4, 4, 3, 8, 6, 1]], # Scaling of payoffs: Max payoff under CARA utility is this in dollars 'payoff_scaling': 1, 'tax_schedule': [[0, 0.00], [21000, 0.10], [39000, 0.15], [96000, 0.25]], # The last figure will be used for all subsequent rounds 'endowments': [67000, 74000, 79000, 85000, 89000, 93000, 96000, 97000, 98000, 98000, 97000, 95000, 93000, 90000, 86000, 51000], 'contribution_limits': [[0, 36000], [11, 48000]], # CRRA utility: multiplier * ln (x / baseline) # CARA utility: 1-e^(exponent * (x - baseline))*multiplier 'multiplier': 1, 'exponent': 0.00005, # Baseline consumption at which payoff is zero 'baseline': 47400, # Minimum consumption allowed 'min_consumption': 47400, # Minimum before-tax income allowed; computed based on above 'min_income': 51000, # Default consumption 'default_consumption': 50000, }, { 'name': 'Deferred_Savings_ESSL', 'display_name': 'Deferred Savings Account: For ESSL subjects', 'app_sequence': ['Deferred_Savings'], 'num_demo_participants': 1, 'real_world_currency_per_point': 0.01, # True if you want to skip the quiz questions, False otherwise 'skip_quiz': False, # True if there is a tax-deferred account, False otherwise 'deferred_account': True, # True if capital gains are taxed at different rate 'capital_gains_tax': False, 'capital_gains_rate': 0.0681, 'interest_yield': 0.10, 'participation_fee': 7.00, # Payment form for ESSL subjects, not for MTurk subjects 'show_payment_form': True, ## True values for experiment ## 'end_roll': 10, 'block_size': 10, 'initial_block': 15, 'income_graph_max': 200000, 'income_graph_increment': 1000, 'consumption_graph_min': 48000, 'consumption_graph_max': 200000, 'consumption_graph_increment': 100, # Pre-generated sequences 'roll_sequences': [[9, 5, 9, 8, 9, 7, 6, 6, 4, 6, 1, 3, 8, 7, 6, 3, 6, 7, 9, 7], [3, 5, 7, 10, 7, 10, 10, 6, 10, 2, 8, 2, 5, 8, 3, 6, 5, 8, 1, 2], [5, 8, 1, 7, 7, 7, 9, 2, 5, 9, 1, 7, 5, 8, 8, 8, 1, 5, 9, 6], [7, 1, 7, 1, 7, 2, 3, 6, 8, 3], [2, 7, 10, 10, 5, 9, 7, 8, 7, 8, 2, 1, 6, 7, 4, 8, 8, 4, 7, 6], [3, 2, 1, 9, 5, 6, 1, 4, 10, 3], [6, 6, 5, 7, 10, 5, 8, 1, 4, 8], [8, 9, 2, 9, 1, 7, 4, 5, 10, 1], [10, 10, 5, 6, 6, 2, 6, 5, 5, 5, 2, 6, 2, 2, 10, 6, 1, 4, 9, 5], [4, 5, 6, 2, 7, 7, 9, 6, 6, 4, 4, 3, 9, 10, 4, 6, 10, 9, 2, 1], [5, 5, 9, 3, 8, 4, 9, 6, 1, 5], [9, 4, 4, 3, 1, 1, 1, 1, 3, 1], [10, 8, 1, 1, 6, 10, 9, 5, 2, 10], [7, 10, 7, 8, 2, 4, 7, 3, 4, 5, 1, 4, 9, 10, 5, 8, 9, 6, 8, 4], [8, 5, 8, 4, 2, 8, 6, 6, 10, 7, 8, 8, 6, 1, 6, 8, 7, 2, 6, 9], [5, 3, 2, 9, 3, 9, 10, 6, 4, 6, 3, 1, 8, 1, 10, 6, 6, 2, 1, 8], [8, 8, 2, 8, 4, 10, 10, 4, 5, 6, 9, 9, 3, 3, 9, 8, 1, 2, 4, 5], [7, 9, 9, 2, 1, 7, 2, 1, 6, 2], [7, 6, 2, 2, 4, 3, 3, 1, 5, 3], [2, 2, 6, 9, 8, 3, 4, 7, 10, 2, 7, 2, 1, 1, 4, 4, 3, 8, 6, 1]], # Scaling of payoffs: Max payoff under CARA utility is this in dollars 'payoff_scaling': 1, 'tax_schedule': [[0, 0.00], [21000, 0.10], [39000, 0.15], [96000, 0.25]], # The last figure will be used for all subsequent rounds 'endowments': [67000, 74000, 79000, 85000, 89000, 93000, 96000, 97000, 98000, 98000, 97000, 95000, 93000, 90000, 86000, 51000], 'contribution_limits': [[0, 36000], [11, 48000]], # CRRA utility: multiplier * ln (x / baseline) # CARA utility: 1-e^(exponent * (x - baseline))*multiplier 'multiplier': 1, 'exponent': 0.00005, # Baseline consumption at which payoff is zero 'baseline': 47400, # Minimum consumption allowed 'min_consumption': 47400, # Minimum before-tax income allowed; computed based on above 'min_income': 51000, # Default consumption 'default_consumption': 50000, }, { 'name': 'DMP_ESSL', 'display_name': 'Job Posting: For ESSL Subjects', 'app_sequence': ['DMP'], 'num_demo_participants': 10, 'real_world_currency_per_point': 0.03, 'participation_fee': 7.00, 'show_payment_form': True, 'endowment': 100, 'employee_profit': 24, 'separation_probability': 0.25, 'posting_cost': 19, 'population': 120, 'initial_employment_1': 6, 'initial_employment_2': 6, 'initial_employment_3': 6, 'initial_employment_4': 6, 'initial_employment_5': 6, 'initial_employment_6': 6, 'initial_employment_7': 6, 'initial_employment_8': 6, 'initial_employment_9': 6, 'initial_employment_10': 6, 'num_sequences': 5, 'die_roll': 5, 'supergame_lengths': None, }, { 'name': "Prisoners_Dilemma_test", 'app_sequence': ['PD_Comprehension', 'Prisoners_Dilemma', 'SVO_Task'], 'display_name': "Test of Prisoner's Dilemma", 'num_demo_participants': 2, 'participation_fee': 7.00, 'real_world_currency_per_point': 0.01, # Pre-generated sequences: (probability, length) # With 50% probability the order will be reversed 'sequences': [[0.67, 3], [0.33, 1], [0.4, 2], [0.25, 1], [0.7, 3], [0.1, 1]], 'payoff_unilateral_defection': 120, 'payoff_mutual_cooperation': 75, 'payoff_mutual_defection': 30, 'payoff_unilateral_cooperation': 15, 'sample_allocation_sequence': [[30, 80], [35, 70], [40, 60], [45, 50], [50, 40], [55, 30], [60, 20], [65, 10], [70, 0]], 'allocation_sequences': [ [[85, 85], [85, 76], [85, 68], [85, 59], [85, 50], [85, 41], [85, 33], [85, 24], [85, 15]], [[85, 15], [87, 19], [89, 24], [91, 28], [93, 33], [94, 37], [96, 41], [98, 46], [100, 50]], [[50, 100], [54, 98], [59, 96], [63, 94], [68, 93], [72, 91], [76, 89], [81, 87], [85, 85]], [[50, 100], [54, 89], [59, 79], [63, 68], [68, 58], [72, 47], [76, 36], [81, 26], [85, 15]], [[100, 50], [94, 56], [88, 63], [81, 69], [75, 75], [69, 81], [63, 88], [56, 94], [60, 100]], [[100, 50], [98, 56], [96, 63], [94, 69], [93, 75], [91, 81], [89, 88], [87, 94], [85, 100]]], }, { 'name': "Prisoners_Dilemma", 'app_sequence': ['Cognitive_Reflection_Test', 'PD_Comprehension', 'Prisoners_Dilemma', 'SVO_Task'], 'display_name': "Iterated Prisoner's Dilemma", 'num_demo_participants': 5, 'participation_fee': 7.00, 'real_world_currency_per_point': 0.01, # Pre-generated sequences: (probability, length) # This config variable allows you to reverse the order 'reverse_order': False, 'sequences': [[0.67, 4], [0.33, 1], [0.4, 2], [0.25, 1], [0.7, 3], [0.33, 2], [0.7, 5], [0.4, 1], [0.67, 2], [0.1, 1], [0.25, 1], [0.1, 1], [0.25, 2], [0.1, 1], [0.4, 1], [0.67, 4], [0.33, 2], [0.25, 1], [0.7, 2], [0.4, 3], [0.67, 2], [0.1, 1], [0.7, 4], [0.33, 1]], 'payoff_unilateral_defection': 120, 'payoff_mutual_cooperation': 75, 'payoff_mutual_defection': 30, 'payoff_unilateral_cooperation': 15, 'sample_allocation_sequence': [[30, 80], [35, 70], [40, 60], [45, 50], [50, 40], [55, 30], [60, 20], [65, 10], [70, 0]], 'allocation_sequences': [ [[85, 85], [85, 76], [85, 68], [85, 59], [85, 50], [85, 41], [85, 33], [85, 24], [85, 15]], [[85, 15], [87, 19], [89, 24], [91, 28], [93, 33], [94, 37], [96, 41], [98, 46], [100, 50]], [[50, 100], [54, 98], [59, 96], [63, 94], [68, 93], [72, 91], [76, 89], [81, 87], [85, 85]], [[50, 100], [54, 89], [59, 79], [63, 68], [68, 58], [72, 47], [76, 36], [81, 26], [85, 15]], [[100, 50], [94, 56], [88, 63], [81, 69], [75, 75], [69, 81], [63, 88], [56, 94], [60, 100]], [[100, 50], [98, 56], [96, 63], [94, 69], [93, 75], [91, 81], [89, 88], [87, 94], [85, 100]]], }, { 'name': 'SVO_Test', 'app_sequence': ['SVO_Task'], 'display_name': "Test of SVO Task", 'num_demo_participants': 4, 'participation_fee': 7, 'real_world_currency_per_point': 0.05, 'sample_allocation_sequence': [[30, 80], [35, 70], [40, 60], [45, 50], [50, 40], [55, 30], [60, 20], [65, 10], [70, 0]], 'allocation_sequences': [ [[85, 85], [85, 76], [85, 68], [85, 59], [85, 50], [85, 41], [85, 33], [85, 24], [85, 15]], [[85, 15], [87, 19], [89, 24], [91, 28], [93, 33], [94, 37], [96, 41], [98, 46], [100, 50]], [[50, 100], [54, 98], [59, 96], [63, 94], [68, 93], [72, 91], [76, 89], [81, 87], [85, 85]], [[50, 100], [54, 89], [59, 79], [63, 68], [68, 58], [72, 47], [76, 36], [81, 26], [85, 15]], [[100, 50], [94, 56], [88, 63], [81, 69], [75, 75], [69, 81], [63, 88], [56, 94], [60, 100]], [[100, 50], [98, 56], [96, 63], [94, 69], [93, 75], [91, 81], [89, 88], [87, 94], [85, 100]]], }, { 'name': "BoSN", 'app_sequence': ['BoSN'], 'display_name': "BOS", 'digit_span': 7, 'announce_treatment': True, 'num_demo_participants': 4, 'participation_fee': 7, 'real_world_currency_per_point': 1.00, }, # Errors in current version of oTree # { # 'name': 'Bargaining', # 'app_sequence': ['double_auction'], # 'display_name': "Bargaining", # 'num_demo_participants': 2, # 'participation_fee': 7, # 'real_world_currency_per_point': 1.00, # 'test_users': 0, # 'market_size': 2, # 'num_rounds': 30, # 'num_test_rounds': 2, # 'market_time': 90, # 'freeze_time': 15, # 'money_min': 0, # 'money_max': 600, # 'quantity_min': 0, # 'quantity_max': 12, # 'random_grouping': False, # }, { 'name': 'Bank_Run_T1', 'display_name': "Bank_Run_T1", 'num_demo_participants': 4, 'app_sequence': ['Bank_Run'], 'default_asset': 33, 'default_price': 1.5, 'endowment': 100, 'deposit': 100, 'has_accountant': False, 'forecast_prize': 5, 'allocation_prize': 3, 'accountant_prize': 3, 'asset_return': 2, 'paying_rounds_allocation': 1, 'paying_rounds_prediction': 1, 'participation_fee': 7, 'real_world_currency_per_point': 1.00, }, { 'name': 'Bank_Run_T2', 'display_name': "Bank_Run_T2", 'num_demo_participants': 4, 'app_sequence': ['Bank_Run'], 'default_asset': 33, 'default_price': 1.5, 'endowment': 100, 'deposit': 100, 'has_accountant': True, 'forecast_prize': 5, 'allocation_prize': 3, 'accountant_prize': 3, 'asset_return': 2, 'paying_rounds_allocation': 1, 'paying_rounds_prediction': 1, 'participation_fee': 7, 'real_world_currency_per_point': 1.00, } ] # see the end of this file for the inactive session configs # # Channel routing for real-time interaction CHANNEL_ROUTING = 'double_auction.routing.channel_routing' # ISO-639 code # for example: de, fr, ja, ko, zh-hans LANGUAGE_CODE = 'en' # e.g. EUR, GBP, CNY, JPY REAL_WORLD_CURRENCY_CODE = 'USD' USE_POINTS = True POINTS_DECIMAL_PLACES = 1 BROWSER_COMMAND = "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe" ROOMS = [ { 'name': 'ESSL_experiment', 'display_name': 'ESSL experiments', }, ] # AUTH_LEVEL: # this setting controls which parts of your site are freely accessible, # and which are password protected: # - If it's not set (the default), then the whole site is freely accessible. # - If you are launching a study and want visitors to only be able to # play your app if you provided them with a start link, set it to STUDY. # - If you would like to put your site online in public demo mode where # anybody can play a demo version of your game, but not access the rest # of the admin interface, set it to DEMO. # for flexibility, you can set it in the environment variable OTREE_AUTH_LEVEL AUTH_LEVEL = environ.get('OTREE_AUTH_LEVEL') ADMIN_USERNAME = 'admin' # for security, best to set admin password in an environment variable ADMIN_PASSWORD = '43murasaki' # Consider '', None, and '0' to be empty/false DEBUG = True DEMO_PAGE_INTRO_HTML = """ Here are various games implemented with oTree. These games are open source, and you can modify them as you wish. """ # don't share this with anybody. SECRET_KEY = '4tab1edvsgs5bpl2%^ia_zawm=a0lpah#%exc+yxm5jflp0oi2' # if an app is included in SESSION_CONFIGS, you don't need to list it here INSTALLED_APPS = ['otree'] # AWS_ACCESS_KEY_ID = environ.get('AWS_ACCESS_KEY_ID') # AWS_SECRET_ACCESS_KEY = environ.get('AWS_SECRET_ACCESS_KEY') # They said to use environment variables, but I couldn't get that to work # Patrick Julius keys # AWS_ACCESS_KEY_ID = 'AKIAJWG4LCDDT5CBH7LA' # AWS_SECRET_ACCESS_KEY = '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' # John Duffy keys AWS_ACCESS_KEY_ID = 'AKIAJMQ4MWM6PBFEUULQ' AWS_SECRET_ACCESS_KEY = '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'