from os import environ import random as rand left_range = -10 right_range= 10 # 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': 1.00, 'participation_fee': 0.00, 'doc': "", } SESSION_CONFIGS = [ { 'name': 'predpolgame', 'display_name': "Educational Game about Predictive Policing", 'num_demo_participants': 2, 'app_sequence': ['predpolgame', 'payment_info'], 'num_repetitions': 5, 'timeout_for_instructions': 3600, 'timeout_for_decisions': 3600, 'timeout_for_intermediate_results': 3600, 'chat': 'no', 'pdf_link_text': ' ', 'pdf_link_color': '#0067a3', # 'num_strategies_A': 1, # 'num_strategies_B': 1, 'game_name': "this Game about Predictive Policing", 'P1_strategy_1': "Share data", 'P1_strategy_2': "Do not share data", #'P1_strategy_3': "Strategy P1_3", 'P2_strategy_1': "Do not use data", 'P2_strategy_2': "Use data", 'Custom Random Payoffs' : 'False', 'Distribution': 'False', 'Center of distribution': 0.0, 'Width of distribution': 0.0, 'P1_payoff_P1S1_P2S1': 0, 'P1_payoff_P1S1_P2S2': 0, 'P1_payoff_P1S2_P2S1': 0, 'P1_payoff_P1S2_P2S2': -1, # 'P1_payoff_P1S3_P2S1': 0, # 'P1_payoff_P1S3_P2S2': 2, # 'P1_payoff_P1S3_P2S3': 2, 'P2_payoff_P2S1_P1S1': 0, 'P2_payoff_P2S1_P1S2': -1, # 'P2_payoff_P2S1_P1S3': 8, 'P2_payoff_P2S2_P1S1': 1, 'P2_payoff_P2S2_P1S2': -1, # 'P2_payoff_P2S2_P1S3': 2, 'text1': """ Your payoffs will be determined by the choices of both as below: """, 'text2': """ Your payoffs will be determined by the choices of both as below: """, 'doc': """ """ }, ] # see the end of this file for the inactive session configs # 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 #the room file contains the list of allowed players ROOMS = [ { 'name': 'Predpol_Game_Room_1', 'display_name': 'Predpol Game Showcase Session: Room 1', }, { 'name': 'Predpol_Game_Room_2', 'display_name': 'Predpol Game Showcase Session: Room 2', }, { 'name': 'Predpol_Game_Room_3', 'display_name': 'Predpol Game Showcase Session: Room 3', }, { 'name': 'Predpol_Game_Room_4', 'display_name': 'Predpol Game Showcase Session: Room 4', }, { 'name': 'Predpol_Game_Room_5', 'display_name': 'Predpol Game Showcase Session: Room 5', }, { 'name': 'Predpol_Game_Room_6', 'display_name': 'Predpol Game Showcase Session: Room 6', }, { 'name': 'Predpol_Game_Room_7', 'display_name': 'Predpol Game Showcase Session: Room 7', }, { 'name': 'Predpol_Game_Room_8', 'display_name': 'Predpol Game Showcase Session: Room 8', }, { 'name': 'Predpol_Game_Room_9', 'display_name': 'Predpol Game Showcase Session: Room 9', }, { 'name': 'Predpol_Game_Room_10', 'display_name': 'Predpol Game Showcase Session: Room 10', }, ] DEMO_PAGE_INTRO_HTML = """ This game environment was developed as part of a student's project in the module "AI Technology and Law" from Prof. Dr. Abrahm Bernstein, at the University of Zurich. For this purpose, we used the openly accessible gaming environment oTree as well as the openly accessible, parameterized template, developed at the Zurich University of Applied Sciences (ZHAW) as part of the project about "Gamification in Economics", which is available under the following Github Repository: https://github.com/gavagnin/EconGames_ZHAW The games in the template were designed for any multiple-of-2 number of players on the basis of Normal Form Games, equipped with different number of strategies. The games' parameters can be configured from the admin user in the "Configure Session" menu in the Tab Sessions or Rooms. """ ADMIN_USERNAME = 'admin' # for security, best to set admin password in an environment variable ADMIN_PASSWORD = 'Gamification' # don't share this with anybody. SECRET_KEY = 'll#f#r^h2^$mo-#a-gebpq_4a197%fymf4&0&f^hzd1lmvdiam' # if an app is included in SESSION_CONFIGS, you don't need to list it here INSTALLED_APPS = ['otree']