import os from os import environ import dj_database_url from boto.mturk import qualification import otree.settings BASE_DIR = os.path.dirname(os.path.abspath(__file__)) ADMIN_USERNAME = 'TG' # for security, best to set admin password in an environment variable ADMIN_PASSWORD = 'complex' # don't share this with anybody. SECRET_KEY = 'a3)$ve0jmud6wq=jxm@&oad47bzni%%+uo-!p8m*6%9*^9-5li' MIGRATION_MODULES = {'otree': 'otree_core_migrations'} NODE_TLS_REJECT_UNAUTHORIZED = '0' # To use a database other than sqlite, # set the DATABASE_URL environment variable. # Examples: # postgres://USER:PASSWORD@HOST:PORT/NAME # mysql://USER:PASSWORD@HOST:PORT/NAME # DATABASES = { # 'default': dj_database_url.config( # default='sqlite:///' + os.path.join(BASE_DIR, 'db.sqlite3') # ) # } # AUTH_LEVEL: # 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 the # environment variable OTREE_AUTH_LEVEL 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, set OTREE_AUTH_LEVEL # to DEMO. This will allow people to play in demo mode, but not access # the full admin interface. AUTH_LEVEL = 'STUDY' # # setting for integration with AWS Mturk # AWS_ACCESS_KEY_ID = 'AKIAIKNHJEPZYRVNR7WQ' # AWS_SECRET_ACCESS_KEY = 'a62RVz6r7jZxI0e7gW2XSmO575/Z2zOkcbklfTxx' # e.g. EUR, CAD, GBP, CHF, CNY, JPY REAL_WORLD_CURRENCY_CODE = 'USD' USE_POINTS = False REAL_WORLD_CURRENCY_DECIMAL_PLACES = 2 # e.g. en, de, fr, it, ja, zh-hans # see: https://docs.djangoproject.com/en/1.9/topics/i18n/#term-language-code LANGUAGE_CODE = 'en' # if an app is included in SESSION_CONFIGS, you don't need to list it here INSTALLED_APPS = ['otree', 'scipy'] # SENTRY_DSN = '' DEMO_PAGE_INTRO_TEXT = """ Complexity and Lottery Choice """ # from here on are qualifications requirements for workers # see description for requirements on Amazon Mechanical Turk website: # http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_QualificationRequirementDataStructureArticle.html # and also in docs for boto: # https://boto.readthedocs.org/en/latest/ref/mturk.html?highlight=mturk#module-boto.mturk.qualification mturk_hit_settings = { 'keywords': ['easy', 'bonus', 'choice', 'study'], # 'title': '15-Minute Research Study: Earn $1 Reward Plus Up To $6 Bonus', 'title': '$0.5 Reward + $3.75 Bonus for Completing 20min Survey', # 'description': 'Play decision-making game in 15-minute research study. Earn $1 reward and bonus of of up to $6.', 'description': 'Please no mobile phones! Survey crashes. Please refrain from using Firefox browser – Chrome, Safari, Edge, and Internet Explorer work best.', 'frame_height': 500, 'template': 'global/mturk_template.html', 'minutes_allotted_per_assignment': 60, 'expiration_hours': 3, 'qualification_requirements': [ # { # # self-generate qualification to prevent retakes # 'QualificationTypeId': "362T4FXEB3ZUVP158HA6NWXSGLMSD4", # 'Comparator': "DoesNotExist", # 'RequiredToPreview': True, # }, # { # # self-generate qualification to prevent retakes # 'QualificationTypeId': "38CFB6RWNRW5Q8LFJPLCK89WHZIVK2", # 'Comparator': "DoesNotExist", # 'RequiredToPreview': True, # }, { 'QualificationTypeId': "00000000000000000071", 'Comparator': "EqualTo", 'LocaleValues': [{'Country': "US"}], 'RequiredToPreview': True, }, # { # # Sandbox # # 'QualificationTypeId': "2ARFPLSP75KLA8M8DH1HTEQVJT3SY6", # # Production: # # 'QualificationTypeId': "3E7Z4QJ76W5ZQK2E8RMCJTY4Q2BIQ9", # # 'Comparator': "Exists", # # 'RequiredToPreview': True, # }, # percent assignments approved # { # 'QualificationTypeId': "000000000000000000L0", # 'Comparator': "GreaterThanOrEqualTo", # 'IntegerValues': [95], # 'RequiredToPreview': True, # }, # # worker is adult # { # 'QualificationTypeId': "00000000000000000060", # 'Comparator': "EqualTo", # 'IntegerValues': [1], # 'RequiredToPreview': True, # }, # # number of hits approved # { # 'QualificationTypeId': "00000000000000000040", # 'Comparator': "GreaterThanOrEqualTo", # 'IntegerValues': [500], # 'RequiredToPreview': True, # }, ] } # 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'] SESSION_CONFIG_DEFAULTS = { 'real_world_currency_per_point': 0.000, 'participation_fee': 10, 'round_per_game': 1, 'doc': "", 'mturk_hit_settings': mturk_hit_settings, 'use_browser_bots': False } SESSION_CONFIGS = [ # { # 'name': 'da_aa', # 'display_name': "Game Complexity(Stage 1 - AA & DA)", # 'num_demo_participants': 32, # 'question_num': 5, # 'category': 'da', # # 'cu_step_size': 5, # 'bonus_incentive': 0.5, # # 'baseline_bonus': 20, # # 'exp_duration': 40, # # 'app_sequence': [ # 'game_instructions_stage1', # 'game_stage1_twoauction' # ], # }, { 'name': 'ucsb', 'display_name': "Game Complexity (Stage 1)", 'num_demo_participants': 30, 'question_num': 5, 'category': 'da', 'cu_step_size': 5, 'bonus_incentive': 0.5, 'baseline_bonus': 20, 'exp_duration': 40, 'app_sequence': [ 'game_instructions_stage1_ucsb', 'game_stage1_ucsb' ], }, { 'name': 'payment_ucsb', 'display_name': "Payment (UCSB)", 'num_demo_participants': 30, 'app_sequence': [ 'payment_ucsb', ], }, # { # 'name': 'stage2', # 'display_name': "Game Complexity(Stage 2)", # 'num_demo_participants': 30, # 'question_num': 5, # 'category': 'aa', # # 'cu_step_size': 5, # 'bonus_incentive': 0.5, # # 'baseline_bonus': 20, # # 'exp_duration': 40, # # 'app_sequence': [ # 'game_instructions_stage2', # 'game_stage2' # ], # }, { 'name': 'stage2_nonincentivized', 'display_name': "Game Complexity(Stage 2 Non-incentivized)", 'num_demo_participants': 30, 'question_num': 5, 'category': 'aa', 'cu_step_size': 5, 'bonus_incentive': 0.5, 'baseline_bonus': 20, 'exp_duration': 40, 'app_sequence': [ 'game_instructions_stage2_nonincentivized', 'game_stage2_nonincentivized' ], }, # { # 'name': 'stage2_nonincentivized1', # 'display_name': "Game Complexity(Stage 2 Non-incentivized Intuitive)", # 'num_demo_participants': 30, # 'question_num': 5, # 'category': 'aa', # # 'cu_step_size': 5, # 'bonus_incentive': 0.5, # # 'baseline_bonus': 20, # # 'exp_duration': 40, # # 'app_sequence': [ # 'game_instructions_stage2_nonincentivized1', # 'game_stage2_nonincentivized' # ], # }, # { # 'name': 'stage2_nonincentivized2', # 'display_name': "Game Complexity(Stage 2 Non-incentivized Probability)", # 'num_demo_participants': 30, # 'question_num': 5, # 'category': 'aa', # # 'cu_step_size': 5, # 'bonus_incentive': 0.5, # # 'baseline_bonus': 20, # # 'exp_duration': 40, # # 'app_sequence': [ # 'game_instructions_stage2_nonincentivized2', # 'game_stage2_nonincentivized' # ], # }, # { # 'name': 'stage1_aa', # 'display_name': "Game Complexity(Stage 1) - AA", # 'num_demo_participants': 20, # 'question_num': 5, # 'category': 'aa', # # 'cu_step_size': 5, # 'bonus_incentive': 0.5, # # 'baseline_bonus': 20, # # 'exp_duration': 35, # # 'app_sequence': [ # 'game_instructions_stage1', # 'game_stage1' # ], # }, # { # 'name': 'stage1_fp', # 'display_name': "Game Complexity(Stage 1) - FPA", # 'num_demo_participants': 20, # 'question_num': 5, # 'category': 'fp', # # 'cu_step_size': 5, # 'bonus_incentive': 0.5, # # 'baseline_bonus': 20, # # 'exp_duration': 35, # # 'app_sequence': [ # 'game_instructions_stage1', # 'game_stage1' # ], # }, # { # 'name': 'game', # 'display_name': "Pilot Design", # 'num_demo_participants': 2, # 'question_num': 5, # # 'cu_step_size': 5, # 'bonus_incentive': 0.5, # # 'baseline_bonus': 20, # # 'exp_duration': 60, # # 'app_sequence': [ # 'game_instructions', # 'game' # ], # }, # { # 'name': 'stage1_naturalistic_fp', # 'display_name': "Game Complexity(Stage 1) - Naturalistic - FP", # 'num_demo_participants': 20, # 'question_num': 5, # 'category': 'fp', # # 'cu_step_size': 5, # 'bonus_incentive': 0.5, # # 'baseline_bonus': 20, # # 'exp_duration': 50, # # 'app_sequence': [ # 'game_instructions_stage1', # 'game_stage1_naturalistic' # ], # }, # { # 'name': 'stage1_naturalistic_aa', # 'display_name': "Game Complexity(Stage 1) - Naturalistic - AA", # 'num_demo_participants': 20, # 'question_num': 5, # 'category': 'aa', # # 'cu_step_size': 5, # 'bonus_incentive': 0.5, # # 'baseline_bonus': 20, # # 'exp_duration': 50, # # 'app_sequence': [ # 'game_instructions_stage1', # 'game_stage1_naturalistic' # ], # } ] ROOM_DEFAULTS = {} ROOMS = [ { 'name': 'HamburgLab', 'display_name': 'HamburgLab', 'participant_label_file': 'Labor_HH.txt', }, ] # anything you put after the below line will override # oTree's default settings. Use with caution. otree.settings.augment_settings(globals()) # old settings # { # 'name': 'belief_formation', # 'display_name': "Belief formation", # 'num_demo_participants': 4, # 'prize': 10, # 'endowment': 3, # 'machine_probability': 90, # 'every_xth_person_paid': 20, # 'prob_belief_paid_out': 1, # 'max_duration': 45, # 'exp_duration': 25, # 'app_sequence': [ # 'balls_urns', # 'base_rate_neglect', # 'sampling_beliefs', # 'beliefs_goodbye' # ], # }, # { # 'name': 'brn', # 'display_name': "BRN", # 'num_demo_participants': 4, # 'prize': 10, # 'endowment': 3, # 'machine_probability': 90, # 'every_xth_person_paid': 20, # 'prob_belief_paid_out': 1, # 'max_duration': 40, # 'exp_duration': 25, # 'app_sequence': [ # 'base_rate_neglect', # ], # }, # { # 'name': 'sampling_beliefs', # 'display_name': "Sampling beliefs", # 'num_demo_participants': 4, # 'prize': 10, # 'endowment': 3, # 'machine_probability': 90, # 'every_xth_person_paid': 20, # 'prob_belief_paid_out': 1, # 'max_duration': 40, # 'exp_duration': 25, # 'app_sequence': [ # 'sampling_beliefs', # ], # }, # { # 'name': 'vignettes', # 'display_name': "Vignettes", # 'num_demo_participants': 15, # 'belief_incentive': 10, # 'incentive_penalty_divisor': 100, # 'every_xth_person_paid': 20, # 'prob_belief_paid_out': 0.9, # 'max_duration': 30, # 'exp_duration': 20, # 'app_sequence': [ # # 'MTURK_welcome', # # 'bars_MTURK_belief_elicitation', # # 'bars_MTURK_mult_price_list', # 'intertemporal', # # 'MTURK_payoff_and_goodbye' # ], # }, # { # 'name': 'number_mapping', # 'display_name': "Number mapping", # 'num_demo_participants': 15, # 'belief_incentive': 10, # 'incentive_penalty_divisor': 100, # 'every_xth_person_paid': 20, # 'prob_belief_paid_out': 0.9, # 'max_duration': 30, # 'exp_duration': 20, # 'app_sequence': [ # 'number_mapping' # ], # }, # { # 'name': 'price_list', # 'display_name': "Part 1: Price Lists (only for testing)", # 'num_demo_participants': 4, # 'every_xth_person_paid': 30, # 'prob_belief_paid_out': 0.8, # 'memory_payoff': 0.5, # 'belief_incentive': 10, # 'max_duration': 45, # 'exp_duration': 25, # 'incentive_penalty_divisor': 100, # 'app_sequence': [ # 'mult_price_list', # ], # }, # { # 'name': 'belief', # 'display_name': "Part 2: Belief elicitation (only for testing)", # 'num_demo_participants': 4, # 'memory_payoff': 0.5, # 'belief_incentive': 10, # 'incentive_penalty_divisor': 100, # 'app_sequence': [ # 'belief_elicitation', # ], # }, # { # 'name': 'binary_choice', # 'display_name': "Binary choice ", # 'num_demo_participants': 4, # 'memory_payoff': 0.5, # 'belief_incentive': 10, # 'incentive_penalty_divisor': 1000, # 'every_xth_person_paid': 20, # 'app_sequence': [ # 'binary_choice', # ], # }, # # # { # 'name': 'payoff', # 'display_name': "Payoff and Goodbye", # 'num_demo_participants': 4, # 'every_xth_person_paid': 30, # 'prob_belief_paid_out': 0.8, # 'memory_payoff': 0.5, # 'belief_incentive': 10, # 'incentive_penalty_divisor': 100, # 'app_sequence': [ # 'payoff_and_goodbye', # ], # }, # { # 'name': 'redirect_external_url', # 'display_name': "Tester: Redirect to external_url", # 'num_demo_participants': 4, # 'memory_payoff': 0.5, # 'app_sequence': [ # 'direct_external_url', # ], # }, # { # 'name': 'optimization', # 'display_name': "Optimization Games April 13", # 'num_demo_participants': 4, # 'endowment': 3, # 'every_xth_person_paid': 10, # 'raven_incentive': 0.2, # 'max_duration': 40, # 'exp_duration': 15, # 'app_sequence': [ # 'optimization_games', # 'risk_uncertainty_goodbye' # ], # }, # { # 'name': 'part_1_uncertainty_risk', # 'display_name': "Part 1: Uncertainty risk", # 'num_demo_participants': 4, # 'max_duration': 40, # 'reward_part2': 3, # 'exp_duration': 20, # 'app_sequence': [ # 'part1_uncertainty_risk', # ], # }, ######################## # Belief elicitation ######################## # { # 'name': 'complexity_and_choice', # 'display_name': "Full main experiment", # 'num_demo_participants': 4, # 'memory_payoff': 0.5, # 'belief_incentive': 10, # 'incentive_penalty_divisor': 100, # 'every_xth_person_paid': 30, # 'prob_belief_paid_out': 0.8, # 'max_duration': 45, # 'exp_duration': 25, # 'app_sequence': [ # 'mult_price_list', # # 'binary_choice', # # 'load', # 'belief_elicitation', # 'payoff_and_goodbye' # ], # }, # { # 'name': 'mturk_with_time_limit', # 'display_name': "MTurk with time limits", # 'num_demo_participants': 4, # 'belief_incentive': 10, # 'incentive_penalty_divisor': 100, # 'every_xth_person_paid': 20, # 'prob_belief_paid_out': 0.9, # 'max_duration': 30, # 'exp_duration': 20, # 'timeout_choice': 20, # 'timeout_belief': 20, # 'app_sequence': [ # 'MTURK_welcome', # 'MTURK_belief_elicitation', # 'MTURK_mult_price_list', # 'MTURK_payoff_and_goodbye' # ], # }, # { # 'name': 'mturk_with_bars', # 'display_name': "MTurk with bars", # 'num_demo_participants': 4, # 'belief_incentive': 10, # 'incentive_penalty_divisor': 100, # 'every_xth_person_paid': 20, # 'prob_belief_paid_out': 0.9, # 'max_duration': 40, # 'exp_duration': 30, # 'app_sequence': [ # 'MTURK_welcome', # # 'bars_MTURK_belief_elicitation', # 'bars_MTURK_mult_price_list', # 'intertemporal', # 'number_mapping', # 'MTURK_payoff_and_goodbye' # ], # }, # { # 'name': 'mental_compression', # 'display_name': "Mental compression", # 'num_demo_participants': 30, # 'belief_incentive': 10, # 'belief_penalty': 3, # 'incentive_dots': 1, # 'incentive_day_year': 1, # 'every_xth_person_paid': 20, # 'max_duration': 40, # 'exp_duration': 30, # 'app_sequence': [ # # 'MTURK_welcome', # 'risky_choice', # # 'intertemporal_choice', # # 'framing', # # 'number_mapping_dotcloud', # # 'number_mapping_day_year', # # 'MTURK_payoff_and_goodbye', # ], # }, # { # 'name': 'risk_part_compression', # 'display_name': "Mental compression: Risk", # 'num_demo_participants': 30, # 'belief_incentive': 10, # 'belief_penalty': 3, # 'incentive_dots': 1, # 'incentive_day_year': 1, # 'every_xth_person_paid': 20, # 'max_duration': 30, # 'exp_duration': 15, # 'app_sequence': [ # 'MTURK_welcome', # 'split_dot_fraction', # 'risk_framing_both_conditions', # 'split_dot_fraction1', # 'real_effort_tax', # 'split_dot_fraction2', # 'risky_choice', # 'split_dot_fraction3', # 'risky_choice20', # 'dots_multiplication', # 'beliefs_goodbye' # ], # }, # { # 'name': 'time_part_compression', # 'display_name': "Mental compression: Time", # 'num_demo_participants': 30, # 'belief_incentive': 10, # 'belief_penalty': 3, # 'incentive_dots': 1, # 'incentive_day_year': 1, # 'every_xth_person_paid': 20, # 'max_duration': 30, # 'exp_duration': 15, # 'app_sequence': [ # 'MTURK_welcome', # 'split_dot_multiplication', # 'time_framing_both_conditions', # 'split_dot_multiplication1', # 'intertemporal_choice', # 'split_dot_multiplication2', # 'number_mapping_day_year', # 'beliefs_goodbye', # ], # }, # { # 'name': 'framign', # 'display_name': "Framing tasks", # 'num_demo_participants': 4, # 'belief_incentive': 10, # 'belief_penalty': 3, # 'incentive_dots': 1, # 'incentive_day_year': 1, # 'every_xth_person_paid': 20, # 'max_duration': 40, # 'exp_duration': 30, # 'app_sequence': [ # # 'MTURK_welcome', # # 'risky_choice', # # 'intertemporal_choice', # 'framing', # # 'number_mapping_dotcloud', # # 'number_mapping_day_year', # # 'MTURK_payoff_and_goodbye', # ], # }, # { # 'name': 'no_beliefs', # 'display_name': "No beliefs", # 'num_demo_participants': 4, # 'belief_incentive': 10, # 'incentive_penalty_divisor': 100, # 'every_xth_person_paid': 20, # 'prob_belief_paid_out': 1, # 'max_duration': 40, # 'exp_duration': 20, # 'app_sequence': [ # 'intertemporal', # 'number_mapping_dotcloud', # 'number_mapping_day_year', # ], # },