def play_1(self): # P1/A - propose contract fixed_pay = random.choice(money_range(-self.subsession.max_fixed_payment, self.subsession.max_fixed_payment, 0.50)) return_share = random.choice([x/100.0 for x in range(10, 110, 10)]) time.sleep(sleep_seconds()) self.submit(views.Offer, {'agent_fixed_pay': fixed_pay, 'agent_return_share': return_share})
def play(self): # start self.submit(views.Introduction) # bid self.submit(views.Bid, {'bid_amount': random.choice(money_range(0, Constants.max_bid_amount))}) # results self.submit(views.Results)
def play(self): # compete price self.submit( views.Decide, { 'price': random.choice( money_range(self.subsession.marginal_cost, self.subsession.maximum_price, 0.05)) }) # results self.submit(views.Results)
def play_1(self): # P1/A - propose contract fixed_pay = random.choice( money_range(-self.subsession.max_fixed_payment, self.subsession.max_fixed_payment, 0.50)) return_share = random.choice([x / 100.0 for x in range(10, 110, 10)]) time.sleep(sleep_seconds()) self.submit(views.Offer, { 'agent_fixed_pay': fixed_pay, 'agent_return_share': return_share })
def play(self): # start self.submit(views.Introduction) # bid self.submit(views.Bid, { 'bid_amount': random.choice(money_range(0, Constants.max_bid_amount)) }) # results self.submit(views.Results)
def sp_choices(self): return money_range(0, self.cash, 0.5)
def bid_amount_choices(self): return money_range(self.subsession.min_allowable_bid, self.subsession.max_allowable_bid, 0.05)
def play(self): # compete price self.submit(views.Decide, {'price': random.choice(money_range(Constants.marginal_cost, Constants.maximum_price, 0.05))}) # results self.submit(views.Results)
def contribution_choices(self): return money_range(0, self.endowment, 1.00)
def agent_fixed_pay_choices(self): return money_range(-Constants.max_fixed_payment, Constants.max_fixed_payment, 0.50)
def bid_amount_choices(self): return money_range(Constants.min_allowable_bid, Constants.max_allowable_bid, 0.05)
def calculate_value(self): self.random_value = random.choice(money_range(0.00, 1.00))
def sent_back_amount_choices(self): """Range of allowed values during send back""" return money_range(0, self.sent_amount * 3, self.subsession.increment_amount)
def sent_amount_choices(self): """Range of allowed values during send""" return money_range(0, self.subsession.amount_allocated, self.subsession.increment_amount)
def request_amount_choices(self): """Range of allowed request amount""" return money_range(0, self.subsession.amount_shared, 0.05)
def claim_choices(self): """Range of allowed claim values""" return money_range(self.subsession.min_amount, self.subsession.max_amount, 0.05)
def bid_amount_choices(self): return money_range(0, Constants.max_bid_amount, 0.05)
def bid_amount_choices(self): return money_range(0, self.subsession.max_bid_amount, 0.05)
def contribution_choices(self): return money_range(0,self.subsession.endowment,1.00)
def offer_amount_choices(self): return money_range(0, self.subsession.allocated_amount, 0.05)
def offer_amount_choices(self): return money_range(0, Constants.allocated_amount, 0.05)
def price_choices(self): return money_range(Constants.marginal_cost, Constants.maximum_price, 0.05)
def price_choices(self): return money_range(self.subsession.marginal_cost, self.subsession.maximum_price, 0.05)
def agent_fixed_pay_choices(self): return money_range(-self.subsession.max_fixed_payment, self.subsession.max_fixed_payment, 0.50)