net.commerce.zocalo.experiment
Class JudgingSession

java.lang.Object
  extended by net.commerce.zocalo.experiment.Session
      extended by net.commerce.zocalo.experiment.JudgingSession

public class JudgingSession
extends Session

supports experiments in which one set of subjects doesn't trade, and is responsible for guessing the value of the traded commodity on the basis of the trading history.


Field Summary
static java.util.TimerTask DEAD_TASK
           
 
Fields inherited from class net.commerce.zocalo.experiment.Session
chartScale, END_SCORING_TRANSITION, END_TRADING_TRANSITION, majorUnit, minorUnit, props
 
Constructor Summary
JudgingSession(java.util.Properties props, org.mortbay.cometd.AbstractBayeux bayeux)
           
 
Method Summary
protected  Quantity bookFundingRequired(java.util.Properties props)
           
protected  void calculateScores(Price average)
           
 boolean cuttingOffJudges()
           
protected  java.lang.String[] endowedRoles()
           
 void endScoringPhase()
           
 java.lang.String[] experimenterButtons()
           
 java.lang.String getEstimatesHtml()
           
 java.lang.String getEstimateSliderLabel()
           
 Judge getJudgeOrNull(java.lang.String userName)
           
 Quantity getJudgingTarget(int round)
           
 Price getMedianJudgedValue(int round)
           
 java.lang.String getSliderFeedbackLabel()
           
 int getSliderInputStepSize()
           
 int getSliderLabelStepSize()
           
 void ifJudging(JudgingStatusAdaptor ifJudging)
           
protected  java.util.HashMap<java.lang.String,Role> initializeRoles(java.util.Properties props)
           
 Quantity initialManipulatorTickets()
           
 Price judgedValue(int round)
           
 java.lang.String judgeInputChoiceList()
           
 java.lang.String judgeRewardsTable()
           
protected  void logSessionInitialization()
           
static boolean nonTradersPresent(java.util.Properties props)
           
 java.lang.String showEarningsSummary(java.lang.String userName)
           
 java.lang.String stateSpecificDisplay()
           
 
Methods inherited from class net.commerce.zocalo.experiment.Session
aboveThresholdMessage, accrueDividendsAndBonuses, appendToErrorMessage, basicRoleForSession, belowThresholdMessage, buildDormantArray, calculateEarnings, calculateScores, cannotStartRoundMessage, closeSessionAppenders, endSession, endTrading, endTradingLabel, eventOutcome, findSessionReplaceRoundString, getChartScale, getClaim, getCommonMessageLabel, getCurrentRound, getDividend, getDividend, getEarningsHint, getErrorMessage, getLogoPath, getMajorUnit, getMarket, getMessageLabel, getMinorUnit, getPayDividend, getPhase, getPlayer, getPriceHint, getPrivateDividend, getRemainingDividend, getRoundLabel, getRoundLabelOrDefault, getShareLimit, getSharesLabel, getShowEarnings, getTradeHistory, getTrader, getTraders, getUserOrNull, ifScoring, ifTrading, initialTraderTickets, isCarryForward, lastRound, lastTradeValue, logCommonMessages, logEvent, logFileLinks, logParameterCombinations, logTransitionEvent, make, marketIsActive, marketPrice, maxPrice, message, message, playerNameIterator, playerNameSortedIterator, privateDividendsInUse, provideCash, recordScoreExplanation, renderScore, replaceRoundString, reservesAreRequired, rounds, sessionEndTradingAdaptor, sessionLogger, setPhase, startNextRound, startNextRound, startNextTimedRound, startRoundActionLabel, startRoundText, startRoundTransitionLabel, startSession, startSession, stateSpecificTraderButtons, stateSpecificTraderHtml, stopRoundActionLabel, timeLimit, timeRemaining, webAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEAD_TASK

public static java.util.TimerTask DEAD_TASK
Constructor Detail

JudgingSession

public JudgingSession(java.util.Properties props,
                      org.mortbay.cometd.AbstractBayeux bayeux)
Method Detail

initializeRoles

protected java.util.HashMap<java.lang.String,Role> initializeRoles(java.util.Properties props)
Overrides:
initializeRoles in class Session

logSessionInitialization

protected void logSessionInitialization()
Overrides:
logSessionInitialization in class Session

initialManipulatorTickets

public Quantity initialManipulatorTickets()

endowedRoles

protected java.lang.String[] endowedRoles()
Overrides:
endowedRoles in class Session

cuttingOffJudges

public boolean cuttingOffJudges()

nonTradersPresent

public static boolean nonTradersPresent(java.util.Properties props)

bookFundingRequired

protected Quantity bookFundingRequired(java.util.Properties props)
Overrides:
bookFundingRequired in class Session

getJudgeOrNull

public Judge getJudgeOrNull(java.lang.String userName)

ifJudging

public void ifJudging(JudgingStatusAdaptor ifJudging)
               throws ScoreException
Throws:
ScoreException

endScoringPhase

public void endScoringPhase()
                     throws ScoreException
Throws:
ScoreException

calculateScores

protected void calculateScores(Price average)
                        throws ScoreException
Overrides:
calculateScores in class Session
Throws:
ScoreException

judgedValue

public Price judgedValue(int round)
                  throws ScoreException
Throws:
ScoreException

getMedianJudgedValue

public Price getMedianJudgedValue(int round)
                           throws ScoreException
Throws:
ScoreException

getJudgingTarget

public Quantity getJudgingTarget(int round)
                          throws ScoreException
Throws:
ScoreException

experimenterButtons

public java.lang.String[] experimenterButtons()
Overrides:
experimenterButtons in class Session

showEarningsSummary

public java.lang.String showEarningsSummary(java.lang.String userName)
Overrides:
showEarningsSummary in class Session

stateSpecificDisplay

public java.lang.String stateSpecificDisplay()
Overrides:
stateSpecificDisplay in class Session

getEstimatesHtml

public java.lang.String getEstimatesHtml()

judgeInputChoiceList

public java.lang.String judgeInputChoiceList()

judgeRewardsTable

public java.lang.String judgeRewardsTable()

getSliderLabelStepSize

public int getSliderLabelStepSize()

getSliderInputStepSize

public int getSliderInputStepSize()

getEstimateSliderLabel

public java.lang.String getEstimateSliderLabel()

getSliderFeedbackLabel

public java.lang.String getSliderFeedbackLabel()