-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.py
138 lines (125 loc) · 4.13 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
from os import environ
# Note: session config is not as flexible as it seems.
# The production function must be of length 2 and 3.
# 3 assumes that P1 is the big player and P2 and P3 are the small players.
# 2 assumes that P1 and P2 symmetric P3 is a dummy player.
common_doc = """
A live bargaining experiment with three-player groups.
Players are randomly assigned asymmetric (big player and small player) roles, and must negotiate to form coalitions.
The treatments differ in the characteristic/production function.
"""
SESSION_CONFIGS = [
dict(
name="treatment_y_10",
display_name="Treatment: Y=10",
app_sequence=["introduction", "sliders", "live_bargaining", "survey"],
num_demo_participants=3,
seconds_per_round=5 * 60,
seconds_for_sliders=4 * 60,
prod_fct={
"B1+B2": 0,
"A+B1<br>A+B2": 10,
"A+B1+B2": 100,
},
player_names={
"P1": "A",
"P2": "B1",
"P3": "B2",
},
doc=common_doc + "This is the treatment with production function [0, 10, 100].",
),
dict(
name="treatment_y_30",
display_name="Treatment: Y=30",
app_sequence=["introduction", "sliders", "live_bargaining", "survey"],
num_demo_participants=3,
seconds_per_round=5 * 60,
seconds_for_sliders=4 * 60,
prod_fct={
"B1+B2": 0,
"A+B1<br>A+B2": 30,
"A+B1+B2": 100,
},
player_names={
"P1": "A",
"P2": "B1",
"P3": "B2",
},
doc=common_doc + "This is the treatment with production function [0, 30, 100].",
),
dict(
name="treatment_y_90",
display_name="Treatment: Y=90",
app_sequence=["introduction", "sliders", "live_bargaining", "survey"],
num_demo_participants=3,
seconds_per_round=5 * 60,
seconds_for_sliders=4 * 60,
prod_fct={
"B1+B2": 0,
"A+B1<br>A+B2": 90,
"A+B1+B2": 100,
},
player_names={
"P1": "A",
"P2": "B1",
"P3": "B2",
},
doc=common_doc + "This is the treatment with production function [0, 90, 100].",
),
dict(
name="treatment_dummy_player",
display_name="Treatment: Dummy Player",
app_sequence=["introduction", "sliders", "live_bargaining", "survey"],
num_demo_participants=3,
seconds_per_round=5 * 60,
seconds_for_sliders=4 * 60,
prod_fct={
"A1+B<br>A2+B": 0,
"A1+A2<br>A1+A2+B": 100,
},
player_names={
"P1": "A1",
"P2": "A2",
"P3": "B",
},
doc=common_doc
+ "This is the treatment with production function [0, 100] and P3 as a dummy player.",
),
]
# 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 = dict(
real_world_currency_per_point=0.12, participation_fee=10.00, doc=""
)
PARTICIPANT_FIELDS = ["final_payoff", "payoff_list", "task_score"]
SESSION_FIELDS = ["params"]
# ISO-639 code
# for example: de, fr, ja, ko, zh-hans
LANGUAGE_CODE = "en"
# e.g. EUR, GBP, CNY, JPY
REAL_WORLD_CURRENCY_CODE = "CHF"
USE_POINTS = True
ADMIN_USERNAME = "admin"
# for security, best to set admin password in an environment variable
ADMIN_PASSWORD = environ.get("OTREE_ADMIN_PASSWORD")
DEMO_PAGE_INTRO_HTML = """
<b>Welcome to the live bargaining experiment!</b>
Please choose one of the treatments on the left to start a demo session.
"""
SECRET_KEY = "5644004254536"
ROOMS = [
dict(
name="blu",
display_name="BLU Econ Lab (secure URLs)",
participant_label_file="_rooms/blu.txt",
use_secure_urls=True,
),
dict(
name="blu_ns",
display_name="BLU Econ Lab (non-secure URLs)",
participant_label_file="_rooms/blu.txt",
use_secure_urls=False,
),
]