edu.cuny.tac.aa.strategy
Class BiddingStrategy

java.lang.Object
  extended by edu.cuny.tac.aa.GameInfo
      extended by edu.cuny.tac.aa.strategy.BiddingStrategy
All Implemented Interfaces:
edu.cuny.util.Parameterizable
Direct Known Subclasses:
CyclicBiddingStrategy, GenericBiddingStrategy

public abstract class BiddingStrategy
extends GameInfo
implements edu.cuny.util.Parameterizable

Version:
$Revision: 1 $
Author:
Jinzhong Niu

Field Summary
protected  edu.umich.eecs.tac.props.AdvertiserInfo advertiserInfo
          The basic advertiser specific information.
protected  edu.umich.eecs.tac.props.BankStatus bankStatus
          daily bank status.
protected  java.util.Map<java.lang.Integer,edu.umich.eecs.tac.props.BidBundle> bidBundles
           
protected  double constraintEffect
           
protected  edu.cuny.util.FixedLengthQueue conversionsInCapacityWindow
           
protected  java.util.Map<java.lang.Integer,DailyRecord> dailyRecords
           
protected  int day
          the game day
protected  int game
          the game id
protected static org.apache.log4j.Logger logger
           
static java.lang.String P_DEF_BASE
           
protected  edu.umich.eecs.tac.props.PublisherInfo publisherInfo
          The basic publisher information.
protected  edu.umich.eecs.tac.props.QueryReport queryReport
          daily query report.
protected  java.util.Map<java.lang.Integer,edu.umich.eecs.tac.props.QueryReport> queryReports
          The map contains all of the daily query reports delivered to the agent.
protected  java.util.Set<edu.umich.eecs.tac.props.Query> querySpace
          a set of all the possible queries made available in the retail catalog.
protected  edu.umich.eecs.tac.props.RetailCatalog retailCatalog
          The retail catalog.
protected  edu.umich.eecs.tac.props.SalesReport salesReport
          daily sales report.
protected  java.util.Map<java.lang.Integer,edu.umich.eecs.tac.props.SalesReport> salesReports
          The list contains all of the sales report delivered to the agent.
protected  edu.umich.eecs.tac.props.SlotInfo slotInfo
          Basic auction slot information.
protected  edu.umich.eecs.tac.props.Product specialty
          The product on which the advertiser specializes.
protected  se.sics.tasim.props.StartInfo startInfo
          Certain info about the game.
protected  java.util.Map<java.lang.Integer,edu.umich.eecs.tac.props.BidBundle> valueBundles
           
 
Fields inherited from class edu.cuny.tac.aa.GameInfo
BL, CAPACITY, CLICKS, COMPONENT, COMPONENT_NAMES, CONVERSIONS, COST, CPC, CTR, CVR, DAY_DIFF, DV, ERROR, Formatter, GAME_LENGTH, HIGH_CAPACITY, IMPRESSIONS, INCOME, INDIV_POPULATION_SIZE, LIMIT, LOW_CAPACITY, MANUFACTURER, MANUFACTURER_NAMES, MED_CAPACITY, NUM_OF_COMPONENTS, NUM_OF_MANUFACTURERS, NUM_OF_PRODUCTS, NUM_OF_USER_STAETS, P_AA, POSITION, PR_BST_NStoIS, PR_BST_NStoNS, PR_BURST, PR_F0toF0, PR_F0toF1, PR_F0toNS, PR_F1toF1, PR_F1toF2, PR_F1toNS, PR_F2toF2, PR_F2toNS, PR_IStoF0, PR_IStoF1, PR_IStoF2, PR_IStoIS, PR_IStoNS, PR_STD_NStoIS, PR_STD_NStoNS, PR_TtoNS, PR_TtoT, PROFIT_RATE, PROFIT_UNIT_RATE, PROMOTED, PROMOTED_IMPRESSIONS, REGULAR, REGULAR_IMPRESSIONS, REVENUE, USER_STATE_NAMES, USP
 
Constructor Summary
BiddingStrategy()
           
 
Method Summary
 edu.umich.eecs.tac.props.BidBundle calculateBidBundle()
           
protected  DailyRecord createDailyRecord(int recordDay, edu.umich.eecs.tac.props.SalesReport salesReport, edu.umich.eecs.tac.props.QueryReport queryReport, edu.umich.eecs.tac.props.BidBundle bidBundle, edu.umich.eecs.tac.props.BidBundle valueBundle)
           
protected  void displayDailyReport()
          display sales and query reports for day n-1.
protected  void displayGameReport()
          display sales and query reports for the whole game
 void endOfDay()
          this method is called by the bidding agent to notify the end of a day.
 double estimateCapacityConstraintEffect()
           
 double estimateCVR(edu.umich.eecs.tac.props.Query query, double constraintEffect)
          estimates the conversion rate of a click caused by the query.
 double estimateUSP(edu.umich.eecs.tac.props.Query query)
          estimates the unit sales revenue of a conversion caused by the query.
 double estimateValue(edu.umich.eecs.tac.props.Query query, double constraintEffect)
          estimates the value of the query with a given distribution capacity constraint effect.
 edu.umich.eecs.tac.props.BidBundle estimateValues()
           
 edu.umich.eecs.tac.props.AdvertiserInfo getAdvertiserInfo()
           
 edu.umich.eecs.tac.props.BankStatus getBankStatus()
           
 double getConstraintEffect()
           
 java.util.Map<java.lang.Integer,DailyRecord> getDailyRecords()
           
 int getDay()
           
 edu.umich.eecs.tac.props.PublisherInfo getPublisherInfo()
           
 java.util.Set<edu.umich.eecs.tac.props.Query> getQuerySpace()
           
 edu.umich.eecs.tac.props.RetailCatalog getRetailCatalog()
           
 edu.umich.eecs.tac.props.SlotInfo getSlotInfo()
           
 edu.umich.eecs.tac.props.Product getSpecialty()
           
 se.sics.tasim.props.StartInfo getStartInfo()
           
 void handleAdvertiserInfo(edu.umich.eecs.tac.props.AdvertiserInfo advertiserInfo)
          Processes the advertiser information.
 void handleBankStatus(edu.umich.eecs.tac.props.BankStatus bankStatus)
           
 void handlePublisherInfo(edu.umich.eecs.tac.props.PublisherInfo publisherInfo)
          Processes the publisher information.
 void handleQueryReport(edu.umich.eecs.tac.props.QueryReport queryReport)
          Processes an incoming query report.
 void handleRetailCatalog(edu.umich.eecs.tac.props.RetailCatalog retailCatalog)
          Processes the retail catalog and initialize the query space.
 void handleSalesReport(edu.umich.eecs.tac.props.SalesReport salesReport)
          Processes an incoming sales report.
 void handleSimulationStatus(se.sics.tasim.props.SimulationStatus simulationStatus)
          Processes a simulation status notification.
 void handleSlotInfo(edu.umich.eecs.tac.props.SlotInfo slotInfo)
          Processrs the slot information.
 void handleStartInfo(se.sics.tasim.props.StartInfo startInfo)
          Processes the start information, which indicates the start of a game.
 boolean isComponentSpecialty(edu.umich.eecs.tac.props.Query query)
           
 boolean isLastDayBidding()
           
 boolean isManufacturerSpecialty(edu.umich.eecs.tac.props.Query query)
           
 boolean isSpecialty(edu.umich.eecs.tac.props.Query query)
           
 void messageReceived(se.sics.tasim.aw.Message message)
           
protected abstract  edu.umich.eecs.tac.props.BidBundle prepareBidBundle(edu.umich.eecs.tac.props.BidBundle valueBundle)
           
 void setAdvertiserInfo(edu.umich.eecs.tac.props.AdvertiserInfo advertiserInfo)
           
 void setBankStatus(edu.umich.eecs.tac.props.BankStatus bankStatus)
           
 void setConstraintEffect(double constraintEffect)
           
 void setDailyRecords(java.util.Map<java.lang.Integer,DailyRecord> dailyRecords)
           
 void setPublisherInfo(edu.umich.eecs.tac.props.PublisherInfo publisherInfo)
           
 void setQuerySpace(java.util.Set<edu.umich.eecs.tac.props.Query> querySpace)
           
 void setRetailCatalog(edu.umich.eecs.tac.props.RetailCatalog retailCatalog)
           
 void setSlotInfo(edu.umich.eecs.tac.props.SlotInfo slotInfo)
           
 void setSpecialty(edu.umich.eecs.tac.props.Product specialty)
           
 void setStartInfo(se.sics.tasim.props.StartInfo startInfo)
           
 void setup(edu.cuny.util.ParameterDatabase parameters, edu.cuny.util.Parameter base)
           
 void simulationFinished()
           
 void simulationSetup()
           
 java.lang.String toString()
           
 
Methods inherited from class edu.cuny.tac.aa.GameInfo
isHighCapacity, isLowCapacity, isMedCapacity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger

P_DEF_BASE

public static final java.lang.String P_DEF_BASE
See Also:
Constant Field Values

startInfo

protected se.sics.tasim.props.StartInfo startInfo
Certain info about the game.


slotInfo

protected edu.umich.eecs.tac.props.SlotInfo slotInfo
Basic auction slot information. SlotInfo contains An agent should receive the SlotInfo at the beginning of the game or during recovery. This information is identical for all auctions over all query classes.


retailCatalog

protected edu.umich.eecs.tac.props.RetailCatalog retailCatalog
The retail catalog. RetailCatalog contains An agent should receive the RetailCatalog at the beginning of the game or during recovery.


advertiserInfo

protected edu.umich.eecs.tac.props.AdvertiserInfo advertiserInfo
The basic advertiser specific information. AdvertiserInfo contains An agent should receive the AdvertiserInfo at the beginning of the game or during recovery.


publisherInfo

protected edu.umich.eecs.tac.props.PublisherInfo publisherInfo
The basic publisher information. PublisherInfo contains An agent should receive the PublisherInfo at the beginning of the game or during recovery.


bankStatus

protected edu.umich.eecs.tac.props.BankStatus bankStatus
daily bank status.


salesReport

protected edu.umich.eecs.tac.props.SalesReport salesReport
daily sales report.


queryReport

protected edu.umich.eecs.tac.props.QueryReport queryReport
daily query report.


salesReports

protected java.util.Map<java.lang.Integer,edu.umich.eecs.tac.props.SalesReport> salesReports
The list contains all of the sales report delivered to the agent. Each sales report contains the conversions and sales revenue accrued by the agent for each query class during the period.


queryReports

protected java.util.Map<java.lang.Integer,edu.umich.eecs.tac.props.QueryReport> queryReports
The map contains all of the daily query reports delivered to the agent. Each query report contains the impressions, clicks, cost, average position, and ad displayed by the agent for each query class during the period as well as the positions and displayed ads of all advertisers during the period for each query class.


bidBundles

protected java.util.Map<java.lang.Integer,edu.umich.eecs.tac.props.BidBundle> bidBundles

valueBundles

protected java.util.Map<java.lang.Integer,edu.umich.eecs.tac.props.BidBundle> valueBundles

dailyRecords

protected java.util.Map<java.lang.Integer,DailyRecord> dailyRecords

querySpace

protected java.util.Set<edu.umich.eecs.tac.props.Query> querySpace
a set of all the possible queries made available in the retail catalog.


specialty

protected edu.umich.eecs.tac.props.Product specialty
The product on which the advertiser specializes.


constraintEffect

protected double constraintEffect

day

protected int day
the game day


game

protected int game
the game id


conversionsInCapacityWindow

protected edu.cuny.util.FixedLengthQueue conversionsInCapacityWindow
Constructor Detail

BiddingStrategy

public BiddingStrategy()
Method Detail

setup

public void setup(edu.cuny.util.ParameterDatabase parameters,
                  edu.cuny.util.Parameter base)
Specified by:
setup in interface edu.cuny.util.Parameterizable

getStartInfo

public se.sics.tasim.props.StartInfo getStartInfo()

setStartInfo

public void setStartInfo(se.sics.tasim.props.StartInfo startInfo)

getSlotInfo

public edu.umich.eecs.tac.props.SlotInfo getSlotInfo()

setSlotInfo

public void setSlotInfo(edu.umich.eecs.tac.props.SlotInfo slotInfo)

getRetailCatalog

public edu.umich.eecs.tac.props.RetailCatalog getRetailCatalog()

setRetailCatalog

public void setRetailCatalog(edu.umich.eecs.tac.props.RetailCatalog retailCatalog)

getAdvertiserInfo

public edu.umich.eecs.tac.props.AdvertiserInfo getAdvertiserInfo()

setAdvertiserInfo

public void setAdvertiserInfo(edu.umich.eecs.tac.props.AdvertiserInfo advertiserInfo)

getPublisherInfo

public edu.umich.eecs.tac.props.PublisherInfo getPublisherInfo()

setPublisherInfo

public void setPublisherInfo(edu.umich.eecs.tac.props.PublisherInfo publisherInfo)

getQuerySpace

public java.util.Set<edu.umich.eecs.tac.props.Query> getQuerySpace()

setQuerySpace

public void setQuerySpace(java.util.Set<edu.umich.eecs.tac.props.Query> querySpace)

getBankStatus

public edu.umich.eecs.tac.props.BankStatus getBankStatus()

setBankStatus

public void setBankStatus(edu.umich.eecs.tac.props.BankStatus bankStatus)

getSpecialty

public edu.umich.eecs.tac.props.Product getSpecialty()

setSpecialty

public void setSpecialty(edu.umich.eecs.tac.props.Product specialty)

getConstraintEffect

public double getConstraintEffect()

setConstraintEffect

public void setConstraintEffect(double constraintEffect)

getDailyRecords

public java.util.Map<java.lang.Integer,DailyRecord> getDailyRecords()

setDailyRecords

public void setDailyRecords(java.util.Map<java.lang.Integer,DailyRecord> dailyRecords)

getDay

public int getDay()

isLastDayBidding

public boolean isLastDayBidding()

simulationSetup

public void simulationSetup()

simulationFinished

public void simulationFinished()

messageReceived

public void messageReceived(se.sics.tasim.aw.Message message)

handleStartInfo

public void handleStartInfo(se.sics.tasim.props.StartInfo startInfo)
Processes the start information, which indicates the start of a game.

Parameters:
startInfo - the start information.

handleSlotInfo

public void handleSlotInfo(edu.umich.eecs.tac.props.SlotInfo slotInfo)
Processrs the slot information.

Parameters:
slotInfo - the slot information.

handleRetailCatalog

public void handleRetailCatalog(edu.umich.eecs.tac.props.RetailCatalog retailCatalog)
Processes the retail catalog and initialize the query space.

Parameters:
retailCatalog - the retail catalog.

handlePublisherInfo

public void handlePublisherInfo(edu.umich.eecs.tac.props.PublisherInfo publisherInfo)
Processes the publisher information.

Parameters:
publisherInfo - the publisher information.

handleAdvertiserInfo

public void handleAdvertiserInfo(edu.umich.eecs.tac.props.AdvertiserInfo advertiserInfo)
Processes the advertiser information.

Parameters:
advertiserInfo - the advertiser information.

isSpecialty

public boolean isSpecialty(edu.umich.eecs.tac.props.Query query)

isManufacturerSpecialty

public boolean isManufacturerSpecialty(edu.umich.eecs.tac.props.Query query)

isComponentSpecialty

public boolean isComponentSpecialty(edu.umich.eecs.tac.props.Query query)

handleBankStatus

public void handleBankStatus(edu.umich.eecs.tac.props.BankStatus bankStatus)

handleSalesReport

public void handleSalesReport(edu.umich.eecs.tac.props.SalesReport salesReport)
Processes an incoming sales report.

Parameters:
salesReport - the daily sales report.

handleQueryReport

public void handleQueryReport(edu.umich.eecs.tac.props.QueryReport queryReport)
Processes an incoming query report.

Parameters:
queryReport - the daily query report.

handleSimulationStatus

public void handleSimulationStatus(se.sics.tasim.props.SimulationStatus simulationStatus)
Processes a simulation status notification. Each simulation day the simulation status notification is sent after the other daily messages (QueryReport SalesReport have been sent.

Parameters:
simulationStatus - the daily simulation status.

endOfDay

public void endOfDay()
this method is called by the bidding agent to notify the end of a day.


createDailyRecord

protected DailyRecord createDailyRecord(int recordDay,
                                        edu.umich.eecs.tac.props.SalesReport salesReport,
                                        edu.umich.eecs.tac.props.QueryReport queryReport,
                                        edu.umich.eecs.tac.props.BidBundle bidBundle,
                                        edu.umich.eecs.tac.props.BidBundle valueBundle)

displayDailyReport

protected void displayDailyReport()
display sales and query reports for day n-1.


displayGameReport

protected void displayGameReport()
display sales and query reports for the whole game


calculateBidBundle

public edu.umich.eecs.tac.props.BidBundle calculateBidBundle()

prepareBidBundle

protected abstract edu.umich.eecs.tac.props.BidBundle prepareBidBundle(edu.umich.eecs.tac.props.BidBundle valueBundle)
Returns:
the bids for the coming day

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

estimateValues

public edu.umich.eecs.tac.props.BidBundle estimateValues()
Returns:
the estimated values of all types of queries.
See Also:
estimateValue(Query, double)

estimateValue

public double estimateValue(edu.umich.eecs.tac.props.Query query,
                            double constraintEffect)
estimates the value of the query with a given distribution capacity constraint effect.

Parameters:
query -
constraintEffect -
Returns:
the estimated value of the query.
See Also:
estimateValues()

estimateUSP

public double estimateUSP(edu.umich.eecs.tac.props.Query query)
estimates the unit sales revenue of a conversion caused by the query.

Parameters:
query -
Returns:
the estimated unit sales revenue.

estimateCVR

public double estimateCVR(edu.umich.eecs.tac.props.Query query,
                          double constraintEffect)
estimates the conversion rate of a click caused by the query.

Parameters:
query -
constraintEffect - E.g., Id, which is used to adjust conversion rate.
Returns:
conversion rate.

estimateCapacityConstraintEffect

public double estimateCapacityConstraintEffect()
Returns:
the estimated distribution capacity constraint effect, e.g., Id.