from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) doc = 'Description condition decisions' class Constants(BaseConstants): name_in_url = 'description_condition' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): winning = models.CurrencyField() def theonlymethod(self): group = self.group players = group.get_players() for p in players: p.payoff = p.decision class Player(BasePlayer): problem2 = models.IntegerField(choices=[[0, 'A: Win 4 with probability 0.2, win 0 otherwise'], [1, 'B: Win 3 with probability 0.25, win 0 otherwise']], label='Choose:', widget=widgets.RadioSelect) problem3 = models.IntegerField(choices=[[0, 'A: Lose 3 for sure'], [1, 'B: Lose 32 with probability 0.1, lose nothing otherwise']], label='Choose:', widget=widgets.RadioSelect) problem4 = models.IntegerField(choices=[[0, 'A: Lose 3 for sure'], [1, 'B: Lose 4 with probability 0.8, lose nothing otherwise']], label='Choose:', widget=widgets.RadioSelect) problem5 = models.IntegerField(choices=[[0, 'A: Win 32 with probability 0.1, win 0 otherwise'], [1, 'B: Win 3 for sure']], label='Choose:', widget=widgets.RadioSelect) problem6 = models.IntegerField(choices=[[0, 'A: Win 32 with probability 0.025, win 0 otherwise'], [1, 'B: Win 3 with probability 0.25, win 0 otherwise']], label='Choose: ', widget=widgets.RadioSelect) problem1 = models.IntegerField(choices=[[0, 'A: Win 4 with probability 0.8 and 0 otherwise'], [1, 'B: Win 3 for sure']], label='Choose:', widget=widgets.RadioSelect)