Ejemplo n.º 1
0
class Player(BasePlayer):
    ox1 = models.BooleanField(
        choices=[
            [True, "O"],
            [False, "X"]
        ],
        widget=widgets.RadioSelectHorizontal()
    )
    ox2 = models.BooleanField(
        choices=[
            [True, "O"],
            [False, "X"]
        ],
        widget=widgets.RadioSelectHorizontal()
    )
    ox3 = models.BooleanField(
        choices=[
            [False, "O"],
            [True, "X"]
        ],
        widget=widgets.RadioSelectHorizontal()
    )
    ox4 = models.BooleanField(
        choices=[
            [True, "O"],
            [False, "X"]
        ],
        widget=widgets.RadioSelectHorizontal()
    )
    money1 = models.IntegerField(
    )
Ejemplo n.º 2
0
class Group(BaseGroup):
    special_number = models.IntegerField(initial=0, )

    bump_number = models.IntegerField(initial=0, )

    demand = models.PositiveIntegerField(
        choices=(1, 2, 3, 4, 5, 6, 7), widget=widgets.RadioSelectHorizontal())

    demandArray = models.CharField()

    effort = models.PositiveIntegerField(
        choices=(1, 2, 3), widget=widgets.RadioSelectHorizontal())

    effortArray = models.CharField()

    choice = models.IntegerField(choices=[
        (0, 'Special Number Higher'),
        (1, 'Effort Higher'),
    ],
                                 widget=widgets.RadioSelectHorizontal())

    choice_outcome = models.IntegerField()

    increased_choice_outcome = models.IntegerField()

    bonus = models.IntegerField(choices=[
        (0, 'No Bonus'),
        (1, 'Bonus'),
    ],
                                widget=widgets.RadioSelectHorizontal())

    gender_p1 = models.CharField()

    gender_p2 = models.CharField()
Ejemplo n.º 3
0
class Group(BaseGroup):
    total_return = models.CurrencyField(
        doc="""Total return from agent's effort = [Return for single unit of
            agent's work effort] * [Agent's work effort]"""
    )

    agent_fixed_pay = models.CurrencyField(
        doc="""Amount offered as fixed pay to agent""",
        min=Constants.min_fixed_payment, max=Constants.max_fixed_payment,
        verbose_name='Fixed Payment (from {} to {})'.format(
            Constants.min_fixed_payment, Constants.max_fixed_payment)
    )

    agent_return_share = models.FloatField(
        choices=Constants.agent_return_share_choices,
        doc="""Agent's share of total return""",
        verbose_name='Return Share',
        widget=widgets.RadioSelectHorizontal()
    )

    agent_work_effort = models.PositiveIntegerField(
        choices=range(1, 10 + 1),
        doc="""Agent's work effort, [1, 10]""",
        widget=widgets.RadioSelectHorizontal(),
    )

    agent_work_cost = models.CurrencyField(
        doc="""Agent's cost of work effort"""
    )

    contract_accepted = models.BooleanField(
        doc="""Whether agent accepts proposal""",
        widget=widgets.RadioSelect(),
        choices=(
            (True, 'Accept'),
            (False, 'Reject'),
        )
    )

    def set_payoffs(self):
        principal = self.get_player_by_role('principal')
        agent = self.get_player_by_role('agent')

        if not self.contract_accepted:
            principal.payoff = Constants.reject_principal_pay
            agent.payoff = Constants.reject_agent_pay
        else:
            self.agent_work_cost = cost_from_effort(self.agent_work_effort)
            self.total_return = return_from_effort(self.agent_work_effort)

            money_to_agent = self.agent_return_share * \
                             self.total_return + self.agent_fixed_pay
            agent.payoff = money_to_agent - self.agent_work_cost
            principal.payoff = self.total_return - money_to_agent
        principal.payoff += Constants.base_pay
        agent.payoff += Constants.base_pay

    def return_share_as_percentage(self):
        return utils.float_as_percentage(self.agent_return_share)
Ejemplo n.º 4
0
class Group(BaseGroup):
    """
    A group represents one pair of participants in one round.
    It's mostly used to send and keep track of information between the two participants.
    """

    consensus = models.CharField(doc="""Answer chosen by consensus""",
                                 choices=[(x, x) for x in Constants.vowels],
                                 widget=widgets.RadioSelectHorizontal())

    ready = models.CharField(
        doc=
        """Dummy field to make the non-controlling player explicitly say hes ready.""",
        choices=[("Ready", "We reached a joint decision")],
        widget=widgets.RadioSelectHorizontal())

    correct_consensus = models.BooleanField(
        doc="""Whether the consensus choice was correct.""")

    stimulus = models.CharField(doc="""Stimulus filename.""")
    vowel = models.CharField(doc="""The correct vowel""")
    intensity = models.CharField(
        doc="""The stimulus intensity (dB of formants)""")

    def set_correct(self):
        """
        After both players answered individually, calculate whether they were correct.
        """

        for p in self.get_players():
            p.correct_individual = (p.answer == self.vowel)

    def set_consensus_correct(self):
        """
        After players reached a consensus, calculate whether they were correct.
        """

        self.correct_consensus = (self.consensus == self.vowel)

    def set_stim(self):
        """
        For each group, for each round, get a random vowel and intensity.
        """

        self.vowel = sample(Constants.vowels, 1)[0]
        self.intensity = sample(Constants.intensities, 1)[0]

        self.stimulus = str(self.vowel) + str(self.intensity) + ".wav"
Ejemplo n.º 5
0
class Player(BasePlayer):

    blank = models.CharField(blank=True)

    add100_1 = models.PositiveIntegerField()
    add100_2 = models.PositiveIntegerField()

    even_int = models.PositiveIntegerField()

    dynamic_choices = models.CharField()

    blank_dynamic_choices = models.IntegerField(blank=True)

    choices_flat = models.CurrencyField(widget=widgets.RadioSelect(),
                                        choices=[c(1), c(2)])

    choices = models.IntegerField(widget=widgets.RadioSelect(),
                                  choices=[[1, 'A'], [2, 'B']])

    dynamic_radio = models.CharField(widget=widgets.RadioSelectHorizontal())

    min_max_dynamic = models.CurrencyField()
    min_max_blank = models.FloatField(blank=True, min=1, max=1)
    min_max_blank2 = models.FloatField(blank=True, min=1, max=1)

    equals_one = models.IntegerField(initial=1)
Ejemplo n.º 6
0
class Player(BasePlayer):
    def other_player(self):
        """Returns other player in group. Only valid for 2-player groups."""
        return self.get_others_in_group()[0]

    blank = models.CharField(blank=True)

    add100_1 = models.PositiveIntegerField()
    add100_2 = models.PositiveIntegerField()

    even_int = models.PositiveIntegerField()

    after_next_button_field = models.BooleanField()

    dynamic_choices = models.CharField()

    radio = models.CurrencyField(widget=widgets.RadioSelect(),
                                 choices=[c(1), c(2)])

    dynamic_radio = models.CharField(widget=widgets.RadioSelectHorizontal())

    dynamic_min_max = models.CurrencyField()

    in_before_session_starts = models.CurrencyField()

    def role(self):
        # you can make this depend of self.id_in_group
        return ''
Ejemplo n.º 7
0
class Group(BaseGroup):
    company_chosen = models.BooleanField(
        doc="""Whether customer chooses company""",
        widget=widgets.RadioSelect(),
        choices=(
            (True, 'Choose'),
            (False, 'Decline'),
        )
    )

    company_choose_employee = models.FloatField(
        choices=Constants.company_choose_employee_choices,
        doc="""Company's different options of employee to offer customer""",
        verbose_name='Company Hiring Options',
        widget=widgets.RadioSelectHorizontal()
    )
    def set_payoffs(self):
        company = self.get_player_by_role('company')
        customer = self.get_player_by_role('customer')
        if not self.contract_accepted:
            company.payoff = Constants.company_rejected_pay
            customer.payoff = Constants.customer_choose_pay
        else:
            company.payoff = Constants.company_chosen_pay
            customer.payoff = Constants.customer_reject_pay
        customer.payoff += Constants.base_pay
        company.payoff += Constants.base_pay
Ejemplo n.º 8
0
    def __init__(self, joined_fields, *args, view=None, **kwargs):
        super().__init__(view=view, *args, **kwargs)
        if joined_fields:
            flattened_joined_fields = [
                i for j in joined_fields for i in j['fields']
            ]
            self.joined_fields = joined_fields
            self.view = view

            for jfield in joined_fields:
                fields = jfield['fields']
                for f, v in self.fields.items():
                    if f in fields:
                        stripped_choices = [
                            ch for ch in v.widget.choices if ch[0] != ''
                        ]
                        self.fields[f].widget = widgets.RadioSelectHorizontal(
                            choices=stripped_choices)

                first_chosen_field = [
                    v for f, v in self.fields.items() if f in jfield['fields']
                ][0]
                jfield['choices'] = first_chosen_field.widget.choices
        else:
            flattened_joined_fields = []
        self.non_joined_fields = [
            f for f in self.fields.keys() if f not in flattened_joined_fields
        ]
Ejemplo n.º 9
0
class Player(BasePlayer):
    # needed for prelec results.
    information_score = models.FloatField()
    prediction_score = models.FloatField()
    respondent_score = models.FloatField()

    # Question 1
    question = models.IntegerField(
        choices=Constants.likert_choices,
        widget=widgets.RadioSelectHorizontal(),
        verbose_name="This is the question you are after!")

    # Predictions for question 1, one for each likert option
    prediction1 = models.FloatField(
        min=0,
        max=1,
        verbose_name="How likely are others to answer %s?" %
        Constants.likert_choices[0])
    prediction2 = models.FloatField(
        min=0,
        max=1,
        verbose_name="How likely are others to answer %s?" %
        Constants.likert_choices[1])
    prediction3 = models.FloatField(
        min=0,
        max=1,
        verbose_name="How likely are others to answer %s?" %
        Constants.likert_choices[2])
    prediction4 = models.FloatField(
        min=0,
        max=1,
        verbose_name="How likely are others to answer %s?" %
        Constants.likert_choices[3])
Ejemplo n.º 10
0
class Player(BasePlayer):
    money = models.FloatField()
    score = models.FloatField()
    cost = models.IntegerField()
    estimatedCost = models.IntegerField()
    sold = models.BooleanField()
    offer = models.IntegerField(blank=True)
    profit = models.IntegerField()
    markup = models.IntegerField()
    epsilon_val = models.IntegerField()
    priceCap = models.IntegerField()
    refPrice = models.IntegerField()
    neighbor_avg_offer = models.FloatField()
    participate = models.BooleanField(choices=[[True, "Yes"], [False, "No"]],
                                      widget=widgets.RadioSelectHorizontal())
    benefits = models.IntegerField()
    benefits_purchased = models.IntegerField()
    benefits_choice = models.IntegerField(widget=widgets.RadioSelect)

    # Total number of participants in a given round
    numParticipants = models.IntegerField()

    # Min. accepted score for a given round
    min_accepted_score = models.FloatField()

    # Indicate whether the current round should be shown in the history table yet
    showCurrRound = models.BooleanField()
    price_15pts = models.IntegerField()
Ejemplo n.º 11
0
class Player(BasePlayer):
    """
    Player objects represent a participant in a single round.
    """

    answer = models.CharField(doc="""Answer chosen individually.""",
                              choices=[(x, x) for x in Constants.vowels],
                              widget=widgets.RadioSelectHorizontal())

    correct_individual = models.BooleanField(
        doc="""Whether the individual answer was correct.""")

    def role(self):
        return {1: "A", 2: "B"}[self.id_in_group]

    def get_partner(self):
        """
        Returns the other player in the group
        """

        return self.get_others_in_group()[0]

    def control_consensus(self):
        """
        Player 1 controls the consensus in even numbered rounds, 
        and player 2 controls it in uneven numbered rounds.
        """

        return (self.round_number % 2) + 1 == self.id_in_group
Ejemplo n.º 12
0
def get_joke_field():
    return models.PositiveIntegerField(
        choices=[[1, '😞 not funny at all '], [2, '😔 can be better'],
                 [3, '😊 funny'], [4, '😆 hilarious']],
        min=0,
        max=5,
        widget=widgets.RadioSelectHorizontal(),
    )
Ejemplo n.º 13
0
class Player(BasePlayer):

    # Within each group, assign all players their colors
    def role(self):
        if self.id_in_group == 1:
            return "red"
        if self.id_in_group == 2:
            return "blue"
        if self.id_in_group == 3:
            return "green"

    my_group_id = models.IntegerField(doc="Assigns each player a group ID")

    # Returns the group_id of each player in round 1
    def return_group_id(self):
        return self.in_round(1).my_group_id

    treatment = models.CharField(doc="Treatment (either public or private)")

    advice = models.CharField(
        choices=["A", "B", "C", "D", "E", "F"],
        doc="Advice which is given to the players (see settings).")

    # below are the fields of the questionnaire
    age = models.PositiveIntegerField(
        max=100,
        verbose_name="How old are you?",
        doc="We ask participants for their age between 0 and 100 years")

    gender = models.CharField(choices=["female", "male", "other"],
                              widget=widgets.RadioSelect(),
                              verbose_name="Please indicate your gender.",
                              doc="gender indication")

    studies = models.CharField(
        blank=True,
        verbose_name="Please indicate your field of studies.",
        doc="field of studies indication.")

    studies2 = models.BooleanField(
        widget=widgets.CheckboxInput(),
        verbose_name="Non-student",
        doc="Ticking the checkbox means that the participant is a non-student."
    )

    risk = models.CharField(
        choices=[
            "highly risk averse", "risk averse", "somewhat risk averse",
            "neutral", "somewhat risk loving", "risk loving",
            "highly risk loving"
        ],
        widget=widgets.RadioSelectHorizontal(),
        verbose_name="Please indicate your risk preference.",
        doc="7 point likert scale to measure risk preference.")

    country = CountryField(
        blank=True, verbose_name="Please indicate your country of birth."
    )  # We ask participants for their country of birth.
Ejemplo n.º 14
0
class Player(BasePlayer):
    howLong = models.PositiveIntegerField(
        validators=[validate_nonzero],
        default=0,
        min=0,
        max=180,
        widget=widgets.SliderInput(attrs={'step': '5'}))
    bid = models.CurrencyField()
    pref1 = models.PositiveIntegerField(widget=widgets.RadioSelectHorizontal(
        choices=P1_CHOICES))
    pref2 = models.PositiveIntegerField(widget=widgets.RadioSelectHorizontal(
        choices=P2_CHOICES))
    pref3 = models.PositiveIntegerField(widget=widgets.RadioSelectHorizontal(
        choices=P3_CHOICES))
    pref4 = models.PositiveIntegerField(widget=widgets.RadioSelectHorizontal(
        choices=P4_CHOICES))
    pref5 = models.PositiveIntegerField(widget=widgets.RadioSelectHorizontal(
        choices=P5_CHOICES))
Ejemplo n.º 15
0
class Player(BasePlayer):
    consent = models.IntegerField(
        initial=None,
        choices=[
            [1, 'Yes'],
            [0, 'No'],
        ],
        verbose_name=
        'I have read and understood the the above and want to participate in this study.',
        widget=widgets.RadioSelectHorizontal())
Ejemplo n.º 16
0
class Player(BasePlayer):
    def set_payoff(self):
        self.payoff = 0

    q_country = CountryField(
        verbose_name='What is your country of citizenship?')
    q_age = models.PositiveIntegerField(verbose_name='What is your age?',
                                        choices=range(13, 125),
                                        initial=None)
    q_gender = models.CharField(initial=None,
                                choices=['Male', 'Female'],
                                verbose_name='What is your gender?',
                                widget=widgets.RadioSelect())

    sw_bat = models.PositiveIntegerField(verbose_name='''
        A bat and a ball cost 22 dollars in total.
        The bat costs 20 dollars more than the ball.
        How many dollars does the ball cost?''',
                                         min=0,
                                         max=20)

    sw_widget = models.PositiveIntegerField(verbose_name='''
        "If it takes 5 machines 5 minutes to make 5 widgets,
        how many minutes would it take 100 machines to make 100 widgets?"
        ''')

    sw_choices = models.CharField(initial=None,
                                  choices=[
                                      '0 Worst', '1', '2', '3', '4', '5', '6',
                                      '7', '8', '9', '10 Best'
                                  ],
                                  verbose_name='How good was it?',
                                  widget=widgets.RadioSelectHorizontal())
    sw_lake = models.PositiveIntegerField(verbose_name='''
        In a lake, there is a patch of lily pads.
        Every day, the patch doubles in size.
        If it takes 48 days for the patch to cover the entire lake,
        how many days would it take for the patch to cover half of the lake?
        ''')
    sw_level = models.PositiveIntegerField(verbose_name='set the level',
                                           choices=[
                                               [1, 'Low'],
                                               [2, 'Medium'],
                                               [3, 'High'],
                                           ])
    sw_slider = models.PositiveIntegerField(
        verbose_name='set the slider',
        widget=widgets.SliderInput(attrs={'step': '0.01'}))

    offer_1 = models.BooleanField()
    offer_2 = models.BooleanField()
    offer_3 = models.BooleanField()
    offer_4 = models.BooleanField()
    offer_5 = models.BooleanField()
Ejemplo n.º 17
0
class Player(BasePlayer):
    """Contains player-level objects of the current experiment app."""

    raven_1 = models.PositiveIntegerField(
        initial=None,
        choices=Constants.SCALE,
        verbose_name='',
        blank=False,
        widget=widgets.RadioSelectHorizontal())
    raven_2 = models.PositiveIntegerField(
        initial=None,
        choices=Constants.SCALE,
        verbose_name='',
        blank=False,
        widget=widgets.RadioSelectHorizontal())
    raven_3 = models.PositiveIntegerField(
        initial=None,
        choices=Constants.SCALE,
        verbose_name='',
        blank=False,
        widget=widgets.RadioSelectHorizontal())
    raven_4 = models.PositiveIntegerField(
        initial=None,
        choices=Constants.SCALE,
        verbose_name='',
        blank=False,
        widget=widgets.RadioSelectHorizontal())
    raven_5 = models.PositiveIntegerField(
        initial=None,
        choices=Constants.SCALE,
        verbose_name='',
        blank=False,
        widget=widgets.RadioSelectHorizontal())
    raven_6 = models.PositiveIntegerField(
        initial=None,
        choices=Constants.SCALE,
        verbose_name='',
        blank=False,
        widget=widgets.RadioSelectHorizontal())
    raven_7 = models.PositiveIntegerField(
        initial=None,
        choices=Constants.SCALE,
        verbose_name='',
        blank=False,
        widget=widgets.RadioSelectHorizontal())
    raven_8 = models.PositiveIntegerField(
        initial=None,
        choices=Constants.SCALE,
        verbose_name='',
        blank=False,
        widget=widgets.RadioSelectHorizontal())
Ejemplo n.º 18
0
class Player(BasePlayer):
    contribution = models.IntegerField(min=0, max=Constants.max_contribution,
                                       label='How much you want to contribute?')
    take = models.IntegerField(choices=[0, 50],
                               widget=widgets.RadioSelectHorizontal(),
                               label='How much youd like to steal?')

    def role(self):
        if self.id_in_group < 4:
            return 'worker'
        else:
            return 'employer'
Ejemplo n.º 19
0
class Group(BaseGroup):
    kept = models.CurrencyField(
        doc="""Amount sender decided to keep for himself""",
        min=0, max=Constants.endowment,
        verbose_name='I will keep (from 0 to %i)' % Constants.endowment
    )

    Ikeep = models.CurrencyField (
        choices=Constants.kept_choices,
        doc="""receiver kept""",
        verbose_name='I understand that the amount of random number advise me to allocate this amount',
        widget=widgets.RadioSelectHorizontal()
    )

    # for strategy method
    response_10 = models.CharField(
        choices=[None, '10', '20', '30', '40'],
        widget=widgets.RadioSelectHorizontal(), verbose_name=question(10))
    response_20 = models.CharField(
        choices=[None, '10', '20', '30', '40'],
        widget=widgets.RadioSelectHorizontal(), verbose_name=question(20))
    response_30 = models.CharField(
        choices=[None, '10', '20', '30', '40'],
        widget=widgets.RadioSelectHorizontal(), verbose_name=question(30))
    response_40 = models.CharField(
        choices=[None, '10', '20', '30', '40'],
        widget=widgets.RadioSelectHorizontal(), verbose_name=question(40))



    def set_payoffs(self):
        sender = self.get_player_by_id(1)
        receiver = self.get_player_by_id(2)
        if self.round_number == 1:
            sender.payoff = self.kept * 2
            receiver.payoff = Constants.endowment - self.kept
        if self.round_number == 2:
            sender.payoff = self.kept
            receiver.payoff = (Constants.endowment - self.kept) * 2
Ejemplo n.º 20
0
class Player(BasePlayer):
    email = models.CharField(
        verbose_name=
        "Please enter you email address, so we may send you a code to access the payment you earned"
    )

    age = models.PositiveIntegerField(verbose_name='What is your age?',
                                      min=18,
                                      max=125)

    gender = models.CharField(choices=['Male', 'Female'],
                              verbose_name='What is your gender?',
                              widget=widgets.RadioSelect())

    education = models.CharField(
        choices=[
            'Less than a high school degree', 'High School Diploma',
            'Vocational Training', 'Attended College', 'Bachelor’s Degree',
            'Graduate Degree', 'Unknown'
        ],
        verbose_name=
        'What is the highest level of education you have completed?',
        widget=widgets.RadioSelect())

    geographic = models.CharField(
        verbose_name=
        'In which city and country did you grow up? If you lived in more than one place, list the one in which you spent the most time. (If the United States, please also indicate the state)'
    )

    previous_mturk = models.IntegerField(
        min=0,
        verbose_name=
        'Have you previously done any experiments on Mechanical Turk or other online sites? If you have not, please type 0 in the response box. If yes, please indicate how many experiments you have done in total.'
    )

    satisfaction = models.CharField(
        choices=[
            'Very pleased', 'Pleased', 'Neutral', 'Displeased',
            'Very displeased'
        ],
        verbose_name='How satisfied are you with the outcome of this game?',
        widget=widgets.RadioSelectHorizontal())

    reasoning_stay = models.CharField(
        verbose_name=
        'If/when you remained at the same planet(s), why did you stay at that/those planet(s)?'
    )

    reasoning_switch = models.CharField()

    reasoning_quit = models.CharField()
Ejemplo n.º 21
0
class Player(BasePlayer):

    age = models.PositiveIntegerField(
        verbose_name='What is your age?',
        min=18, max=125)

    gender = models.StringField(
        choices=['Male', 'Female'],
        verbose_name='What is your gender?',
        widget=widgets.RadioSelect())

    manip_check = models.PositiveIntegerField(
        choices=[
            [1, 'Completely Disagree'],
            [2, 'Strongly Disagree'],
            [3, 'Midly Disagree'],
            [4, 'Neutral'],
            [5, 'Mildly Agree'],
            [6, 'Strongly Agree'],
            [7, 'Completely Agree']],
        widget = widgets.RadioSelectHorizontal(),
        verbose_name ='''
            To what extent do you agree with the following statement? - It was important to me to correctly complete 
            as many transcriptions as possible'''
    )

    volunteer_orgs = models.PositiveIntegerField(
        verbose_name='''
        In the last year, how many charitable organizations did you support by volunteering?''',
        min=0, max=100)

    donate_orgs = models.PositiveIntegerField(
        verbose_name='''
        In the last year, how many charitable organizations did you support by donating money or property?''',
        min=0, max=100)

    dualgiver_orgs = models.PositiveIntegerField(
        verbose_name='''
        In the last year, how many charitable organizations did you support by BOTH volunteering 
        AND donating money or property?''',
        min=0, max=100)

    comments = models.LongStringField(
        verbose_name='''Do you have any comments or feedback you would like to share regarding this study?'''
    )

    puid = models.StringField(verbose_name='''Please enter your code here:''')
Ejemplo n.º 22
0
class Player(BasePlayer):

    decision = models.CharField(choices=['A', 'B', 'C'],
                                doc="""This player's decision""",
                                widget=widgets.RadioSelect())

    payoffi = models.IntegerField()
    othpayoff = models.IntegerField()

    starttime = models.FloatField()

    endtime = models.FloatField()

    conflict = models.PositiveIntegerField(
        choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'],
                 [7, '7'], [8, '8'], [9, '9']],
        widget=widgets.RadioSelectHorizontal())

    def other_player(self):
        return self.get_others_in_group()[0]

    def set_payoff(self):

        points_matrix = {
            'A': {
                'A': Constants.cc,
                'B': Constants.cdrow,
                'C': Constants.cprow
            },
            'B': {
                'A': Constants.dcrow,
                'B': Constants.dd,
                'C': Constants.dprow
            },
            'C': {
                'A': Constants.pcrow,
                'B': Constants.pdrow,
                'C': Constants.pp
            }
        }

        self.payoffi = int(
            points_matrix[self.decision][self.other_player().decision])

        self.othpayoff = int(
            points_matrix[self.other_player().decision][self.decision])
Ejemplo n.º 23
0
class Player(BasePlayer):
    early_finish = models.BooleanField(
        doc='if decided to abandon the waiting page clickin Finish the study')
    wp_timer_start = djmodels.DateTimeField(null=True, blank=True)
    sec_spent = models.IntegerField(
        doc='number of seconds spent on waiting page')
    sec_earned = models.FloatField(doc='dollars earned for waiting')
    decision_order = models.IntegerField(initial=10 ^ 10)
    current_ball = models.StringField(
    )  # the color of the ball a player will draw
    choice_of_urn = models.StringField(  # the guess by the player
        choices=['A', 'B'],
        widget=widgets.RadioSelectHorizontal())

    def set_payoffs(self):
        if self.choice_of_urn == self.subsession.storyline:
            self.payoff = Constants.bonus
        else:
            self.payoff = 0
Ejemplo n.º 24
0
class Player(BasePlayer):
    # seller
    seller_proposed_price = models.CurrencyField(
        min=0,
        max=Constants.initial_endowment,
        verbose_name='Please indicate a price (from 0 to %i) you want to sell'
        % Constants.initial_endowment)

    seller_proposed_quality = models.CurrencyField(
        choices=[(30, 'High'), (20, 'Medium'), (10, 'Low')],
        verbose_name='Please select a quality grade you want to produce',
        widget=widgets.RadioSelectHorizontal())

    def seller_id(self):
        # player 1 is the buyer, so seller 1 is actually player 2
        return (self.id_in_group - 1)

    def role(self):
        if self.id_in_group == 1:
            return 'buyer'
        return 'seller {}'.format(self.seller_id())
Ejemplo n.º 25
0
class Group(BaseGroup):
    kept = models.CurrencyField(
        doc="""Amount sender decided to keep for himself""",
        min=0,
        max=Constants.endowment,
        verbose_name='I will keep (from 0 to %i)' % Constants.endowment)

    Ikeep = models.CurrencyField(
        choices=Constants.kept_choices,
        doc="""receiver kept""",
        verbose_name=
        'I understand that the amount of random number advise me to allocate this amount',
        widget=widgets.RadioSelectHorizontal())

    def set_payoffs(self):
        sender = self.get_player_by_id(1)
        receiver = self.get_player_by_id(2)
        if self.round_number == 1:
            sender.payoff = self.kept * 3
            receiver.payoff = Constants.endowment - self.kept
        if self.round_number == 2:
            sender.payoff = self.kept
            receiver.payoff = (Constants.endowment - self.kept) * 3
Ejemplo n.º 26
0
Archivo: models.py Proyecto: LuK412/AEE
class Player(BasePlayer):

    frauen = models.BooleanField(
        choices=(
            (True, "Ich stimme zu"),
            (False, "Ich stimme nicht zu"),
        ),
        widget=widgets.RadioSelectHorizontal(),
        verbose_name="1. Wir brauchen eine Frauenquote für Führungspositionen.",
        doc="Turns True if the participant agrees.")

    atom = models.BooleanField(
        choices=(
            (True, "Ich stimme zu"),
            (False, "Ich stimme nicht zu"),
        ),
        widget=widgets.RadioSelectHorizontal(),
        verbose_name=
        "2. Langfristig sollte jedes Land aus der Atomkraft aussteigen.",
        doc="Turns True if the participant agrees.")

    grundek = models.BooleanField(
        choices=(
            (True, "Ich stimme zu"),
            (False, "Ich stimme nicht zu"),
        ),
        widget=widgets.RadioSelectHorizontal(),
        verbose_name=
        "3. In Deutschland sollte es ein bedingungsloses Grundeinkommen geben.",
        doc="Turns True if the participant agrees.")

    impfen = models.BooleanField(
        choices=(
            (True, "Ich stimme zu"),
            (False, "Ich stimme nicht zu"),
        ),
        widget=widgets.RadioSelectHorizontal(),
        verbose_name="4. Für Kinder sollte eine Impfpflicht bestehen.",
        doc="Turns True if the participant agrees.")

    video = models.BooleanField(
        choices=(
            (True, "Ich stimme zu"),
            (False, "Ich stimme nicht zu"),
        ),
        widget=widgets.RadioSelectHorizontal(),
        verbose_name=
        "5. Zur Terrorismusbekämpfung sollte es mehr Videoüberwachung im öffentlichen Raum geben.",
        doc="Turns True if the participant agrees.")

    ruestung = models.BooleanField(
        choices=(
            (True, "Ich stimme zu"),
            (False, "Ich stimme nicht zu"),
        ),
        widget=widgets.RadioSelectHorizontal(),
        verbose_name=
        "6. Rüstungsexporte sollten ohne Ausnahmen verboten werden.",
        doc="Turns True if the participant agrees.")

    tempo = models.BooleanField(
        choices=(
            (True, "Ich stimme zu"),
            (False, "Ich stimme nicht zu"),
        ),
        widget=widgets.RadioSelectHorizontal(),
        verbose_name=
        "7. Auf deutschen Autobahnen sollte ein generelles Tempolimit eingeführt werden.",
        doc="Turns True if the participant agrees.")

    aktivesh = models.BooleanField(
        choices=(
            (True, "Ich stimme zu"),
            (False, "Ich stimme nicht zu"),
        ),
        widget=widgets.RadioSelectHorizontal(),
        verbose_name=
        "8. Aktive Sterbehilfe sollte in Deutschland erlaubt sein.",
        doc="Turns True if the participant agrees.")
Ejemplo n.º 27
0
class Player(BasePlayer):
    answer = models.PositiveIntegerField(
        widget=widgets.RadioSelectHorizontal(), min=1, max=4)

    def question(self):
        return Constants.questions[self.round_number - 1]
Ejemplo n.º 28
0
class Player(BasePlayer):

    risk01 = models.CharField(choices=['A', 'B',],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    risk02 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    risk03 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    risk04 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    risk05 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    risk06 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    risk07 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    risk08 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    risk09 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    risk10 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    risk11 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    risk12 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    risk13 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    risk14 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    risk15 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    risk16 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    risk17 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    risk18 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    risk19 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    risk20 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")


    df2c01 = models.CharField(
                choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df2c02 = models.CharField( choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df2c03 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df2c04 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df2c05 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df2c06 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df2c07 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df2c08 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df2c09 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df2c10 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")

    df3c01 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df3c02 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df3c03 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df3c04 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df3c05 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df3c06 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df3c07 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df3c08 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df3c09 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df3c10 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    
    df4c01 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df4c02 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df4c03 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df4c04 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df4c05 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df4c06 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df4c07 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df4c08 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df4c09 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df4c10 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    
    df5c01 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df5c02 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df5c03 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df5c04 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df5c05 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df5c06 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df5c07 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df5c08 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df5c09 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df5c10 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    
    df6c01 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df6c02 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df6c03 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df6c04 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df6c05 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df6c06 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df6c07 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df6c08 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df6c09 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")
    df6c10 = models.CharField(choices=['A', 'B'],
                widget=widgets.RadioSelectHorizontal(),
                verbose_name="")

    risk01_pay = models.IntegerField()
    risk02_pay = models.IntegerField()
    risk03_pay = models.IntegerField()
    risk04_pay = models.IntegerField()
    risk05_pay = models.IntegerField()
    risk06_pay = models.IntegerField()
    risk07_pay = models.IntegerField()
    risk08_pay = models.IntegerField()
    risk09_pay = models.IntegerField()
    risk10_pay = models.IntegerField()
    risk11_pay = models.IntegerField()
    risk12_pay = models.IntegerField()
    risk13_pay = models.IntegerField()
    risk14_pay = models.IntegerField()
    risk15_pay = models.IntegerField()
    risk16_pay = models.IntegerField()
    risk17_pay = models.IntegerField()
    risk18_pay = models.IntegerField()
    risk19_pay = models.IntegerField()
    risk20_pay = models.IntegerField()

    risk01_res = models.CharField()
    risk02_res = models.CharField()
    risk03_res = models.CharField()
    risk04_res = models.CharField()
    risk05_res = models.CharField()
    risk06_res = models.CharField()
    risk07_res = models.CharField()
    risk08_res = models.CharField()
    risk09_res = models.CharField()
    risk10_res = models.CharField()
    risk11_res = models.CharField()
    risk12_res = models.CharField()
    risk13_res = models.CharField()
    risk14_res = models.CharField()
    risk15_res = models.CharField()
    risk16_res = models.CharField()
    risk17_res = models.CharField()
    risk18_res = models.CharField()
    risk19_res = models.CharField()
    risk20_res = models.CharField()


    df2c01_pay = models.PositiveIntegerField()
    df2c02_pay = models.PositiveIntegerField()
    df2c03_pay = models.PositiveIntegerField()
    df2c04_pay = models.PositiveIntegerField()
    df2c05_pay = models.PositiveIntegerField()
    df2c06_pay = models.PositiveIntegerField()
    df2c07_pay = models.PositiveIntegerField()
    df2c08_pay = models.PositiveIntegerField()
    df2c09_pay = models.PositiveIntegerField()
    df2c10_pay = models.PositiveIntegerField()

    df3c01_pay = models.PositiveIntegerField()
    df3c02_pay = models.PositiveIntegerField()
    df3c03_pay = models.PositiveIntegerField()
    df3c04_pay = models.PositiveIntegerField()
    df3c05_pay = models.PositiveIntegerField()
    df3c06_pay = models.PositiveIntegerField()
    df3c07_pay = models.PositiveIntegerField()
    df3c08_pay = models.PositiveIntegerField()
    df3c09_pay = models.PositiveIntegerField()
    df3c10_pay = models.PositiveIntegerField()
    
    df4c01_pay = models.PositiveIntegerField()
    df4c02_pay = models.PositiveIntegerField()
    df4c03_pay = models.PositiveIntegerField()
    df4c04_pay = models.PositiveIntegerField()
    df4c05_pay = models.PositiveIntegerField()
    df4c06_pay = models.PositiveIntegerField()
    df4c07_pay = models.PositiveIntegerField()
    df4c08_pay = models.PositiveIntegerField()
    df4c09_pay = models.PositiveIntegerField()
    df4c10_pay = models.PositiveIntegerField()
    
    df5c01_pay = models.PositiveIntegerField()
    df5c02_pay = models.PositiveIntegerField()
    df5c03_pay = models.PositiveIntegerField()
    df5c04_pay = models.PositiveIntegerField()
    df5c05_pay = models.PositiveIntegerField()
    df5c06_pay = models.PositiveIntegerField()
    df5c07_pay = models.PositiveIntegerField()
    df5c08_pay = models.PositiveIntegerField()
    df5c09_pay = models.PositiveIntegerField()
    df5c10_pay = models.PositiveIntegerField()
    
    df6c01_pay = models.PositiveIntegerField()
    df6c02_pay = models.PositiveIntegerField()
    df6c03_pay = models.PositiveIntegerField()
    df6c04_pay = models.PositiveIntegerField()
    df6c05_pay = models.PositiveIntegerField()
    df6c06_pay = models.PositiveIntegerField()
    df6c07_pay = models.PositiveIntegerField()
    df6c08_pay = models.PositiveIntegerField()
    df6c09_pay = models.PositiveIntegerField()
    df6c10_pay = models.PositiveIntegerField()

    #
    risk_P1_nat = models.IntegerField() #number of random lottery
    risk_P1_sel = models.CharField() #player's selection
    risk_P1_pay = models.IntegerField() #payment of random lottery
    risk_P1_res = models.CharField() #won/lost
    risk_payoff = models.CurrencyField()

    df_nat = models.IntegerField() #number of df game
    df_sel = models.CharField() #player's selection option
    df_pay = models.IntegerField() #payment of this option
    df_payoff = models.CurrencyField()



    def calc_payoff(self):
        self.payoff = self.risk_payoff__add__(self.df_payoff)
        return

    def some_method(self):
        return
Ejemplo n.º 29
0
class Player(BasePlayer):
    wallet = models.FloatField()
    company_name = models.StringField()
    company_state = models.StringField()
    #number_of_glad_faces = models.PositiveIntegerField()
    drawn_face = models.BooleanField()
    choice_of_trade = models.BooleanField(
        choices=[
            [True, 'køb (long)'],
            [False, 'lån og sælg (short)'],
        ],
        widget=widgets.RadioSelectHorizontal())
    price = models.FloatField()
    price_change = models.FloatField()
    choice_of_number_of_shares = models.PositiveIntegerField(max=1000)
    can_buy = models.PositiveIntegerField()

    def choice_of_number_of_shares_max(self):
        if self.wallet <= 0.0:
            return 0
        num_shares_that_can_be_bought = int(self.wallet / self.price)
        self.can_buy = min([num_shares_that_can_be_bought, 1000])
        return self.can_buy

    def old_share_price(self):
        if self.round_number > 1:
            tmp = '{}{}'.format(self.company_name, self.round_number - 1)
            return self.session.vars[tmp][0]
        else:
            return Constants.start_price

    def old_choice(self):
        if self.round_number == 1:
            return 0
        else:
            tmp = '{}{}'.format(self.company_name, self.round_number - 1)
            return self.session.vars[tmp][3]

    def old_num_shares(self):
        if self.round_number == 1:
            return 0
        else:
            tmp = '{}{}'.format(self.company_name, self.round_number - 1)
            return self.session.vars[tmp][4]

    def new_share_price(self):
        if self.round_number == 1:
            self.price = Constants.start_price
        else:
            price_change = 0.0

            # retrieve actions from previous round:
            tmp = '{}{}'.format(self.company_name, self.round_number - 1)
            previous_choice_of_trade = self.session.vars[tmp][3]
            previous_choice_of_number_of_shares = self.session.vars[tmp][4]

            # calculate price change and add up
            if previous_choice_of_trade == True:
                price_change += Constants.price_change_per_share * previous_choice_of_number_of_shares
            else:
                price_change -= Constants.price_change_per_share * previous_choice_of_number_of_shares
            self.price = self.old_share_price(
            ) + price_change * self.old_share_price()
        return self.price

    def update_wallet(self):
        if self.round_number == 1:
            self.wallet = Constants.start_wallet
        else:
            # retrieve actions from previous round:
            previous_price = self.in_round(self.round_number - 1).price
            previous_choice_of_number_of_shares = self.in_round(
                self.round_number - 1).choice_of_number_of_shares
            self.wallet = self.in_round(
                self.round_number - 1
            ).wallet - previous_price * previous_choice_of_number_of_shares
        return self.wallet

    def save_in_session_vars(self):
        tmp = '{}{}'.format(self.company_name, self.round_number)
        self.session.vars[tmp] = (self.price, self.id_in_group,
                                  self.drawn_face, self.choice_of_trade,
                                  self.choice_of_number_of_shares)
        if self.round_number == Constants.num_rounds:
            tmp1 = '{}{}'.format(self.company_name, Constants.num_rounds + 1)
            self.session.vars[tmp1] = self.closing_price(self.company_name)

    def closing_price(self, company):
        # retrieve actions from last trade:
        tmp = '{}{}'.format(company, Constants.num_rounds)
        tmp0 = self.session.vars[tmp][0]
        tmp3 = self.session.vars[tmp][3]
        tmp4 = self.session.vars[tmp][4]

        price_change = 0.0
        if tmp3 == True:
            price_change += Constants.price_change_per_share * tmp4
        else:
            price_change -= Constants.price_change_per_share * tmp4

        return tmp0 + price_change * tmp0

    def payoff(self):
        # the earnings are calculated after last round and stored in
        # in participant.vars and summed in self.payoff
        self.participant.vars['profit'] = []
        for idp, p in enumerate(self.in_all_rounds()):
            if p.choice_of_trade == True:
                self.participant.vars['profit'].append(
                    c((self.closing_price(p.company_name) - p.price) *
                      p.choice_of_number_of_shares))
            else:
                self.participant.vars['profit'].append(
                    c(-(self.closing_price(p.company_name) - p.price) *
                      p.choice_of_number_of_shares))
        self.payoff = sum(self.participant.vars['profit'])
        return self.participant.vars['profit']
Ejemplo n.º 30
0
class Player(BasePlayer):
    # 実験1のインストラクションは理解できましたか?5を理解できた、1を理解できなかったとして、5段階で評価してください。
    q_ex_11 = models.CharField(initial=None,
                              choices=['5', '4', '3', '2', '1'],
                              verbose_name='',
                              widget=widgets.RadioSelectHorizontal()
                              )
    # 実験1は何回目くらいから理解することができたか
    q_ex_12 = models.PositiveIntegerField(verbose_name='',
                                         choices=range(1, 6),
                                         initial=None,
                                         blank=True
                                         )

    # 実験1で、応募順位はどのように正直に申告しましたか?一番近いものを選んで下さい。
    q_ex_13 = models.CharField(verbose_name='',
                                         choices=['進学希望順位と同様にした', '自分の優先度が高い学類を上位にした', '他の参加者が選びそうな学類を上位にした','他の参加者が選らばなそうな学類を上位にした', 'その他'],
                                           widget=widgets.RadioSelectHorizontal(),
                                         initial=None,
                                         )

    # 他の学生の応募順位を予想しましたか?
    q_ex_14 = models.CharField(verbose_name='',
                                         choices=['予想した', '予想しなかった', '予想したときもあった'],
                                           widget=widgets.RadioSelectHorizontal(),
                                         initial=None,
                                         )

    # 実験2のインストラクションは理解できましたか?5を理解できた、1を理解できなかったとして、5段階で評価してください。
    q_ex_21 = models.CharField(initial=None,
                               choices=['5', '4', '3', '2', '1'],
                               verbose_name='',
                               widget=widgets.RadioSelectHorizontal()
                               )

    # 実験2は何回目くらいから理解することができたか
    q_ex_22 = models.PositiveIntegerField(verbose_name='',
                                         choices=range(1, 6),
                                         initial=None,
                                         blank=True
                                         )

    # 実験2で、応募順位はどのように正直に申告しましたか?一番近いものを選んで下さい。
    q_ex_23 = models.CharField(verbose_name='',
                                         choices=['進学希望順位と同様にした', '自分の優先度が高い学類を上位にした', '他の参加者が選びそうな学類を上位にした','他の参加者が選らばなそうな学類を上位にした', 'その他'],
                                         widget=widgets.RadioSelectHorizontal(),
                                         initial=None,
                                         )
    # 他の学生の応募順位を予想しましたか?
    q_ex_24 = models.CharField(verbose_name='',
                                         choices=['予想した', '予想しなかった', '予想したときもあった'],
                                           widget=widgets.RadioSelectHorizontal(),
                                         initial=None,
                                         )


    # 本実験ような配属決定において、あなたが一番重視する項目はなんですか?
    q_ex_7 = models.CharField(initial=None,
                              choices=['自分の学びたい分野ができる', '自分の好きな先生がいる', '友達と一緒になれる', '自分の成績ではいれる',
                                       '入学前から進学したかった学類', '単位取得が楽そう', 'その他'],
                              verbose_name='',
                              widget=widgets.RadioSelectHorizontal()
                              )

    # 性別
    q_gender = models.CharField(initial=None,
                                choices=['男', '女'],
                                verbose_name='',
                                widget=widgets.RadioSelectHorizontal()
                                )

    # DAメカニズムを知っていますか?
    q_da = models.CharField(verbose_name='',
                                       choices=['メカニズムの手順・性質を知っている','聞いたことがある', '知らない'],
                                        initial=None,
                                        widget=widgets.RadioSelectHorizontal()
                            )