bnelearn.mechanism.auctions_multiunit module

Auction mechanism for multi-unit auctions (where objects are homogeneous).

class bnelearn.mechanism.auctions_multiunit.FPSBSplitAwardAuction(cuda: bool = True, smoothing_temperature: Optional[float] = None)[source]

Bases: MultiUnitAuction

First-price sealed-bid split-award auction: Multiple agents bidding for either 100% of the share or 50%.

We define a bids as torch.Tensor with dimensions (*batch_sizes, n_players, n_bids=2), where the first bid is for the 50% share and the second for the 100% share.

run(bids: Tensor) Tuple[Tensor, Tensor][source]

Performs a batch of split-award auction rounds.

Args:
bids: torch.Tensor

of bids with dimensions (*batch_sizes, n_players, n_items=2); first entry of n_items dim corresponds to bid for 50% lot, second entry to bid for 100% lot, etc.

Returns:
(allocation, payments): Tuple[torch.Tensor, torch.Tensor]
allocation: tensor of dimension (*n_batches x n_players x 2),

1 indicating item is allocated to corresponding player in that batch, 0 otherwise.

payments: tensor of dimension (*n_batches x n_players);

total payment from player to auctioneer for her allocation in that batch.

class bnelearn.mechanism.auctions_multiunit.MultiUnitAuction(cuda: bool = True, smoothing_temperature: Optional[float] = None)[source]

Bases: Mechanism

Class for multi-unit auctions where multiple identical items (so called units) are for sale. Agents thus don’t care about winning item no. x or no. y, as they’re homogeneous.

class bnelearn.mechanism.auctions_multiunit.MultiUnitDiscriminatoryAuction(cuda: bool = True, smoothing_temperature: Optional[float] = None)[source]

Bases: MultiUnitAuction

Multi item discriminatory auction. Units are allocated to the highest n_item bids, winners pay as bid.

Bids of each bidder must be in decreasing order, otherwise the mechanism does not accept these bids and allocates no units to this bidder.

run(bids: Tensor) Tuple[Tensor, Tensor][source]

Runs a (batch of) multi item discriminatory auction(s). Invalid bids (i.e. in increasing order) will be ignored (-> no allocation to that bidder), s.t. the bidder might be able to “learn” the right behavior.

Args:
bids: torch.Tensor

of bids with dimensions (*batch_sizes, n_players, n_items); first entry of n_items dim corresponds to bid of first unit, second entry to bid of second unit, etc.

Returns:
(allocation, payments): Tuple[torch.Tensor, torch.Tensor]
allocation: tensor of dimension (n_batches x n_players x

n_items), 1 indicating item is allocated to corresponding player in that batch, 0 otherwise.

payments: tensor of dimension (n_batches x n_players);

total payment from player to auctioneer for her allocation in that batch.

class bnelearn.mechanism.auctions_multiunit.MultiUnitUniformPriceAuction(cuda: bool = True, smoothing_temperature: Optional[float] = None)[source]

Bases: MultiUnitAuction

In a uniform-price auction, all units are sold at a “market-clearing” price such that the total amount demanded is equal to the total amount supplied. We adopt the rule that the market-clearing price is the same as the highest losing bid.

Bids of each bidder must be in decreasing order, otherwise the mechanism does not accept these bids and allocates no units to this bidder.

run(bids: Tensor) Tuple[Tensor, Tensor][source]

Runs a (batch of) Multi Unit Uniform-Price Auction(s). Invalid bids (i.e. in increasing order) will be ignored (-> no allocation to that bidder), s.t. the bidder might be able to “learn” the right behavior.

Args:
bids: torch.Tensor

of bids with dimensions (*batch_sizes, n_players, n_items); first entry of n_items dim corresponds to bid of first unit, second entry to bid of second unit, etc.

Returns:
(allocation, payments): Tuple[torch.Tensor, torch.Tensor]
allocation: tensor of dimension (n_batches x n_players x

n_items), 1 indicating item is allocated to corresponding player in that batch, 0 otherwise.

payments: tensor of dimension (n_batches x n_players);

total payment from player to auctioneer for her allocation in that batch.

class bnelearn.mechanism.auctions_multiunit.MultiUnitVickreyAuction(cuda: bool = True, smoothing_temperature: Optional[float] = None)[source]

Bases: MultiUnitAuction

In a Vickrey auction, a bidder who wins k units pays the k highest losing bids of the other bidders.

Bids of each bidder must be in decreasing order, otherwise the mechanism does not accept these bids and allocates no units to this bidder.

run(bids: Tensor) Tuple[Tensor, Tensor][source]

Runs a (batch of) Multi Unit Vickrey Auction(s). Invalid bids (i.e. in increasing order) will be ignored (-> no allocation to that bidder), s.t. the bidder might be able to “learn” the right behavior.

Args:
bids: torch.Tensor

of bids with dimensions (*batch_sizes, n_players, n_items); first entry of n_items dim corresponds to bid of first unit, second entry to bid of second unit, etc.

Returns:
(allocation, payments): Tuple[torch.Tensor, torch.Tensor]
allocation: tensor of dimension (n_batches x n_players x

n_items), 1 indicating item is allocated to corresponding player in that batch, 0 otherwise.

payments: tensor of dimension (n_batches x n_players);

total payment from player to auctioneer for her allocation in that batch.