edu.cuny.cat.market.charging
Class MultiDayExploringMonitor

java.lang.Object
  extended by edu.cuny.cat.market.charging.TraderExploringMonitor
      extended by edu.cuny.cat.market.charging.MultiDayExploringMonitor
All Implemented Interfaces:
AuctionEventListener, edu.cuny.config.param.Parameterizable, edu.cuny.obj.Resetable

public class MultiDayExploringMonitor
extends TraderExploringMonitor
implements edu.cuny.obj.Resetable

a trader exploration monitor that decides based solely on the trader distribution among markets over a certain number of days.

Parameters

base.threshold
double (0.6 by default)
(a threshold value as a filter to decide whether traders are exploring or not)
base.windowsize
int > 0 (5 by default)
(the size of the sliding window in terms of number of game days)
base.learner
name of class, inheriting MimicryLearner
(type of learner used to update the exploring factor)

Default Base

multi_day_exploring_monitor

Version:
$Revision: 1.9 $
Author:
Jinzhong Niu

Field Summary
protected  edu.cuny.math.dist.CumulativeDistribution curDailyPopularities
          the distribution of traders on current day
static double DEFAULT_THRESHOLD
           
static int DEFAULT_WINDOW_SIZE
           
protected  double exploring
           
protected  edu.cuny.ai.learning.MimicryLearner learner
          estimate the exploring factor based on the history.
protected  java.util.Map<java.lang.String,edu.cuny.struct.FixedLengthQueue> multiDailyPopularities
          each specialist has a distribution, which tracks its popularity changes over the sliding window.
static java.lang.String P_DEF_BASE
           
static java.lang.String P_LEARNER
           
static java.lang.String P_THRESHOLD
           
static java.lang.String P_WINDOW_SIZE
           
protected  double threshold
          a threshold value to determine whether traders are exploring in general or not.
protected  int windowSize
          the number of consecutive days to observe to determine the level of exploration.
 
Constructor Summary
MultiDayExploringMonitor()
           
 
Method Summary
 void calculateExploring()
           
protected  void dayInitialize()
           
 void eventOccurred(AuctionEvent event)
           
protected  double getCurDailyExploringFactor()
           
 double getExploringFactor()
           
 double getExploringThreshold()
           
 int getWindowSize()
           
 boolean isExploring()
          tells whether traders are estimated to be exploring or not.
 void reset()
           
 void setExploringThreshold(double threshold)
           
 void setup(edu.cuny.config.param.ParameterDatabase parameters, edu.cuny.config.param.Parameter base)
           
 void setWindowSize(int windowSize)
           
 java.lang.String toString()
           
protected  void updateExploringFactor()
           
protected  void updateTraderRegistration(RegisteredTradersAnnouncedEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

P_DEF_BASE

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

P_THRESHOLD

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

P_WINDOW_SIZE

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

P_LEARNER

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

DEFAULT_THRESHOLD

public static final double DEFAULT_THRESHOLD
See Also:
Constant Field Values

DEFAULT_WINDOW_SIZE

public static final int DEFAULT_WINDOW_SIZE
See Also:
Constant Field Values

threshold

protected double threshold
a threshold value to determine whether traders are exploring in general or not.


exploring

protected double exploring

windowSize

protected int windowSize
the number of consecutive days to observe to determine the level of exploration.


curDailyPopularities

protected edu.cuny.math.dist.CumulativeDistribution curDailyPopularities
the distribution of traders on current day


learner

protected edu.cuny.ai.learning.MimicryLearner learner
estimate the exploring factor based on the history.


multiDailyPopularities

protected java.util.Map<java.lang.String,edu.cuny.struct.FixedLengthQueue> multiDailyPopularities
each specialist has a distribution, which tracks its popularity changes over the sliding window.

Constructor Detail

MultiDayExploringMonitor

public MultiDayExploringMonitor()
Method Detail

setup

public void setup(edu.cuny.config.param.ParameterDatabase parameters,
                  edu.cuny.config.param.Parameter base)
Specified by:
setup in interface edu.cuny.config.param.Parameterizable
Specified by:
setup in class TraderExploringMonitor

reset

public void reset()
Specified by:
reset in interface edu.cuny.obj.Resetable

dayInitialize

protected void dayInitialize()

isExploring

public boolean isExploring()
Description copied from class: TraderExploringMonitor
tells whether traders are estimated to be exploring or not.

Specified by:
isExploring in class TraderExploringMonitor
Returns:
true if traders are exploring; false otherwise

getExploringFactor

public double getExploringFactor()
Specified by:
getExploringFactor in class TraderExploringMonitor
Returns:
a numeric value telling the level of traders' exploration.

calculateExploring

public void calculateExploring()

getWindowSize

public int getWindowSize()

setWindowSize

public void setWindowSize(int windowSize)

getExploringThreshold

public double getExploringThreshold()

setExploringThreshold

public void setExploringThreshold(double threshold)

updateTraderRegistration

protected void updateTraderRegistration(RegisteredTradersAnnouncedEvent event)

updateExploringFactor

protected void updateExploringFactor()

getCurDailyExploringFactor

protected double getCurDailyExploringFactor()

eventOccurred

public void eventOccurred(AuctionEvent event)
Specified by:
eventOccurred in interface AuctionEventListener
Specified by:
eventOccurred in class TraderExploringMonitor

toString

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