from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) author = 'Patrick Drazil' doc = """ Multi armed bandit - dynamic environment" """ class Constants(BaseConstants): name_in_url = 'multi_armed_bandit_dynamic' players_per_group = None num_rounds = 100 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): decision = models.StringField( choices=[['Arm_A', 'Arm_A'], ['Arm_B', 'Arm_B'], ['Arm_C', 'Arm_C'], ['Arm_D', 'Arm_D'], ['Arm_E', 'Arm_E']], doc="""This player's decision""", widget=widgets.RadioSelect, ) beliefs = models.StringField( choices=[['Very weak - 1', 'Very weak - 1'], ['Weak - 2', 'Weak - 2'], ['Mediocre - 3', 'Mediocre - 3'], ['Strong - 4', 'Strong - 4'],['Very strong - 5', 'Very strong - 5']], label="How strong are your believes about picking the best arm", widget=widgets.RadioSelect, ) age = models.IntegerField(label='What is your age?', min=13, max=125) gender = models.StringField( choices=[['Male', 'Male'], ['Female', 'Female']], label='What is your gender?', widget=widgets.RadioSelect, )