from otree.api import Bot from . import C, Introduction, Guess, Results class PlayerBot(Bot): def play_round(self): if self.round_number == 1: yield Introduction # Stay inside allowed bounds [0, 100] and vary guesses by player/round. guess_value = (self.player.id_in_group * 17 + self.round_number * 11) % (C.GUESS_MAX + 1) yield Guess, {'guess': guess_value} yield Results