from otree.api import Currency as c, currency_range from . import pages from ._builtin import Bot from .models import Constants import random class PlayerBot(Bot): def play_round(self): yield (pages.Risk, { 'risk_aversion1': random.randrange(1, 7) } ) yield (pages.Pref1, { 'pref1_1': random.randint(1, 7), 'pref1_2': random.randint(1, 7), 'pref1_3': random.randint(1, 7), 'pref1_4': random.randint(1, 7), } ) yield (pages.Pref2, { 'pref2_1': random.randint(1, 7), 'pref2_2': random.randint(1, 7), 'pref2_3': random.randint(1, 7) } ) yield (pages.Demographics, { 'age': random.randint(17, 60), 'female': random.randint(0,1), 'education': random.randrange(1,5), 'jobfunctiongp': 'xyz', 'investment': random.randint(0,1), 'matrikelnr': random.randint(0, 11718804), 'finnews': random.randint(1, 5) } )