oTree Forum >

Automatic decision

#1 by hungotreeuser

Dear oTree folks,

I am trying to automate players' decisions in some rounds.
Below is my attempt. I define a function and pass this function on the rounds that I want automation.
However, the decision is still 'None' afterward. Is there a way I can automate the {{formfields}}.

I appreciate any input or ideas, and thank you in advance!
Sincerely,


class Group(BaseGroup):
    decision1 = models.IntegerField(min=0, initial=0)
    decision2 = models.IntegerField(min=0, initial=0)

def decisions_automation(group: Group):
    group.decision1 = 0
    group.decision2 = 1

Write a reply

Set forum username