from otree.api import Currency as c, currency_range from . import pages from ._builtin import Bot from .models import Constants class PlayerBot(Bot): def play_round(self): if self.player.participant.vars['treatment'] == 'treatment' and self.round_number <= self.session.vars['N_rounds']: yield (pages.Treatment, {'belief_1': 10, 'belief_2': 20, 'choice': 'Portfolio_1'}) if self.player.participant.vars['treatment'] == 'control' and self.round_number <= self.session.vars['N_rounds']: yield (pages.Control, {'belief_1': 15, 'belief_2': 25}) if self.round_number == self.session.vars['N_rounds']: yield pages.End