from otree.api import Currency as c, currency_range, SubmissionMustFail, Submission, expect from . import pages from ._builtin import Bot from .models import Constants class PlayerBot(Bot): def play_round(self): if self.round_number == 1: if self.player.id_in_subsession != 9: yield pages.Type_WillBeAssigned yield pages.Type_Assign yield pages.BeliefsWillStart yield pages.BeliefsInstructions yield pages.Beliefs, dict(beliefs_HH=10, beliefs_HL=20, beliefs_LH=25, beliefs_LL=0) yield pages.Beliefs_Pref, dict(beliefs_preference="HH,HL,LH,LL") yield pages.PGGInstructions yield pages.FirstRoundWillStart if self.round_number != 16: yield pages.Partner_Matched, dict(preference="HH,HL,LH,LL") yield pages.Partner_Assigned yield pages.Contribute, dict(contribution=25) yield pages.Results if self.round_number == 16: if self.player.type == "HH": yield pages.Partner_Matched, dict(preference="LL,HL,LH,HH") if self.player.type == "HL": yield pages.Partner_Matched, dict(preference="LH,HH,HL,LL") if self.player.type == "LH": yield pages.Partner_Matched, dict(preference="HL,LL,LH,HH") if self.player.type == "LL": yield pages.Partner_Matched, dict(preference="HH,HL,LH,LL") yield pages.Partner_Assigned yield pages.Contribute, dict(contribution=10) yield pages.Results yield pages.Attention_Check_2_Page, dict(Attention_Check_2=20)