Esempio n. 1
0
plt.style.use('ggplot')
plt.switch_backend('agg')

num_repetitions = 30
winexp = []
exp3 = []
min_num_rounds = 0
max_num_rounds = 5000
step = 5
num_adaptive = 4
rounds = [T for T in range(min_num_rounds, max_num_rounds)]

#initialize the bidders once for the maximum number of rounds
T = max_num_rounds
(num_bidders, num_slots, outcome_space, rank_scores, ctr, reserve, values,
 threshold, noise) = set_auction_params(T, num_repetitions)
# bids of the "adversaries" are considered fixed
# bids size now: num_auctions x T x num_bidders
bids = []
for t in range(0, T):
    bids.append([np.random.uniform(0, 1) for i in range(0, num_bidders)])

# Preferred Discretizations for the learner
epsilon = 0.01

bidder_winexp = [[
    Bidder(i, epsilon, T, outcome_space, num_repetitions)
    for i in range(0, num_adaptive)
] for _ in range(0, num_repetitions)]
bidder_exp3 = [[
    Bidder(i, epsilon, T, outcome_space, num_repetitions)
Esempio n. 2
0
winexp = [] 
exp3 = []
min_num_rounds = 0
max_num_rounds = 5000
num_adaptive = 4
step = 1
rounds = [T for T in range(min_num_rounds,max_num_rounds, step)]
matplotlib.rcParams.update({'font.size': 17})
fig = plt.figure()
fig.set_figheight(10)
fig.set_figwidth(10)
plt.figure(1,figsize=(10,10))

#initialize the bidders once for the maximum number of rounds 
T = max_num_rounds
(num_bidders, num_slots, outcome_space, rank_scores, ctr, reserve, values,threshold,noise) = set_auction_params(T,num_repetitions)
# bids of the "adversaries" are considered fixed
# bids size now: num_auctions x T x num_bidders
bids = [] 
for t in range(0,T):
    bids.append([np.random.uniform(0,1) for i in range(0,num_bidders)])


eps_list = [0.001, 0.01, 0.1]
for epsilon in eps_list:
    bidder_winexp = [[Bidder(i, epsilon, T, outcome_space, num_repetitions) for i in range(0,num_adaptive)] for _ in range(0,num_repetitions)]
    bidder_exp3   = [[Bidder(i, epsilon, T, outcome_space, num_repetitions) for i in range(0,num_adaptive)] for _ in range(0,num_repetitions)]


    # Preferred Discretizations for the learner
    cpy1 = deepcopy(bids)