from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants import random import datetime, json, time import math import numpy as np def choices(): choice00000 = (60, 15, 20, 30) return choice00000 # remove 45 seconds, keep 15, 20, 30, 60 def budget(): budget00000 = (10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20) return budget00000 def question(): question_choice = 33 #question_choice = random.randint(1, 34) return question_choice class instruction_choice(Page): form_model = 'player' form_fields = ['baseline'] def is_displayed(self): return self.round_number == 1 def vars_for_template(self): self.player.baseline = question() self.participant.vars['baseline'] = self.player.baseline return dict( baseline = self.participant.vars['baseline'] ) def js_vars(self): return { 'baseline': self.participant.vars['baseline'] } class survey1(Page): form_model = 'player' form_fields = ['choice1', 'choice2', 'choice3', 'choice4', 'choice5', 'choice6', 'choice7', 'choice8', 'choice9', 'choice10', 'choice11'] def is_displayed(self): return self.round_number == 1 class survey2(Page): form_model = 'player' form_fields = ['choice12', 'choice13', 'choice14', 'choice15', 'choice16', 'choice17', 'choice18', 'choice19', 'choice20', 'choice21', 'choice22'] def is_displayed(self): return self.round_number == 1 class survey3(Page): form_model = 'player' form_fields = ['choice23', 'choice24', 'choice25', 'choice26', 'choice27', 'choice28', 'choice29', 'choice30', 'choice31', 'choice32', 'choice33'] def is_displayed(self): return self.round_number == 1 class survey4(Page): form_model = 'player' form_fields = ['choice34'] def is_displayed(self): return self.round_number == 1 class questionchosen(Page): form_model = 'player' def is_displayed(self): return self.round_number == 1 def vars_for_template(self): return dict( question_chosen=self.participant.vars['baseline'], choose1=self.player.get_choice1_display(), choose2=self.player.get_choice2_display(), choose3=self.player.get_choice3_display(), choose4=self.player.get_choice4_display(), choose5=self.player.get_choice5_display(), choose6=self.player.get_choice6_display(), choose7=self.player.get_choice7_display(), choose8=self.player.get_choice8_display(), choose9=self.player.get_choice9_display(), choose10=self.player.get_choice10_display(), choose11=self.player.get_choice11_display(), choose12=self.player.get_choice12_display(), choose13=self.player.get_choice13_display(), choose14=self.player.get_choice14_display(), choose15=self.player.get_choice15_display(), choose16=self.player.get_choice16_display(), choose17=self.player.get_choice17_display(), choose18=self.player.get_choice18_display(), choose19=self.player.get_choice19_display(), choose20=self.player.get_choice20_display(), choose21=self.player.get_choice21_display(), choose22=self.player.get_choice22_display(), choose23=self.player.get_choice23_display(), choose24=self.player.get_choice24_display(), choose25=self.player.get_choice25_display(), choose26=self.player.get_choice26_display(), choose27=self.player.get_choice27_display(), choose28=self.player.get_choice28_display(), choose29=self.player.get_choice29_display(), choose30=self.player.get_choice30_display(), choose31=self.player.get_choice31_display(), choose32=self.player.get_choice32_display(), choose33=self.player.get_choice33_display(), choose34=self.player.get_choice34_display(), ) def js_vars(self): return { 'question_chosen': self.participant.vars['baseline'], } def before_next_page(self): if self.participant.vars['baseline'] == 1: if self.player.get_choice1_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice1_display() == str( choices()[1]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[1] self.participant.vars['budget'] = budget()[0] if self.participant.vars['baseline'] == 2: if self.player.get_choice2_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice2_display() == str( choices()[1]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[1]): self.participant.vars['time_limit'] = choices()[1] self.participant.vars['budget'] = budget()[1] if self.participant.vars['baseline'] == 3: if self.player.get_choice3_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice3_display() == str( choices()[1]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[2]): self.participant.vars['time_limit'] = choices()[1] self.participant.vars['budget'] = budget()[2] if self.participant.vars['baseline'] == 4: if self.player.get_choice4_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice4_display() == str( choices()[1]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[3]): self.participant.vars['time_limit'] = choices()[1] self.participant.vars['budget'] = budget()[3] if self.participant.vars['baseline'] == 5: if self.player.get_choice5_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice5_display() == str( choices()[1]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[4]): self.participant.vars['time_limit'] = choices()[1] self.participant.vars['budget'] = budget()[4] if self.participant.vars['baseline'] == 6: if self.player.get_choice6_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice6_display() == str( choices()[1]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[5]): self.participant.vars['time_limit'] = choices()[1] self.participant.vars['budget'] = budget()[5] if self.participant.vars['baseline'] == 7: if self.player.get_choice7_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice7_display() == str( choices()[1]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[6]): self.participant.vars['time_limit'] = choices()[1] self.participant.vars['budget'] = budget()[6] if self.participant.vars['baseline'] == 8: if self.player.get_choice8_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice8_display() == str( choices()[1]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[7]): self.participant.vars['time_limit'] = choices()[1] self.participant.vars['budget'] = budget()[7] if self.participant.vars['baseline'] == 9: if self.player.get_choice9_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice9_display() == str( choices()[1]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[8]): self.participant.vars['time_limit'] = choices()[1] self.participant.vars['budget'] = budget()[8] if self.participant.vars['baseline'] == 10: if self.player.get_choice10_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice10_display() == str( choices()[1]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[9]): self.participant.vars['time_limit'] = choices()[1] self.participant.vars['budget'] = budget()[9] if self.participant.vars['baseline'] == 11: if self.player.get_choice11_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice11_display() == str( choices()[1]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[10]): self.participant.vars['time_limit'] = choices()[1] self.participant.vars['budget'] = budget()[10] if self.participant.vars['baseline'] == 12: if self.player.get_choice12_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice12_display() == str( choices()[2]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[2] self.participant.vars['budget'] = budget()[0] if self.participant.vars['baseline'] == 13: if self.player.get_choice13_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice13_display() == str( choices()[2]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[1]): self.participant.vars['time_limit'] = choices()[2] self.participant.vars['budget'] = budget()[1] if self.participant.vars['baseline'] == 14: if self.player.get_choice14_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice14_display() == str( choices()[2]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[2]): self.participant.vars['time_limit'] = choices()[2] self.participant.vars['budget'] = budget()[2] if self.participant.vars['baseline'] == 15: if self.player.get_choice15_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice15_display() == str( choices()[2]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[3]): self.participant.vars['time_limit'] = choices()[2] self.participant.vars['budget'] = budget()[3] if self.participant.vars['baseline'] == 16: if self.player.get_choice16_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice16_display() == str( choices()[2]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[4]): self.participant.vars['time_limit'] = choices()[2] self.participant.vars['budget'] = budget()[4] if self.participant.vars['baseline'] == 17: if self.player.get_choice17_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice17_display() == str( choices()[2]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[5]): self.participant.vars['time_limit'] = choices()[2] self.participant.vars['budget'] = budget()[5] if self.participant.vars['baseline'] == 18: if self.player.get_choice18_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice18_display() == str( choices()[2]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[6]): self.participant.vars['time_limit'] = choices()[2] self.participant.vars['budget'] = budget()[6] if self.participant.vars['baseline'] == 19: if self.player.get_choice19_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice19_display() == str( choices()[2]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[7]): self.participant.vars['time_limit'] = choices()[2] self.participant.vars['budget'] = budget()[7] if self.participant.vars['baseline'] == 20: if self.player.get_choice20_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice20_display() == str( choices()[2]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[8]): self.participant.vars['time_limit'] = choices()[2] self.participant.vars['budget'] = budget()[8] if self.participant.vars['baseline'] == 21: if self.player.get_choice21_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice21_display() == str( choices()[2]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[9]): self.participant.vars['time_limit'] = choices()[2] self.participant.vars['budget'] = budget()[9] if self.participant.vars['baseline'] == 22: if self.player.get_choice22_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice22_display() == str( choices()[2]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[10]): self.participant.vars['time_limit'] = choices()[2] self.participant.vars['budget'] = budget()[10] if self.participant.vars['baseline'] == 23: if self.player.get_choice23_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice23_display() == str( choices()[3]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[3] self.participant.vars['budget'] = budget()[0] if self.participant.vars['baseline'] == 24: if self.player.get_choice24_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice24_display() == str( choices()[3]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[1]): self.participant.vars['time_limit'] = choices()[3] self.participant.vars['budget'] = budget()[1] if self.participant.vars['baseline'] == 25: if self.player.get_choice25_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice25_display() == str( choices()[3]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[2]): self.participant.vars['time_limit'] = choices()[3] self.participant.vars['budget'] = budget()[2] if self.participant.vars['baseline'] == 26: if self.player.get_choice26_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice26_display() == str( choices()[3]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[3]): self.participant.vars['time_limit'] = choices()[3] self.participant.vars['budget'] = budget()[3] if self.participant.vars['baseline'] == 27: if self.player.get_choice27_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice27_display() == str( choices()[3]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[4]): self.participant.vars['time_limit'] = choices()[3] self.participant.vars['budget'] = budget()[4] if self.participant.vars['baseline'] == 28: if self.player.get_choice28_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice28_display() == str( choices()[3]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[5]): self.participant.vars['time_limit'] = choices()[3] self.participant.vars['budget'] = budget()[5] if self.participant.vars['baseline'] == 29: if self.player.get_choice29_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice29_display() == str( choices()[3]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[6]): self.participant.vars['time_limit'] = choices()[3] self.participant.vars['budget'] = budget()[6] if self.participant.vars['baseline'] == 30: if self.player.get_choice30_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice30_display() == str( choices()[3]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[7]): self.participant.vars['time_limit'] = choices()[3] self.participant.vars['budget'] = budget()[7] if self.participant.vars['baseline'] == 31: if self.player.get_choice31_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice31_display() == str( choices()[3]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[8]): self.participant.vars['time_limit'] = choices()[3] self.participant.vars['budget'] = budget()[8] if self.participant.vars['baseline'] == 32: if self.player.get_choice32_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice32_display() == str( choices()[3]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[9]): self.participant.vars['time_limit'] = choices()[3] self.participant.vars['budget'] = budget()[9] if self.participant.vars['baseline'] == 33: if self.player.get_choice33_display() == str( choices()[0]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[0]): self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice33_display() == str( choices()[3]) + ' seconds per game with a budget of \N{pound sign}' + str(budget()[10]): self.participant.vars['time_limit'] = choices()[3] self.participant.vars['budget'] = budget()[10] if self.participant.vars['baseline'] == 34: if self.player.get_choice34_display() == 'Compete with a time limit of ' + str(choices()[0]) + ' seconds per game against the past performance of someone who also had a time limit of ' + str(choices()[0]) + ' seconds per game': self.participant.vars['time_limit'] = choices()[0] self.participant.vars['budget'] = budget()[0] if self.player.get_choice34_display() == 'Compete with a time limit of ' + str(choices()[1]) + ' seconds per game against the past performance of someone who also had a time limit of ' + str(choices()[1]) + ' seconds per game': self.participant.vars['time_limit'] = choices()[1] self.participant.vars['budget'] = budget()[0] # Set of games: a = [[78, 46, 13, 67, 65, 25, 34, 15, 47, 62], [68, 15, 42, 29, 27, 41, 19, 23, 36, 33], [76, 51, 48, 11, 47, 15, 65, 39, 35, 63], [91, 75, 69, 44, 64, 16, 35, 62, 33, 49], [68, 16, 17, 49, 14, 22, 41, 57, 19, 21], [91, 69, 25, 17, 55, 26, 13, 75, 22, 72], [55, 21, 17, 33, 26, 9, 41, 27, 34, 23], [93, 65, 58, 32, 79, 77, 31, 71, 76, 17], [84, 41, 72, 46, 26, 48, 35, 32, 49, 28], [85, 23, 54, 72, 42, 62, 49, 58, 38, 69]] class Instructions(Page): form_model = 'player' form_fields = ['my_page_timeout_seconds', 'starting_budget'] timeout_seconds = 5 def vars_for_template(self): if self.round_number == 1: self.player.my_page_timeout_seconds = self.participant.vars['time_limit'] self.player.starting_budget = self.participant.vars['budget'] for i in range(1, 10): if self.round_number % 10 == i: self.participant.vars['game_number'] = i if self.round_number % 10 == 0: self.participant.vars['game_number'] = 10 return dict( timeout_options=self.participant.vars['time_limit'], game_number=self.participant.vars['game_number'], ) def before_next_page(self): self.participant.vars['sssss'] = time.time() def js_vars(self): return { 'timeout_options': self.participant.vars['time_limit'], } class Game1(Page): form_model = 'player' form_fields = ['correct'] def get_timeout_seconds(self): return self.player.my_page_timeout_seconds def vars_for_template(self): if self.round_number == 1: self.participant.vars['set1'] = a self.player.my_page_timeout_seconds = self.participant.vars['time_limit'] self.player.starting_budget = self.participant.vars['budget'] return dict( question_chosen=self.participant.vars['baseline'], game_number=self.participant.vars['game_number'], n=[self.participant.vars['set1'][0][h] for h in range(0, 10)], payoff1=self.participant.vars['budget'], my_page_timeout_seconds=self.participant.vars['time_limit'], ) for i in range(2, 11): if self.round_number == i: self.player.my_page_timeout_seconds = self.participant.vars['time_limit'] self.player.starting_budget = self.participant.vars['budget'] return dict( question_chosen=self.participant.vars['baseline'], game_number=self.participant.vars['game_number'], n=[self.participant.vars['set1'][i - 1][h] for h in range(0, 10)], payoff1=self.player.in_round(i - 1).payoff1, my_page_timeout_seconds=self.participant.vars['time_limit'], ) def before_next_page(self): self.player.time_spent = math.floor(time.time() - self.participant.vars['sssss']) #if self.timeout_happened: # self.player.time_spent = self.player.my_page_timeout_seconds if self.round_number == 1: self.player.payoff1 = self.participant.vars['budget'] else: self.player.payoff1 = self.player.in_round(self.round_number - 1).payoff1 if self.player.correct == 1: self.player.payoff1 = self.player.payoff1 else: self.player.payoff1 = self.player.payoff1 - 1 self.participant.vars['payoff1'] = self.player.payoff1 self.participant.vars['time_spent'] = self.player.time_spent self.participant.vars['number_correct'] = self.participant.vars['game_number'] - (10 - self.player.payoff1) def js_vars(self): for i in range(1, 11): if self.round_number == i: return { 'n': [self.participant.vars['set1'][i - 1][h] for h in range(0, 10)], 'timeout_options': self.participant.vars['time_limit'], 'question_chosen': self.participant.vars['baseline'], } class results(Page): form_model = 'player' form_fields = ['payoff1', 'time_spent'] timeout_seconds = 5 def vars_for_template(self): self.participant.vars['results'] = self.player.correct self.participant.vars['payoff1'] = self.player.payoff1 self.participant.vars['time_spent'] = self.player.time_spent self.participant.vars['number_correct'] = self.participant.vars['game_number'] - (10 - self.player.payoff1) self.participant.vars['payoff_round5'] = self.player.payoff1 for i in range(1, 11): if self.round_number == i: return dict( my_page_timeout_seconds=self.participant.vars['time_limit'], game_number=self.participant.vars['game_number'], result=self.participant.vars['results'], payoff1=self.participant.vars['payoff1'], time_spent=self.participant.vars['time_spent'], number_correct=self.participant.vars['number_correct'], question_chosen=self.participant.vars['baseline'], ) def js_vars(self): return { 'payoff1': self.participant.vars['payoff1'], 'time_spent': self.participant.vars['time_spent'], 'number_correct': self.participant.vars['number_correct'], 'question_chosen': self.participant.vars['baseline'], } page_sequence = [instruction_choice, survey1, survey2, survey3, survey4, questionchosen, Instructions, Game1, results]