Learning by bidding