from otree.api import Currency as c, currency_range from . import pages from ._builtin import Bot from .models import Constants import random from otree.api import Submission class PlayerBot(Bot): def play_round(self): if not self.participant.vars['failed_comprehension']: yield (pages.Instructions) yield (pages.Stocks, { 'belief': random.randint(0, 100), }) yield (pages.StocksCertainty, { 'certainty': random.randint(0, 20), }) yield (pages.LookedUpAnswer, {'looked_up_answer': random.choice([True, False]), 'used_calc': random.choice([True, False])})