from otree.api import Currency as c from . import pages from ._builtin import Bot from .models import Constants class PlayerBot(Bot): def play_round(self): yield pages.ConsentPage, dict(consentWant=True) yield pages.IntroductionPage, dict(sonaId="12345", huskyId="43534534534") yield pages.OverviewPage yield pages.InstructionPage if self.player.is_advisor(): yield pages.AdvPaymentSchemePage, dict( manip_adv_adviser_payment_question=False, manip_adv_estimator_payment_question=True, ) if self.player.is_advisor(): if self.player.disclosure: yield pages.DisclosureInfoPage, dict(manip_adv_payment_scheme_disclosed=True) else: yield pages.DisclosureInfoPage, dict(manip_adv_payment_scheme_not_disclosed=True) if self.player.is_advisor(): yield pages.AdvAdvicePage, dict(recommendation=900) if self.player.is_estimator(): yield pages.EstPaymentSchemePage, dict( manip_est_estimator_payment_question=True, ) if self.player.is_estimator(): yield pages.EstEstimatePage, dict(estimate=900) if self.player.is_estimator(): yield pages.EstRevealPreamblePage if self.player.is_estimator(): yield pages.EstRevealPage if self.player.is_estimator(): yield pages.EstAppealPage, dict(appealed=True) if self.player.is_estimator(): yield pages.EstPostAppealPage if self.player.is_judge(): yield pages.JudgeExamplePage, dict( manip_judge_est_payment_question=True, manip_judge_adv_payment_question=False, ) if self.player.is_judge(): yield pages.JudgeCaseAndJudgement, dict( manip_judge_disclosed_case_question=True, manip_judge_est_case_question=True, manip_judge_adv_case_question=False, ) if self.player.is_judge(): yield pages.JudgeJudgement if self.player.is_judge(): yield pages.JudgeJudgementSummary, dict(appeal_granted=True) if not self.player.is_advisor(): if self.player.is_estimator(): yield pages.BlamePage, dict(blame_EST_I_blame_myself_for_my_guess=4, blame_EST_I_blame_the_adviser_for_my_guess=4, blame_EST_I_have_a_legitimate_grievance_against_the_adviser=4, blame_EST_I_have_a_strong_case_if_I_choose_to_pursue_an_appeal=4, blame_EST_I_believe_that_others_would_rule_in_my_favor=4, blame_EST_The_adviser_treated_me_fairly=4, blame_EST_I_was_mistreated_by_the_adviser=4, blame_EST_I_deserve_to_receive_the_full_bonus=4) else: yield pages.BlamePage, dict(blame_JUDGE_I_blame_the_estimator_for_their_guess=4, blame_JUDGE_I_blame_the_adviser_for_the_estimators_guess=4, blame_JUDGE_estimator_has_legitimate_grievance_against_adviser=4, blame_JUDGE_estimator_has_a_strong_case_to_pursue_an_appeal=4, blame_JUDGE_I_believe_others_would_rule_in_estimators_favor=4, blame_JUDGE_The_adviser_treated_the_estimator_fairly=4, blame_JUDGE_The_estimator_was_mistreated_by_the_adviser=4, blame_JUDGE_The_estimator_deserves_to_receive_the_full_bonus=4) yield pages.PostQuestionsPage, dict( manip_final_adviser_payment_question=True, manip_final_estimator_payment_question=False, manip_final_conflict_disclosed_or_not=True, ) if not self.player.is_advisor(): yield pages.ClarificationQuestionsPage, dict(appeal_question_clarify="xyz") yield pages.Demographics1 yield pages.Demographics2, dict(gender="Female", age=100, race="White") yield pages.Comments, dict(comment="xyz") yield pages.FinishPage