from pylab import *
English auctions:
English auctions are the kind of auctions we are most familiar with.
Private Value Model:
How is the value of the item determined?
(Remember: $V \sim G(\mu,\sigma)$ means that the random variable $V$ is distributed with a Gaussian with parameters $\mu$ and $\sigma$.)
Profit:
The profit of every participant over time is the difference of:
Here is the auction protocol:
giveEstimate
with an estimate of the private valuestartBidding
with the number of participantssolicitBid(last,incr)
for each bidder in a randomly permuted orderlast
is the last bid, incr
is the required increment>=last+bid
announce(amount,bidder)
# simple bidder
class Bidder:
def __init__(self):
self.value = 0
self.balance = 0
def gain(self):
return self.value+self.balance
def giveEstimate(self,estimate):
# called before bidding to inform the bidder of the estimate
def startBidding(self,n):
# starts the bidding and informs the bidder of the number of participants
def announce(self,bid,bidder):
# announces a bid received from some participant (including this one)
def solicitBid(self,last,incr):
# called by the auctioneer to solicit a bid from this bidder
File "<ipython-input-2-935d8ee8ff65>", line 10 def startBidding(self,n): ^ IndentationError: expected an indented block
# auctioneer for an English auction
class Auctioneer:
def __init__(self,participants,mu=100.0,sigma=20.0,psigma=0.0,uncertainty=10.0,increment=1.0):
"""mu,sigma: base value distribution, psigma: sigma of private value distribution
relative to base value, uncertainty: standard deviation of estimate relative
to private value, increment: minimum bid increment"""
raise Exception("unimplemented")
def auction(self,verbose=0):
# implement the auction protocol
raise Exception("unimplemented")
def gains(self,N=100):
for i in range(N): self.auction()
return tuple([p.gain()/N for p in self.participants])
EXERCISE 1 Complete the implementations of the Bidder
and Auctioneer
classes to implement an English auction. Demonstrate that your implementation works correctly. Your default bidder should bid up to a fraction (given as a parameter, its strategy) of its estimate of its private value.
EXERCISE 2 Use your implementation of the English auction to show that the winning bid is approximately equal to the private value of the second highest bidder, assuming a complete private value auction.
EXERCISE 3 Write a smarter version of Bidder
that works for the default parameters used in the Auctioneer
class above to outperform any Bidder
that bids a fixed percentage of its estimated private value.