from otree.api import Currency as c, currency_range, expect, Bot from . import * import random class PlayerBot(Bot): def play_round(self): yield Instrucciones yield ins_table1 questions = ['s1t100', 's1t101', 's1t102', 's1t103', 's1t104', 's1t105', 's1t106', 's1t107', 's1t108', 's1t109', 's1t110', 's1t111', 's1t112', 's1t113', 's1t114', 's1t115', 's1t116', 's1t117', 's1t118', 's1t119', 's1t120', 's1t121'] cutoff_value = random.randint(0, len(questions)) # Esta no es una representación realista de como son las decisions pero no me importa answers = [1 for _ in range(cutoff_value + 1)] + [2 for _ in range(21 - cutoff_value)] yield table1, dict(zip(questions, answers))