def __init__(self, bidder_id, num_rounds, num_bidders, possible_types, type_dist, type_dist_disc): """ :param bidder_id: Integer. A unique identifier for this given agent. :param num_rounds: Integer. The number of rounds the auction this bidder is participating in will run for. :param num_bidders: Integer. The total number of bidders in the auction this bidder is participating in. :param possible_types: List. A list of all possible types the bidder can take. Types are arranged in increasing order. :param type_dist: List. Probabilities corresponding to each entry in possible_types. :param type_dist_disc: Boolean. True if type_dist is describing a discrete distribution. """ # Init will call make_state_space, but we need some more information before going through this process. MDPBidderUAI.__init__(self, bidder_id, num_rounds, num_bidders, possible_types, type_dist, type_dist_disc) self.num_price_samples = len(self.action_space) # Not used self.num_prices_for_state = len(self.action_space) - 1 state_price_delta = float(max(possible_types) - min(possible_types)) / self.num_prices_for_state self.prices_in_state = [i * state_price_delta for i in range(self.num_prices_for_state)] self.digit_precision = 2 # Learn values to this precision self.prices_in_state = set() self.state_space = set() self.terminal_states = set() self.action_space = set() self.use_given_pi = False self.given_pi = {}