from otree.api import * doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'allpay_MM' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): bid = models.IntegerField( label="你的出价是:", max=150, min=0, ) test1 = models.StringField( label="1.假设你出价80 token并获胜,你的最终奖励是多少?", choices=["70 token", "150 token", "100 token", "170 token"] ) test2 = models.StringField( label="2.假设你出价60 token但未能获胜,你的最终奖励是多少?", choices=["40 token", "60 token", "90 token", "150 token"] ) test3 = models.StringField( label="3.假设你和对手都出价100 token,你的最终奖励是多少?", choices=["50%概率得到150 token,50%概率得到50 token", "50%概率得到100 token,50%概率得到0 token", "150 token", "50 token"] ) test4 = models.StringField( label="4.假设你出价150 token并获胜,你的最终奖励是多少?", choices=["0 token", "150 token", "100 token", "80 token"] ) test5 = models.StringField( label="5.假设你和对手都出价150 token,你的最终奖励是多少?", choices=["50%概率得到250 token,50%概率得到100 token", "50%概率得到100 token,50%概率得到0 token", "0 token", "100 token"] ) gamble = models.StringField( label="现在,请选择你想参与的博彩游戏序号", choices=["1", "2", "3", "4", "5"] ) prediction = models.StringField( label="现在,请预测对手选择的博彩游戏序号", choices=["1", "2", "3", "4", "5"] ) # PAGES class Introduction_all(Page): pass class Intro_bid(Page): pass class Test(Page): form_model = "player" form_fields = ["test1", "test2", "test3", "test4", "test5"] class BidAmount(Page): form_model = "player" form_fields = ["bid"] class Selection(Page): form_model = "player" form_fields = ["gamble"] class Prediction(Page): form_model = "player" form_fields = ["prediction"] page_sequence = [Introduction_all, Intro_bid, Test, BidAmount]