shangwyoung / Space_Station_Auction

WT 2016
2 stars 0 forks source link

BiddingAgent Class #2

Closed shangwyoung closed 8 years ago

shangwyoung commented 8 years ago

Participants will be asked to define a subclass of a general biddingAgent class that implements the following functions:

getName(), getColor():

Lets an agent pick the string/color they’ll use for their name for display purposes

init(cards, id, players, budget) [5 second time limit]

This function is called once per agent at the start of a contest to let the agents know the details of the contest, and to let the agents do any pre-processing they might want to do. The function is passed the list of all cards to be auctioned, an integer ID number, the total number of players, and an integer starting budget. Each card is in the format given above, and appears in the order it will be auctioned off. The ID number is your agents index, which will be important for interpreting the results of each auction. And the budget is how much you start with. Agents need to keep track of their own budget.

getBid(card, index) [0.1 second time limit]

This function is passed a card and an integer indicating the index of that card in the auction. It should return an integer bid b at least 0, and at most your remaining budget. Your agent is responsible for keeping track of your remaining budget. Invalid bids will be automatically set to 0.

seeResults(card, winner, price, bids) [0.1 second time limit]

This function is used by the system to inform your agent on the results of each auction. In particular, it indicates that agent won card and will pay . The list contains all bids made by all agents, ordered by agent IDs. You'll want to update your budget here in the event that you were the winner, but you may also wish to record other information, such as the sale price of the card, the bids of other agents, or the current category scores of other agents.

nickmusic commented 8 years ago

Is the init method supposed to correspond to the constructor?

shangwyoung commented 8 years ago

Yes, i believe so. Maybe Tom @tbwexler can confirm that?

tbwexler commented 8 years ago

Certainly passing that info to a constructor is reasonable approach. I suggested an init function to initialize a new auction without reconstructing the agent so that if we had a series of auctions, the agent could learn from one to the next. But we can always start under the assumption that typically there will be a single auction, and have that info passed to the constructor. If we decide later on to support additional auctions we can add another function.

cheers, tom

On Jan 8, 2016, at 4:05 AM, Aaron Young notifications@github.com wrote:

Yes, i believe so. Maybe Tom @tbwexler https://github.com/tbwexler can confirm that?

— Reply to this email directly or view it on GitHub https://github.com/aarony422/Space_Station_Auction/issues/2#issuecomment-169940058.

tbwexler commented 8 years ago

Certainly passing that info to a constructor is reasonable approach. I suggested an init function to initialize a new auction without reconstructing the agent so that if we had a series of auctions, the agent could learn from one to the next. But we can always start under the assumption that typically there will be a single auction, and have that info passed to the constructor. If we decide later on to support additional auctions we can add another function.

cheers, tom

On Jan 8, 2016, at 4:05 AM, Aaron Young notifications@github.com wrote:

Yes, i believe so. Maybe Tom @tbwexler https://github.com/tbwexler can confirm that?

— Reply to this email directly or view it on GitHub https://github.com/aarony422/Space_Station_Auction/issues/2#issuecomment-169940058 .